diff options
author | Jessica Tölke <jtoelke@mail.upb.de> | 2011-10-23 17:23:59 +0200 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2011-10-24 11:19:03 -0700 |
commit | 2b35d738f42386e52fdddeb639180ab5db8f072f (patch) | |
tree | 202d9526bedfd16b32ffa5c89e06994cc1adb0c2 | |
parent | 53d83056e03af47c2d50da0949616d74f58ad53c (diff) | |
download | serverdata-2b35d738f42386e52fdddeb639180ab5db8f072f.tar.gz serverdata-2b35d738f42386e52fdddeb639180ab5db8f072f.tar.bz2 serverdata-2b35d738f42386e52fdddeb639180ab5db8f072f.tar.xz serverdata-2b35d738f42386e52fdddeb639180ab5db8f072f.zip |
Changes in npc scripts on 031-x:
- change zeny to Zeny and baselevel to BaseLevel
- set temporary variables to zero at the end of script
- some adaptions on timer handling on the yeti fight
-rw-r--r-- | world/map/npc/031-1/angelaOutside.txt | 35 | ||||
-rw-r--r-- | world/map/npc/031-1/frozenbeard.txt | 4 | ||||
-rw-r--r-- | world/map/npc/031-1/house.txt | 4 | ||||
-rw-r--r-- | world/map/npc/031-2/angelaHouse.txt | 33 | ||||
-rw-r--r-- | world/map/npc/031-2/cindyHouse.txt | 21 | ||||
-rw-r--r-- | world/map/npc/031-3/labyrinth.txt | 11 | ||||
-rw-r--r-- | world/map/npc/031-4/cindyCave.txt | 58 |
7 files changed, 103 insertions, 63 deletions
diff --git a/world/map/npc/031-1/angelaOutside.txt b/world/map/npc/031-1/angelaOutside.txt index 9fce8e10..5e7017a8 100644 --- a/world/map/npc/031-1/angelaOutside.txt +++ b/world/map/npc/031-1/angelaOutside.txt @@ -1,5 +1,4 @@ // author: Jenalya -// reviewed by: // state0: Angela is to upset to tell you anything, needs a concentration potion // state1: got the mission to save Cindy // state2 and state3: Cindy is saved Angela invites you to visit them for giving a reward @@ -12,6 +11,8 @@ set @rescue_Cindy, ((QUEST_Nivalis_state & @Q_Nivalis_state_MASK) >> @Q_Nivalis_state_SHIFT); + set @minlevel, 70; + if (@rescue_Cindy > 3) goto L_Please_Visit_Again; if (@rescue_Cindy > 1) goto L_Please_Visit; if (@rescue_Cindy == 1) goto L_Please_Help; @@ -21,14 +22,13 @@ next; mes "\"It's terrible, oh my dear child!\""; next; - if (countitem("ConcentrationPotion") > 0 - && baselevel > 69) - goto L_Menu_Potion; + if (countitem("ConcentrationPotion") > 0 && BaseLevel >= @minlevel) + goto L_Menu_Potion; menu "\"Please calm down and tell me what happened.\"", L_Whining, - "Leave", -; - close; + "Leave", L_Close; + goto L_Close; L_Whining: mes "[Angela]"; @@ -51,14 +51,14 @@ L_Whining: mes "\"She is crying and sobbing.\""; next; mes "\"It seems she is too upset to tell you anything helpful. If she would just calm down and concentrate a bit...\""; - close; + goto L_Close; L_Menu_Potion: menu "\"Please calm down and tell me what happened.\"", L_Whining, "Give her a concentration potion.", L_Calm_Down, - "Leave", -; - close; + "Leave", L_Close; + goto L_Close; L_Calm_Down: if (countitem("ConcentrationPotion") == 0) @@ -79,29 +79,36 @@ L_Calm_Down: mes "\"You look like an adventurer! Please, can you go in that cave and rescue my little Cindy? I beg you for help!\""; set @rescue_Cindy, 1; callsub S_Update_Mask; - close; + goto L_Close; L_No_Potion: mes "You don't have a concentration potion."; - close; + goto L_Close; L_Please_Help: mes "[Angela]"; mes "\"Please go in that cave and rescue my daughter!\""; - close; + goto L_Close; L_Please_Visit: mes "[Angela]"; mes "\"Thank you so much for rescuing my beloved Cindy. Please come to visit us in our house at the beach.\""; next; mes "\"My husband is an adventurer like you, and I want to give you something he got on his travels to show my gratitude.\""; - close; + goto L_Close; L_Please_Visit_Again: mes "[Angela]"; mes "\"Hello! You are welcome to visit us in our house at the beach everytime. Cindy loves to see you!\""; next; mes "\"If you have found any present boxes the Yetis took away, please bring them to our house. Usually, the Yetis are very shy... their behavior is a bit odd.\""; + goto L_Close; + +L_Close: + set @Q_Nivalis_state_MASK, 0; + set @Q_Nivalis_state_SHIFT, 0; + set @rescue_Cindy, 0; + set @minlevel, 0; close; S_Update_Mask: @@ -109,4 +116,4 @@ S_Update_Mask: (QUEST_Nivalis_state & ~(@Q_Nivalis_state_MASK)) | (@rescue_Cindy << @Q_Nivalis_state_SHIFT); return; -}
\ No newline at end of file +} diff --git a/world/map/npc/031-1/frozenbeard.txt b/world/map/npc/031-1/frozenbeard.txt index 6a8eb467..b4fe4e77 100644 --- a/world/map/npc/031-1/frozenbeard.txt +++ b/world/map/npc/031-1/frozenbeard.txt @@ -10,11 +10,11 @@ close; L_Frozenbeard_Argaes: - if (zeny < 500) + if (Zeny < 500) goto L_NoMoney; mes "[Frozenbeard]"; mes "\"Pleasant Journeys!\""; - set zeny, zeny-500; + set Zeny, Zeny-500; warp "008-1.gat",137,64; close; diff --git a/world/map/npc/031-1/house.txt b/world/map/npc/031-1/house.txt index aa0d4067..f6e5c299 100644 --- a/world/map/npc/031-1/house.txt +++ b/world/map/npc/031-1/house.txt @@ -11,6 +11,10 @@ if (@rescue_Cindy > 2) goto L_Warp; message strcharinfo(0), "The door is locked."; + + set @Q_Nivalis_state_MASK, 0; + set @Q_Nivalis_state_SHIFT, 0; + set @rescue_Cindy, 0; close; L_Warp: diff --git a/world/map/npc/031-2/angelaHouse.txt b/world/map/npc/031-2/angelaHouse.txt index dbc82681..4960a5f1 100644 --- a/world/map/npc/031-2/angelaHouse.txt +++ b/world/map/npc/031-2/angelaHouse.txt @@ -1,9 +1,7 @@ // author: Jenalya -// reviewed by: // state0, 1, 2: you shouldn't be able to come here // state3: it's your first visit, you can choose a reward // state4: you can do daily quests with white and yellow presents boxes -// 031-2.gat,29,28,0|script|Angela|196,{ @@ -16,7 +14,7 @@ if (@rescue_Cindy == 3) goto L_Reward; mes "..."; - close; + goto L_Close; L_Reward: mes "[Angela]"; @@ -43,11 +41,11 @@ L_Reward: mes "\"Usually, Yetis are very shy - I wonder why they did that. There is something strange going on.\""; next; mes "\"May I ask you for help again? I'll give you a small reward for every 3 boxes of one color you bring me.\""; - close; + goto L_Close; L_Full_Inv: mes "\"Oh, it seems you carry so much stuff - I will keep it for you until you can take it.\""; - close; + goto L_Close; L_Hello_Again: mes "[Angela]"; @@ -57,7 +55,7 @@ L_Hello_Again: "I just wanted to say hello.",-, "I have some yellow present boxes.",L_Yellow, "I have some white present boxes.",L_White; - close; + goto L_Close; L_Yellow: set @dq_level, 70; @@ -70,9 +68,9 @@ L_Yellow: callfunc "DailyQuest"; next; - if (@dq_return ==4) + if (@dq_return == 4) mes "\"Santa will be glad to have them back.\""; - close; + goto L_Close; L_White: set @dq_level, 80; @@ -85,8 +83,23 @@ L_White: callfunc "DailyQuest"; next; - if (@dq_return ==4) + if (@dq_return == 4) mes "\"You are a great help!\""; + goto L_Close; + +L_Close: + set @Q_Nivalis_state_MASK, 0; + set @Q_Nivalis_state_SHIFT, 0; + set @rescue_Cindy, 0; + + set @dq_level, 0; + set @dq_cost, 0; + set @dq_count, 0; + set @dq_name$, ""; + set @dq_friendly_name$, ""; + set @dq_money, 0; + set @dq_exp, 0; + set @dq_return, 0; close; S_Update_Mask: @@ -94,4 +107,4 @@ S_Update_Mask: (QUEST_Nivalis_state & ~(@Q_Nivalis_state_MASK)) | (@rescue_Cindy << @Q_Nivalis_state_SHIFT); return; -}
\ No newline at end of file +} diff --git a/world/map/npc/031-2/cindyHouse.txt b/world/map/npc/031-2/cindyHouse.txt index beae6e0a..13db7106 100644 --- a/world/map/npc/031-2/cindyHouse.txt +++ b/world/map/npc/031-2/cindyHouse.txt @@ -1,8 +1,6 @@ // author: Jenalya -// reviewed by: // state0,1,2: you shouldn't be able to reach this place // state3 and greater: Cindy is saved, she says one of some random phrases -// 031-2.gat,27,26,0|script|Cindy|197, { @@ -14,14 +12,13 @@ if (@rescue_Cindy > 2) goto L_Happy_Random; mes "..."; - close; + goto L_Close; L_Happy_Random: getinventorylist; set @candy, rand(50); - if (@inventorylist_count < 100 - && @candy == 42) - goto L_Candy; + if (@inventorylist_count < 100 && @candy == 42) + goto L_Candy; setarray @quote_Cindy$, "Thank you so much for rescuing me!", "My mother made really tasty cookies yesterday. But I already ate them all...", @@ -38,12 +35,22 @@ L_Happy_Random: set @quote$, "\"" + @quote_Cindy$[@random] + "\""; mes "[Cindy]"; mes @quote$; - close; + goto L_Close; L_Candy: mes "[Cindy]"; mes "\"Santa gave me some candy! Please, take that!\""; getitem "Candy", 1; + goto L_Close; + +L_Close: + set @Q_Nivalis_state_MASK, 0; + set @Q_Nivalis_state_SHIFT, 0; + set @rescue_Cindy, 0; + set @candy, 0; + set @inventorylist_count, 0; + set @random, 0; + set @quote$, ""; close; S_Update_Mask: diff --git a/world/map/npc/031-3/labyrinth.txt b/world/map/npc/031-3/labyrinth.txt index 2047582a..ae363a16 100644 --- a/world/map/npc/031-3/labyrinth.txt +++ b/world/map/npc/031-3/labyrinth.txt @@ -1,12 +1,5 @@ -//################################################################################# -//# -//# Conditional warp for yeti cave -//# -//# Authors: Jenalya -//# -//# reviewed by: -//# -//################################################################################# +// Conditional warp for yeti cave +// Authors: Jenalya 031-3.gat,46,24,0|script|#YetiBarrier|127,1,1,{ if ($@FIGHT_YETI_STATUS == 1) goto L_Blocked; diff --git a/world/map/npc/031-4/cindyCave.txt b/world/map/npc/031-4/cindyCave.txt index 6e811aa3..0c964708 100644 --- a/world/map/npc/031-4/cindyCave.txt +++ b/world/map/npc/031-4/cindyCave.txt @@ -1,5 +1,4 @@ // author: Jenalya -// reviewed by: // state0: Cindy is totally scared and does nothing helpful // state1: you are able to open the cage // state2: Cindy is saved, she gives you a reward (wizard hat or wooden staff) @@ -9,6 +8,7 @@ if ($@FIGHT_YETI_STATUS != 0) goto L_Yeti; set @KEYS_AMOUNT, 10; + set @minlevel, 70; set @Q_Nivalis_state_MASK, NIBBLE_5_MASK; set @Q_Nivalis_state_SHIFT, NIBBLE_5_SHIFT; @@ -25,7 +25,7 @@ mes "There is a little girl in a cage. As you come near, she starts to shiver and back off from you as far as she can in that small cage."; next; mes "You don't know what to do."; - close; + goto L_Close; L_Please_Help: mes "There is a little girl in a cage. As you come near, she starts to shiver and back off from you as far as she can in that small cage."; @@ -42,11 +42,11 @@ L_Please_Help: mes "\"But be careful. If the Yetis hear you, they will come!\""; menu "Try to open the cage", L_Try_Cage, - "Leave", -; - close; + "Leave", L_Close; + goto L_Close; L_Try_Cage: - if (baselevel < 70) + if (BaseLevel < @minlevel) goto L_To_Weak; if (countitem("TreasureKey") < @KEYS_AMOUNT) goto L_Not_Enough_Keys; @@ -68,16 +68,13 @@ L_Try_Cage: // without it, the first and second wave start nearly the same time areamonster "031-4.gat", 0, 0, 95, 91, "", 1072, 1, "Cindy::onPetDeath"; - startnpctimer; - goto L_Exit; - -L_Exit: - close; + initnpctimer; + goto L_Close; L_Yeti: mes "[Cindy]"; mes "\"Watch out, the Yetis!\""; - close; + goto L_Close; L_Reward: mes "[Cindy]"; @@ -108,23 +105,35 @@ L_Visit: mes "\"Thank you so much; please come to my home. It's the house at the beach.\""; next; mes "\"I'm sure my mother wants to thank you as well.\""; - close; + goto L_Close; L_Please_Visit: mes "[Cindy]"; mes "\"Thank you, thank you! You're a hero! Please come home with me to our house at the beach!\""; - close; + goto L_Close; L_To_Weak: mes "You try to open the cage, but it's stuck. It seems you're too weak!"; - close; + goto L_Close; L_Not_Enough_Keys: mes "You don't have enough keys to open the cage."; - close; + goto L_Close; L_Full_Inv: mes "\"Oh, it seems you carry so much stuff - I will keep it for you until you can take it.\""; + goto L_Close; + +L_Close: + set @KEYS_AMOUNT, 0; + set @Q_Nivalis_state_MASK, 0; + set @Q_Nivalis_state_SHIFT, 0; + set @rescue_Cindy, 0; + set @title$, ""; + set @minlevel, 0; + set @inventorylist_count, 0; + cleararray @wizardhats, 0, 10; + set @reward, 0; close; // Fight logic attached to npc @@ -223,16 +232,15 @@ onPetDeath: set $@YETI_COUNT, $@YETI_COUNT - 1; end; -onInit: - initnpctimer; - stopnpctimer; - L_CleanUp: areatimer "031-4.gat", 0, 0, 95, 91, 10, "Cindy::onReward"; set $@FIGHT_YETI_STATUS, 0; set $@FIGHT_YETI_PLAYER_COUNT, 0; set $@FIGHT_YETI_WAVE, 1; set $@FIGHT_YETI_ROUND_TIMER, 0; + set $@YETI_COUNT, 0; + set $@FIGHT_YETI_ROUND_PEN, 0; + set $@FIGHT_YETI_NUMBER, 0; killmonster "031-4.gat", "Cindy::onPetDeath"; stopnpctimer; setnpctimer 0; @@ -240,14 +248,22 @@ L_CleanUp: onReward: if (isdead()) end; - set @bonus, (baselevel/2); + set @bonus, (BaseLevel/2); set DailyQuestBonus, DailyQuestBonus + @bonus; message strcharinfo(0), "You feel a temporary rush of power and zest for action. " + @bonus + " daily bonus gained." ; + set @Q_Nivalis_state_MASK, NIBBLE_5_MASK; + set @Q_Nivalis_state_SHIFT, NIBBLE_5_SHIFT; + set @rescue_Cindy, ((QUEST_Nivalis_state & @Q_Nivalis_state_MASK) >> @Q_Nivalis_state_SHIFT); if (@rescue_Cindy != 1 ) - end; + goto L_End; set @rescue_Cindy, 2; callsub S_Update_Mask; message strcharinfo(0), "Cindy looks relieved and as if she wants to talk with you."; +L_End: + set @bonus, 0; + set @Q_Nivalis_state_MASK, 0; + set @Q_Nivalis_state_SHIFT, 0; + set @rescue_Cindy, 0; end; ///////// |