summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-10-22 20:09:49 -0200
committerJesusaves <cpntb1@ymail.com>2018-10-22 20:09:49 -0200
commitaf4fbf57746c3f032be2aeb5ed347c4a28343021 (patch)
tree7820f419c29237ecd0238fdac14c73815f361c16 /npc
parenta825791baee732ada6414e297667b6ca153890ba (diff)
downloadserverdata-af4fbf57746c3f032be2aeb5ed347c4a28343021.tar.gz
serverdata-af4fbf57746c3f032be2aeb5ed347c4a28343021.tar.bz2
serverdata-af4fbf57746c3f032be2aeb5ed347c4a28343021.tar.xz
serverdata-af4fbf57746c3f032be2aeb5ed347c4a28343021.zip
Draft for Cindy Cage :3
Diffstat (limited to 'npc')
-rw-r--r--npc/021-1/logic.txt4
-rw-r--r--npc/021-4/main.txt63
2 files changed, 67 insertions, 0 deletions
diff --git a/npc/021-1/logic.txt b/npc/021-1/logic.txt
index 24fc6e465..2e4434805 100644
--- a/npc/021-1/logic.txt
+++ b/npc/021-1/logic.txt
@@ -24,6 +24,10 @@ function script CindySwitch_Check_211 {
021-1,155,196,0 script #0211Logic NPC_NO_SPRITE,0,0,{
end;
OnTouch:
+ // Sanitize some stuff
+ if ($@CINDY_STATE < gettimetick(2) && $@CINDY_STATE > 1500000000)
+ $@CINDY_STATE=0;
+ // Main logic
.@q=getq(NivalisQuest_Cindy);
if (.@q < 3) end;
if ($@CINDY_STATE > gettimetick(2)) goto L_Safe;
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;
}