summaryrefslogtreecommitdiff
path: root/npc/026-4
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2023-10-08 13:27:15 -0300
committerJesusaves <cpntb1@ymail.com>2023-10-08 13:27:15 -0300
commitf92241342204223cdc32f5828f9ccd73526c18a2 (patch)
treec1ec23d08caf72d520ea3ca53491c72d975ee10c /npc/026-4
parentb72be27813513445c8135027f5b38bbf8a9d981a (diff)
downloadserverdata-f92241342204223cdc32f5828f9ccd73526c18a2.tar.gz
serverdata-f92241342204223cdc32f5828f9ccd73526c18a2.tar.bz2
serverdata-f92241342204223cdc32f5828f9ccd73526c18a2.tar.xz
serverdata-f92241342204223cdc32f5828f9ccd73526c18a2.zip
Release Impregnable Fortress, B4F
Diffstat (limited to 'npc/026-4')
-rw-r--r--npc/026-4/ctrl.c43
1 files changed, 40 insertions, 3 deletions
diff --git a/npc/026-4/ctrl.c b/npc/026-4/ctrl.c
index c22ee7fc2..a81192025 100644
--- a/npc/026-4/ctrl.c
+++ b/npc/026-4/ctrl.c
@@ -32,8 +32,7 @@ OnMon2359:
killmonsterall("026-4");
MazeMobs(145, false, 8, "026-4"); // Initiate Lv 145 mobs
MazeMobs(115, false, 21, "026-4"); // Initiate Lv 115 mobs
- // TODO: Add the utilities: Switches (and move them every day?) and mobpt logic
- // And the actual portal (NPC?)
+ // Move NPCs around
goto OnClock1843;
OnClock1843:
@@ -50,6 +49,8 @@ OnClock1843:
unitwarp(getnpcid("#026-4Switch_4"), "026-4", .npc_x, .npc_y);
_moveNpc("026-4");
unitwarp(getnpcid("#026-4Switch_5"), "026-4", .npc_x, .npc_y);
+ _moveNpc("026-4");
+ unitwarp(getnpcid("#026-4Gate"), "026-4", .npc_x, .npc_y);
end;
function _moveNpc {
@@ -101,6 +102,13 @@ function _moveNpc {
// Mark this switch as done
setq2 General_Fortress, getq2(General_Fortress) | .@bit;
dispbottom l("You hear a *clank*, it must have worked.");
+ // Check if this was the last switch
+ if (getq2(General_Fortress) == 31) {
+ dispbottom l("This was the last one of them. Now to find the door...");
+ setq General_Fortress, 6, 0, 0;
+ specialeffect(FX_MGWARP, SELF, getcharid(3));
+ }
+ // Final decorators
closeclientdialog;
setnpcdisplay .name$, NPC_SWITCH_ONLINE;
sleep(30000); // Detach the player (instead of sleep2)
@@ -116,5 +124,34 @@ OnInit:
000-0,0,0,0 duplicate(#026-4Switch_1) #026-4Switch_4 NPC_SWITCH_OFFLINE
000-0,0,0,0 duplicate(#026-4Switch_1) #026-4Switch_5 NPC_SWITCH_OFFLINE
-// TODO: The main NPC which lets you out of here
+// The main NPC which lets you out of here
+000-0,0,0,0, script #026-4Gate NPC_ICE_CAGE,0,0,{
+ if (getq(General_Fortress) > 5) goto L_Warp;
+ dispbottom l("After flipping all %s switches, I should go there.", l("five"));
+ end;
+OnTouch:
+ if (getq(General_Fortress) > 5) goto L_Warp;
+ mesc l(".:: Impregnable Fortress, %sF ::.", "B4"), 3;
+ msObjective(getq(General_Fortress) == 6, l("* Flip all five switches"));
+ msObjective($MK_TEMPVAR >= MKIF_LV_B5F, l("Minimum wins: %d/%d", $MK_TEMPVAR, MKIF_LV_B5F));
+ mes "";
+ mesc l("Hint: The Bloody Switches.");
+ close;
+
+L_Warp:
+ // Not unlocked
+ if ($GAME_STORYLINE >= 3 && $MK_TEMPVAR < MKIF_LV_B5F) {
+ mesc l("The gate is sealed shut."), 1;
+ mesc l("The monster army is still strong on this floor!"), 1;
+ mesc l("Minimum wins: %d/%d", $MK_TEMPVAR, MKIF_LV_B5F), 1;
+ close;
+ }
+ //warp "026-5", 40, 40; // TODO: These coords actually NOT OK
+ dispbottom l("Coming Soon, in Moubootaur Legends!");
+ end;
+
+OnInit:
+ .distance=3;
+ end;
+}