diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-10-15 20:14:55 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-10-15 20:14:55 -0300 |
commit | 87839a2a2a69fa728e04f5642a331779973df29f (patch) | |
tree | 05197f23faa12e58ef5ec19fea654f8c17bec1ed /npc/functions | |
parent | 5ece678c82c7fc66984805ac736cdac6674068a6 (diff) | |
download | serverdata-87839a2a2a69fa728e04f5642a331779973df29f.tar.gz serverdata-87839a2a2a69fa728e04f5642a331779973df29f.tar.bz2 serverdata-87839a2a2a69fa728e04f5642a331779973df29f.tar.xz serverdata-87839a2a2a69fa728e04f5642a331779973df29f.zip |
Keep Siege timers running to prevent siege cancellation from having adverse effect.
Increase max AFK time.
Diffstat (limited to 'npc/functions')
-rw-r--r-- | npc/functions/mkbot.txt | 1 | ||||
-rw-r--r-- | npc/functions/siege.txt | 9 |
2 files changed, 8 insertions, 2 deletions
diff --git a/npc/functions/mkbot.txt b/npc/functions/mkbot.txt index dae226812..2e847ce84 100644 --- a/npc/functions/mkbot.txt +++ b/npc/functions/mkbot.txt @@ -165,6 +165,7 @@ OnTimer90000: // Delta handles the compulsory wait time between waves. // 6 hours normally, 12 hours if the army is in disarray. .@delta=6; + $@SIEGE_ABORTED = false; if ($GAME_STORYLINE == 3) .@delta=12; // Tulimshar diff --git a/npc/functions/siege.txt b/npc/functions/siege.txt index 6ca42b37a..5acc86e56 100644 --- a/npc/functions/siege.txt +++ b/npc/functions/siege.txt @@ -346,12 +346,16 @@ function script do_siege { .@n$=getarg(4); .@t=getarg(5); + // Dry run + if ($@SIEGE_ABORTED) + return; + // If no active player, KILL THE SCRIPT .@c = getunits(BL_PC, .@players, MAX_CYCLE_PC); .@idle = 0; for (.@i = 0; .@i < .@c; .@i++) { attachrid(.@players[.@i]); - if (checkidle() < 300) + if (checkidle() < 450) .@idle++; detachrid(); } @@ -366,7 +370,8 @@ function script do_siege { siege_revert(.@o$); enablenpc("Mana Stone"); setd("$@SIEGE_"+.@c$, 0); - end; + setd("$@SIEGE_ABORTED", true); + return; } // In past, we had a $@SIEGE_<town> to determine difficulty |