summaryrefslogtreecommitdiff
path: root/npc/021-4/main.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/021-4/main.txt')
-rw-r--r--npc/021-4/main.txt63
1 files changed, 63 insertions, 0 deletions
diff --git a/npc/021-4/main.txt b/npc/021-4/main.txt
index 752feeb92..ab7a7bf6d 100644
--- a/npc/021-4/main.txt
+++ b/npc/021-4/main.txt
@@ -34,16 +34,79 @@ function script CindySwitch_Check_214 {
021-4,56,41,0 duplicate(#CindySwitch_01) #CindySwitch_10 NPC_SWITCH_OFFLINE
// Cindy
+// Global Variable: $@CINDY_STATE
+
021-4,42,41,0 script Cindy#Outside NPC_CINDY_CAGE,{
if (getq(NivalisQuest_Cindy) < 5)
goto L_Cheat;
+ if ($@CINDY_STATE > 150000) goto L_Reset;
+ if ($@CINDY_STATE % 2 == 0) goto L_Start;
+ // Victory check missing
+ if (CindySwitch_Check_214() == 5) {
+ // Gate open must advance
+ setnpcdisplay .name$, NPC_CINDY_UNCAGE;
+ }
hello; end;
+
+
L_Cheat:
warp "Save", 0, 0; atcommand "@jail "+strcharinfo(0); dispbottom l("Cheater detected.");
end;
+
+L_Reset:
+ $@CINDY_STATE=0;
+ npctalk l("*beeep*");
+ end;
+
+L_Start:
+ mesn;
+ mesq l("Have you came here to rescue me?");
+ mes ""; mes "";
+ mesc l(".:: WARNING ::."), 1;
+ mesc l("Once you decide to rescue Cindy, nobody else will be able to enter or leave this room."), 1;
+ mesc l("The blame of failure will be over you, but so will be the glory of success. There's no death penalty for others."), 1;
+ mes "";
+ select
+ l("Not yet, I'm waiting for friends"),
+ l("Yes. Let me try to open this."),
+ l("No, I'll let you there to the Yeti's mercy.");
+
+ if (@menu == 2 && $@CINDY_STATE % 2 == 0) {
+ $@CINDY_STATE+=1;
+ $@CINDY_HERO=strcharinfo(0);
+ goto L_Begin;
+ }
+ close;
+
+L_Begin:
+ initnpctimer;
+ enablenpc "#CindySwitch_06";
+ enablenpc "#CindySwitch_07";
+ enablenpc "#CindySwitch_08";
+ enablenpc "#CindySwitch_09";
+ enablenpc "#CindySwitch_10";
+ close;
+
+L_Cleanup:
+ .lifetime=0;
+ $@CINDY_HERO="";
+ disablenpc "#CindySwitch_06";
+ disablenpc "#CindySwitch_07";
+ disablenpc "#CindySwitch_08";
+ disablenpc "#CindySwitch_09";
+ disablenpc "#CindySwitch_10";
+ setnpcdisplay .name$, NPC_CINDY_CAGE;
+ end;
+
OnInit:
.distance=5;
.lifetime=0;
+ $@CINDY_HERO="";
+ disablenpc "#CindySwitch_06";
+ disablenpc "#CindySwitch_07";
+ disablenpc "#CindySwitch_08";
+ disablenpc "#CindySwitch_09";
+ disablenpc "#CindySwitch_10";
end;
}