From 87839a2a2a69fa728e04f5642a331779973df29f Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 15 Oct 2020 20:14:55 -0300 Subject: Keep Siege timers running to prevent siege cancellation from having adverse effect. Increase max AFK time. --- npc/functions/siege.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'npc/functions/siege.txt') 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_ to determine difficulty -- cgit v1.2.3-60-g2f50