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.c64
1 files changed, 58 insertions, 6 deletions
diff --git a/npc/025-1/ctrl.c b/npc/025-1/ctrl.c
index d6326798f..4833c6561 100644
--- a/npc/025-1/ctrl.c
+++ b/npc/025-1/ctrl.c
@@ -6,19 +6,75 @@
// Only one siege per day is allowed
// Writes to MK Temp Var. This variable will unlock the castle gates
// Then the inner gates, and finally, will be a co-requisite to the floors
+// Variables:
+// $FORTRESS_STATE = int
+// 0 - Locked
+// 1 - Unlocked
+
+// MAPFLAGS
+025-1 mapflag zone MMO
+025-1 mapflag nosave 025-2 100 27
+
+/////////////////////////////////////////
+// FUNCTIONS
+
+// FTCleanup(status)
+function script FTCleanup {
+ $FORTRESS_STATE=getarg(0);
+ //enablenpc
+ //killmonsterall
+ return;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+/////////////////////////////////////////
+// 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,{
- end;
+ // Main Story block - WHAT
+ if ($GAME_STORYLINE < 3)
+ die();
+ // Still open
+ if ($FORTRESS_STATE)
+ end;
+ // Only World Hero may interact
+ if (strcharinfo(0) != $MOST_HEROIC$) {
+ dispbottom l("I will not assault the Fortress Island. I'll wait for %s.", $MOST_HEROIC$);
+ end;
+ }
+
+ // Hey, you can assault the town!
+ mesc ".:: "+l("THE FORTRESS ISLAND TOWN") + " ::.", 1;
+ mes l("Behind this gate, lies the Fortress Island Town.");
+ close;
OnTouch:
- slide 100, 110;
+ if ($FORTRESS_STATE)
+ slide 100, 110;
+ else
+ dispbottom l("The fortress is sealed!!");
end;
OnInit:
end;
OnTue0000:
+ FTCleanup(false);
+ end;
+
+OnConquest:
+ FTCleanup(true);
end;
}
@@ -37,8 +93,4 @@ OnTouch:
-// FTCleanup()
-function script FTCleanup {
- return;
-}