summaryrefslogtreecommitdiff
path: root/npc/026-1
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-02-28 14:53:13 -0300
committerJesusaves <cpntb1@ymail.com>2021-02-28 14:53:13 -0300
commitaa68b50ff9b3cf04478115ae4df7d05c22a1cc0f (patch)
treee460c19a45cad1f2fc4459f494a818c3a62260b4 /npc/026-1
parent2c0a718d6940d4e515e427eb30a916778e34505f (diff)
downloadserverdata-aa68b50ff9b3cf04478115ae4df7d05c22a1cc0f.tar.gz
serverdata-aa68b50ff9b3cf04478115ae4df7d05c22a1cc0f.tar.bz2
serverdata-aa68b50ff9b3cf04478115ae4df7d05c22a1cc0f.tar.xz
serverdata-aa68b50ff9b3cf04478115ae4df7d05c22a1cc0f.zip
Part of 026-1 mechanics
Diffstat (limited to 'npc/026-1')
-rw-r--r--npc/026-1/ctrl.c100
1 files changed, 95 insertions, 5 deletions
diff --git a/npc/026-1/ctrl.c b/npc/026-1/ctrl.c
index 6137441f7..9151701fe 100644
--- a/npc/026-1/ctrl.c
+++ b/npc/026-1/ctrl.c
@@ -12,10 +12,10 @@
OnTouch:
if (getq(General_Fortress) > 1) goto L_Warp;
mesc l(".:: Impregnable Fortress, %sF ::.", "B1"), 3;
- msObjective(getq(General_Fortress) == 2, l("* TODO"));
+ msObjective(getq(General_Fortress) == 2, l("* Obtain clearance"));
msObjective($MK_TEMPVAR < MKIF_LV_B1F, l("Minimum wins: %d/%d", $MK_TEMPVAR, MKIF_LV_B2F));
mes "";
- mesc l("Hint: TODO.");
+ mesc l("Hint: You might need to come back later.");
end;
L_Warp:
@@ -32,17 +32,107 @@ L_Warp:
// Disarm & reset everything
OnMinute15:
-OnMinute30:
OnMinute45:
-OnMinute00:
- delcells "026-1_58_76"; setcells "026-1", 58, 76, 62, 76, 1, "026-1_58_76";
+ if (!$@DATA_0261[12])
+ delcells "026-1_58_76"; setcells "026-1", 58, 76, 62, 76, 1, "026-1_58_76";
delcells "026-1_25_32"; setcells "026-1", 25, 32, 25, 32, 1, "026-1_25_32";
delcells "026-1_30_32"; setcells "026-1", 30, 32, 30, 32, 1, "026-1_30_32";
setnpcdisplay "#026-1_24_28", NPC_SWITCH_ONLINE;
setnpcdisplay "#026-1_26_28", NPC_SWITCH_ONLINE;
setnpcdisplay "#026-1_62_28", NPC_SWITCH_ONLINE;
+ 0261_CheckReset();
end;
}
// Other misc controllers
+function script 0261_GateChange {
+ if (Sp < MaxSp) end;
+ if (Hp < MaxHp) end;
+ $@DATA_0261[12] = true;
+ percentheal -99, -100;
+ dispbottom "*snap* - Oh noes, there was a trap!";
+ return;
+}
+
+function script 0261_CheckReset {
+ if ($@DATA_0261[0] == 1 &&
+ $@DATA_0261[1] == 1 &&
+ $@DATA_0261[2] == 1 &&
+ $@DATA_0261[3] == 1 &&
+ $@DATA_0261[4] == 1 &&
+ $@DATA_0261[5] == 1 &&
+ $@DATA_0261[6] == 1 &&
+ $@DATA_0261[7] == 1 &&
+ $@DATA_0261[8] == 1 &&
+ $@DATA_0261[9] == 1 &&
+ $@DATA_0261[10] == 1 &&
+ $@DATA_0261[11] == 1)
+ .@r=true;
+ if ($@DATA_0261[0])
+ delcells "026-1_D0";
+ if ($@DATA_0261[1])
+ delcells "026-1_D1";
+ if ($@DATA_0261[2])
+ delcells "026-1_D2";
+ if ($@DATA_0261[3])
+ delcells "026-1_D3";
+ if ($@DATA_0261[4])
+ delcells "026-1_D4";
+ if ($@DATA_0261[5])
+ delcells "026-1_D5";
+ if ($@DATA_0261[6])
+ delcells "026-1_D6";
+ if ($@DATA_0261[7])
+ delcells "026-1_D7";
+ if ($@DATA_0261[8])
+ delcells "026-1_D8";
+ if ($@DATA_0261[9])
+ delcells "026-1_D9";
+ if ($@DATA_0261[10])
+ delcells "026-1_D10";
+ if ($@DATA_0261[11])
+ delcells "026-1_D11";
+ deletearray $@DATA_0261;
+ if (.@r) {
+ $@DATA_0261[12] = true;
+ delcells "026-1_58_76";
+ }
+ return .@r;
+}
+
+026-1,29,76,0 script Important Note#B1F NPC_NO_SPRITE,{
+ function noteBegin;
+ if (getq2(General_Fortress) == 0) noteBegin();
+ mesc l("Flip the manaplace?"), 1;
+ next;
+ if (askyesno() == ASK_YES) {
+ .@r=0261_CheckReset();
+ if (!.@r)
+ warp "003-1", 82, 119;
+ else
+ setq General_Fortress, 2, 0, 0;
+ }
+ close;
+
+function noteBegin {
+ mes l("To the monster army:");
+ mes "";
+ mes l("There has been a lot of movement here as of late.");
+ mes l("Your Highness does not like it, and you're dirtying the floor faster than staff can clean.");
+ mes "";
+ mes l("Therefore, we have restricted access to and from B0F/B2F.");
+ mes l("If you could not attend to the meeting (may the king forgive your soul), just restore the objects to their proper position and flip the switch on this manaplace.");
+ mes "";
+ mes l("Be careful to don't flip the manaplace before all objects are ordered correctly.");
+ mes "";
+ mes l("-- The Keeper");
+ next;
+ setq2 General_Fortress, 1;
+ return;
+}
+
+OnInit:
+ .distance=3;
+ end;
+}