summaryrefslogtreecommitdiff
path: root/npc/025-1/ctrl.c
diff options
context:
space:
mode:
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;
}