summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-10-15 20:14:55 -0300
committerJesusaves <cpntb1@ymail.com>2020-10-15 20:14:55 -0300
commit87839a2a2a69fa728e04f5642a331779973df29f (patch)
tree05197f23faa12e58ef5ec19fea654f8c17bec1ed
parent5ece678c82c7fc66984805ac736cdac6674068a6 (diff)
downloadserverdata-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.
-rw-r--r--npc/003-1/lieutenantdausen.txt3
-rw-r--r--npc/009-1/guards.txt1
-rw-r--r--npc/012-1/guards.txt1
-rw-r--r--npc/020-1/guards.txt1
-rw-r--r--npc/functions/mkbot.txt1
-rw-r--r--npc/functions/siege.txt9
6 files changed, 13 insertions, 3 deletions
diff --git a/npc/003-1/lieutenantdausen.txt b/npc/003-1/lieutenantdausen.txt
index 5593510d0..28fc43f6f 100644
--- a/npc/003-1/lieutenantdausen.txt
+++ b/npc/003-1/lieutenantdausen.txt
@@ -292,6 +292,7 @@ OnGuardDeath:
end;
OnMKSiege:
+ $@SIEGE_ABORTED = false;
OnStartSiege:
kamibroadcast(col("WARNING! WARNING! Monster Army moving towards Tulimshar!!",1));
do_siege("003-1", "004-1", "TULIM", TP_TULIM, .name$, .siegetime);
@@ -378,7 +379,7 @@ OnTimer5000:
// Monster army have withdrawn completly
case MK_SIEGE_DURATION:
.siegetime=0;
- announce(("Tulimshar siege is over!"), bc_all);
+ announce(("Tulimshar siege is over!"), bc_all);
enablenpc "Ched";
enablenpc "Aahna";
enablenpc "Constable Perry";
diff --git a/npc/009-1/guards.txt b/npc/009-1/guards.txt
index 7a4c2863c..b214a70fe 100644
--- a/npc/009-1/guards.txt
+++ b/npc/009-1/guards.txt
@@ -60,6 +60,7 @@ L_MKControl:
close;
OnMKSiege:
+ $@SIEGE_ABORTED = false;
OnStartSiege:
kamibroadcast(col("WARNING! WARNING! Monster Army is moving towards Halinarzo!!",1));
do_siege("009-1", "010-2", "HALIN", TP_TULIM, .name$, .siegetime);
diff --git a/npc/012-1/guards.txt b/npc/012-1/guards.txt
index 9a469a2cc..b1bb17ee0 100644
--- a/npc/012-1/guards.txt
+++ b/npc/012-1/guards.txt
@@ -638,6 +638,7 @@ OnInit:
// Begin Siege
OnMKSiege:
+ $@SIEGE_ABORTED = false;
OnStartSiege:
kamibroadcast(col("WARNING! WARNING! Monster Army is moving towards Hurnscald!!",1));
do_siege("012-1", "014-3", "HURNS", TP_HURNS, .name$, .siegetime);
diff --git a/npc/020-1/guards.txt b/npc/020-1/guards.txt
index cac5dc79d..4d33beecd 100644
--- a/npc/020-1/guards.txt
+++ b/npc/020-1/guards.txt
@@ -32,6 +32,7 @@ L_MKControl:
OnMKSiege:
+ $@SIEGE_ABORTED = false;
OnStartSiege:
kamibroadcast(col("WARNING! WARNING! Monster Army is moving towards Nivalis!!",1));
do_siege("020-1", "019-2", "NIVAL", TP_NIVAL, .name$, .siegetime);
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