diff options
author | Jesusaves <cpntb1@ymail.com> | 2023-10-07 23:42:02 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2023-10-07 23:42:02 -0300 |
commit | 023cfd6dd51dfd6523b19be417712a80beea6e6d (patch) | |
tree | 92272577699826249f75fe9943a2fd42068239f2 /npc/026-3/ctrl.c | |
parent | c3231d0f73d910622eefe2c2c5c55db9c5a61182 (diff) | |
download | serverdata-023cfd6dd51dfd6523b19be417712a80beea6e6d.tar.gz serverdata-023cfd6dd51dfd6523b19be417712a80beea6e6d.tar.bz2 serverdata-023cfd6dd51dfd6523b19be417712a80beea6e6d.tar.xz serverdata-023cfd6dd51dfd6523b19be417712a80beea6e6d.zip |
026-3 bare logic, and minimum files
Diffstat (limited to 'npc/026-3/ctrl.c')
-rw-r--r-- | npc/026-3/ctrl.c | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/npc/026-3/ctrl.c b/npc/026-3/ctrl.c new file mode 100644 index 000000000..8c0656949 --- /dev/null +++ b/npc/026-3/ctrl.c @@ -0,0 +1,61 @@ +// TMW2 scripts. +// Author: +// Jesusalva +// Description: +// The Impregnable Fortress Control Files +// Quest: General_Fortress +// (MaxFloor+1, internal, internal) + +// 0263Event(switchID) +function script 0263Event { + // Terminate the script if you already flipped it (also to stop trolls) + if (getq(General_Fortress) != 4) end; + if (getq2(General_Fortress) & getarg(0)) { + dispbottom l("I have already flipped this switch earlier."); + end; + } + // Flip it for good + setq2 General_Fortress, getq2(General_Fortress) | getarg(0); + // And if all switches are flipped...! + if (getq2(General_Fortress) == 15) { + setq General_Fortress, 5, 0, 0; + specialeffect(FX_CIRCLE, SELF, getcharid(3)); + } + return; +} + +// The main entrance +026-3,45,118,0 script Impregnable1#B2F NPC_HIDDEN,4,0,{ + end; + +OnTouch: + if (getq(General_Fortress) > 5) goto L_Warp; + mesc l(".:: Impregnable Fortress, %sF ::.", "B3"), 3; + msObjective(getq(General_Fortress) == 5, l("* Flip all four switches")); + msObjective($MK_TEMPVAR < MKIF_LV_B3F, l("Minimum wins: %d/%d", $MK_TEMPVAR, MKIF_LV_B4F)); + mes ""; + mesc l("Hint: You cannot unflip a switch, but they unflip every 12 hours."); + end; + +L_Warp: + // Not unlocked + if ($GAME_STORYLINE >= 3 && $MK_TEMPVAR < MKIF_LV_B4F) { + 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_B4F), 1; + close; + } + //warp "026-4", X, Y; + dispbottom l("Coming Soon, in Moubootaur Legends!"); + end; + +// Reset the switches +OnClock0500: +OnClock1700: + setnpcdisplay "#026-3_119_28", NPC_SWITCH_OFFLINE; + setnpcdisplay "#026-3_49_76", NPC_SWITCH_OFFLINE; + setnpcdisplay "#026-3_84_70", NPC_SWITCH_OFFLINE; + setnpcdisplay "#026-3_43_49", NPC_SWITCH_OFFLINE; + end; +} + |