From 79a6488356ef522fb2e37ff224f4b7c6194ca9e9 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Tue, 20 Aug 2013 09:39:17 -0700 Subject: Put Cindy messages in an array and use announcement formatting --- world/map/npc/031-4/cindyCave.txt | 64 ++++++++++++++------------------------- 1 file changed, 22 insertions(+), 42 deletions(-) (limited to 'world/map/npc') diff --git a/world/map/npc/031-4/cindyCave.txt b/world/map/npc/031-4/cindyCave.txt index 6c03e951..0be990c8 100644 --- a/world/map/npc/031-4/cindyCave.txt +++ b/world/map/npc/031-4/cindyCave.txt @@ -176,48 +176,12 @@ L_NextWave: areamonster "031-4.gat", 0, 0, 95, 91, "", 1072, $@FIGHT_YETI_NUMBER, "Cindy::OnPetDeath"; - if ($@FIGHT_YETI_WAVE == 1) - mapannounce "031-4.gat", "Cindy: Yetis!", 0; - if ($@FIGHT_YETI_WAVE == 2) - mapannounce "031-4.gat", "Cindy: Watch out!", 0; - if ($@FIGHT_YETI_WAVE == 3) - mapannounce "031-4.gat", "Cindy: More of them are coming!", 0; - if ($@FIGHT_YETI_WAVE == 4) - mapannounce "031-4.gat", "Cindy: Be careful! More of them!", 0; - if ($@FIGHT_YETI_WAVE == 5) - mapannounce "031-4.gat", "Cindy: Attention! There is another bunch of them!", 0; - if ($@FIGHT_YETI_WAVE == 6) - mapannounce "031-4.gat", "Cindy: Hang on! More of them!", 0; - if ($@FIGHT_YETI_WAVE == 7) - mapannounce "031-4.gat", "Cindy: More Yetis! Will this never end?", 0; - if ($@FIGHT_YETI_WAVE == 8) - mapannounce "031-4.gat", "Cindy: There are coming more and more!", 0; - if ($@FIGHT_YETI_WAVE == 9) - mapannounce "031-4.gat", "Cindy: Watch your back! There are so many of them!", 0; - if ($@FIGHT_YETI_WAVE == 10) - mapannounce "031-4.gat", "Cindy: This seems to be their final attack! I believe in you!", 0; - - if ($@FIGHT_YETI_WAVE == 1) - mapannounce "031-3.gat", "Cindy: Yetis!", 0; - if ($@FIGHT_YETI_WAVE == 2) - mapannounce "031-3.gat", "Cindy: Watch out!", 0; - if ($@FIGHT_YETI_WAVE == 3) - mapannounce "031-3.gat", "Cindy: More of them are coming!", 0; - if ($@FIGHT_YETI_WAVE == 4) - mapannounce "031-3.gat", "Cindy: Be careful! More of them!", 0; - if ($@FIGHT_YETI_WAVE == 5) - mapannounce "031-3.gat", "Cindy: Attention! There is another bunch of them!", 0; - if ($@FIGHT_YETI_WAVE == 6) - mapannounce "031-3.gat", "Cindy: Hang on! More of them!", 0; - if ($@FIGHT_YETI_WAVE == 7) - mapannounce "031-3.gat", "Cindy: More Yetis! Will this never end?", 0; - if ($@FIGHT_YETI_WAVE == 8) - mapannounce "031-3.gat", "Cindy: There are coming more and more!", 0; - if ($@FIGHT_YETI_WAVE == 9) - mapannounce "031-3.gat", "Cindy: Watch your back! There are so many of them!", 0; - if ($@FIGHT_YETI_WAVE == 10) - mapannounce "031-3.gat", "Cindy: This seems to be their final attack! I believe in you!", 0; - + set $@msg$, $@FIGHT_YETI_MESSAGES$[$@FIGHT_YETI_WAVE]; + if ($@msg$ == "") + goto L_Return_1; + mapannounce "031-4.gat", $@msg$, 0; + mapannounce "031-3.gat", $@msg$, 0; + set $@msg$, ""; goto L_Return_1; // Called on each player once every 5 seconds @@ -266,6 +230,22 @@ L_End: set @rescue_Cindy, 0; end; +OnInit: + setarray $@FIGHT_YETI_MESSAGES$, + "", // unused + // " : " is magic so that it says "global announcement from" + "Cindy : Yetis!", + "Cindy : Watch out!", + "Cindy : More of them are coming!", + "Cindy : Be careful! More of them!", + "Cindy : Attention! There is another bunch of them!", + "Cindy : Hang on! More of them!", + "Cindy : More Yetis! Will this never end?", + "Cindy : There are coming more and more!", + "Cindy : Watch your back! There are so many of them!", + "Cindy : This seems to be their final attack! I believe in you!"; + end; + ///////// S_Update_Mask: set QUEST_Nivalis_state, -- cgit v1.2.3-60-g2f50