summaryrefslogtreecommitdiff
path: root/npc/025-1/ctrl.c
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-07-31 22:53:04 -0300
committerJesusaves <cpntb1@ymail.com>2020-07-31 22:53:04 -0300
commitd6f960dbde9e6d6c5e0ff2f6e0783c1067c5b9a1 (patch)
treefeddeb66e50e766c51dc95a8efd27b451436745c /npc/025-1/ctrl.c
parentd3648e1b1b87c0e130454b45c74c244bb21164ae (diff)
downloadserverdata-d6f960dbde9e6d6c5e0ff2f6e0783c1067c5b9a1.tar.gz
serverdata-d6f960dbde9e6d6c5e0ff2f6e0783c1067c5b9a1.tar.bz2
serverdata-d6f960dbde9e6d6c5e0ff2f6e0783c1067c5b9a1.tar.xz
serverdata-d6f960dbde9e6d6c5e0ff2f6e0783c1067c5b9a1.zip
Modify Fortress Town gate logic
Diffstat (limited to 'npc/025-1/ctrl.c')
-rw-r--r--npc/025-1/ctrl.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/npc/025-1/ctrl.c b/npc/025-1/ctrl.c
index 2d06d4378..166cd0787 100644
--- a/npc/025-1/ctrl.c
+++ b/npc/025-1/ctrl.c
@@ -45,6 +45,14 @@ function script FTCleanup {
// TODO: ::OnConquest
// TODO: Kill stray monsters
//killmonsterall
+ // Main gate
+ if ($FORTRESS_STATE) {
+ disablenpc "Fortress Gate";
+ donpcevent "#025-1_99_112::OnDisable";
+ } else {
+ enablenpc "Fortress Gate";
+ donpcevent "#025-1_99_112::OnEnable";
+ }
return;
}
@@ -91,7 +99,7 @@ function script FTStatue {
// NPC SCRIPTS
// Main gate - Also where the World Hero can begin the siege
-025-1,100,113,0 script #FortressTown NPC_NO_SPRITE,1,0,{
+025-1,100,112,0 script Fortress Gate NPC_NO_SPRITE,{
// Main Story block - WHAT
if ($GAME_STORYLINE < 3)
die();
@@ -110,14 +118,8 @@ function script FTStatue {
//monster(FortressGate, ::OnOpenGate)
close;
-OnTouch:
- if ($FORTRESS_STATE)
- slide 100, 110;
- else
- dispbottom l("The fortress is sealed!!");
- end;
-
OnInit:
+ FTCleanup($FORTRESS_STATE);
end;
OnTue0000:
@@ -131,12 +133,13 @@ OnConquest:
-// Exit - always work
+// This exit must work even if gate is closed
025-1,99,111,0 script #FortressTownOut NPC_HIDDEN,1,0,{
end;
OnTouch:
- slide 100, 114;
+ if (!$FORTRESS_STATE)
+ slide 100, 114;
end;
}