summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-01-14 00:23:12 -0300
committerJesusaves <cpntb1@ymail.com>2021-01-14 00:23:12 -0300
commit255f9c62e961b972e4f2012bab570dce46590307 (patch)
treeea63428f55473565941e019846461bc60bb9f125
parent77a8522b9a7a7125447b059af90debc7c5c506e6 (diff)
downloadserverdata-255f9c62e961b972e4f2012bab570dce46590307.tar.gz
serverdata-255f9c62e961b972e4f2012bab570dce46590307.tar.bz2
serverdata-255f9c62e961b972e4f2012bab570dce46590307.tar.xz
serverdata-255f9c62e961b972e4f2012bab570dce46590307.zip
During Fortress Town Siege, no ones goes in nor out
-rw-r--r--npc/025-1/ctrl.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/npc/025-1/ctrl.c b/npc/025-1/ctrl.c
index 44cba78e8..71e11cf7a 100644
--- a/npc/025-1/ctrl.c
+++ b/npc/025-1/ctrl.c
@@ -13,6 +13,7 @@
// $@FORTRESS_STATUE = bitmask
// 1,2,4,8,16 - broken statues
// 1024 - Fortress Gate
+// 2048 - Siege started
// $@FORT_BLACKLIST = int array
// Char ID which already raided this week
// TODO: Use bg() - maybe with dummysd? What will increase allies count?
@@ -60,6 +61,7 @@ function script FTCleanup {
mapwarp("025-1", "025-2", 100, 27);
}
deletearray $@FORT_BLACKLIST;
+ enablenpc "#025-1_100_123";
return;
}
@@ -132,8 +134,12 @@ function script FTStatue {
// FIRE THE EVENT
disablenpc .name$;
+ disablenpc "#025-1_100_123";
initnpctimer;
+ // Reset variables
+ $@FORTRESS_STATUE=2048;
+
// Spawn the gate
monster("025-1", 99, 113, "Fortress Gate", FortressGate, 1, .name$+"::OnOpenGate");
// TODO: Initial defending waves
@@ -151,8 +157,9 @@ OnOpenGate:
close;
OnTimer30000:
- // TODO: Spawn mobs
.@breach=($@FORTRESS_STATUE & 1024);
+ // TODO: Spawn mobs
+
initnpctimer;
end;
@@ -195,7 +202,7 @@ OnTouch:
end;
OnTouch:
// Disabled
- if ($GAME_STORYLINE < 3 && !$@GM_OVERRIDE && !is_gm())
+ if ($GAME_STORYLINE < 3 || !is_admin() || $@FORTRESS_STATUE)
end;
// Blacklisted
if (array_find($@FORT_BLACKLIST, getcharid(0)) != -1)