summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/025-1/_config.txt11
-rw-r--r--npc/025-1/_import.txt1
-rw-r--r--npc/025-1/ctrl.c23
3 files changed, 25 insertions, 10 deletions
diff --git a/npc/025-1/_config.txt b/npc/025-1/_config.txt
new file mode 100644
index 000000000..51d36e920
--- /dev/null
+++ b/npc/025-1/_config.txt
@@ -0,0 +1,11 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 025-1: Fortress Town - Holy Land conf
+
+025-1,99,112,0 script #025-1_99_112 NPC_HIDDEN,{
+ end;
+OnDisable:
+ delcells "025-1_99_112"; end;
+OnEnable:
+OnInit:
+ setcells "025-1", 99, 112, 100, 112, 1, "025-1_99_112";
+}
diff --git a/npc/025-1/_import.txt b/npc/025-1/_import.txt
index dc7b2b6cf..0ab700b78 100644
--- a/npc/025-1/_import.txt
+++ b/npc/025-1/_import.txt
@@ -1,4 +1,5 @@
// Map 025-1: Fortress Town - Holy Land
// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/025-1/_config.txt",
"npc/025-1/_mobs.txt",
"npc/025-1/ctrl.c",
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;
}