summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-06-10 13:36:47 -0300
committerJesusaves <cpntb1@ymail.com>2019-06-10 13:36:47 -0300
commit462c9dc750807e2edec0e219157204d86e231f48 (patch)
tree3111db4fd5cc83ca821eeff416579abab435d6a7 /npc
parente2485e76cacde73ac38bf1bdb54bee431cd721f2 (diff)
downloadserverdata-462c9dc750807e2edec0e219157204d86e231f48.tar.gz
serverdata-462c9dc750807e2edec0e219157204d86e231f48.tar.bz2
serverdata-462c9dc750807e2edec0e219157204d86e231f48.tar.xz
serverdata-462c9dc750807e2edec0e219157204d86e231f48.zip
Reorder Cindy's script to improve how easy to read it is
Diffstat (limited to 'npc')
-rw-r--r--npc/021-4/main.txt72
1 files changed, 37 insertions, 35 deletions
diff --git a/npc/021-4/main.txt b/npc/021-4/main.txt
index 6fe7c0237..5fe28cd8e 100644
--- a/npc/021-4/main.txt
+++ b/npc/021-4/main.txt
@@ -109,28 +109,6 @@ OnInit:
}
hello; end;
-
-// Edge Cases
-L_Cheat:
- warp "Save", 0, 0; atcommand "@jail "+strcharinfo(0); dispbottom l("Cheater detected.");
- end;
-
-L_Reset:
- if ($@CINDY_HERO$ == strcharinfo(0)) {
- goto L_Winner;
- } else if (is_gm() && $@GM_OVERRIDE) {
- $@CINDY_STATE=0;
- npctalk l("*beeep*");
- }
- end;
-
-// Timeout
-OnReckless:
-L_Reckless:
- kamibroadcast("People failed to rescue Cindy!");
- areatimer "021-4", 20, 20, 100, 80, 10, "Cindy#Outside::OnFail";
- goto L_CleanUp;
-
// Start
L_Start:
mesn;
@@ -167,6 +145,31 @@ L_Begin:
monster "021-4", 66, 49, "Yeti", Yeti, 1, "Cindy#Outside::OnPetDeath";
close;
+// Special use-case
+L_Reset:
+ if ($@CINDY_HERO$ == strcharinfo(0)) {
+ goto L_Winner;
+ } else if (is_gm() && $@GM_OVERRIDE) {
+ $@CINDY_STATE=0;
+ npctalk l("*beeep*");
+ }
+ end;
+
+// For all players finishing the quest
+OnReward:
+ if (ispcdead()) {
+ recovery(getcharid(3));
+ warp "Save", 0, 0;
+ end;
+ }
+ if ($@CINDY_HERO$ == strcharinfo(0))
+ dispbottom l("Congratulations on rescuing Cindy. You should now talk to her before leaving.");
+ else
+ dispbottom l("Congratulations on rescuing Cindy.");
+ setq2 NivalisQuest_Cindy, getq2(NivalisQuest_Cindy)+1;
+ getexp 10000, JobLevel;
+ end;
+
// Winner Reward
L_Winner:
mesn;
@@ -213,26 +216,25 @@ L_Winner:
OnPetDeath:
end;
+// Cast against all players on defeat
OnFail:
percentheal -100, -100;
heal -1, -1;
end;
-// For all players finishing the quest
-OnReward:
- if (ispcdead()) {
- recovery(getcharid(3));
- warp "Save", 0, 0;
- end;
- }
- if ($@CINDY_HERO$ == strcharinfo(0))
- dispbottom l("Congratulations on rescuing Cindy. You should now talk to her before leaving.");
- else
- dispbottom l("Congratulations on rescuing Cindy.");
- setq2 NivalisQuest_Cindy, getq2(NivalisQuest_Cindy)+1;
- getexp 10000, JobLevel;
+// Edge Cases
+L_Cheat:
+ warp "Save", 0, 0; atcommand "@jail "+strcharinfo(0); dispbottom l("Cheater detected.");
end;
+// Timeout
+OnReckless:
+L_Reckless:
+ kamibroadcast("People failed to rescue Cindy!");
+ areatimer "021-4", 20, 20, 100, 80, 10, "Cindy#Outside::OnFail";
+ goto L_CleanUp;
+
+// Event is over, clean up the mess the players left
OnCleanUp:
L_CleanUp:
.lifetime=0;