diff options
author | mekolat <mekolat@users.noreply.github.com> | 2015-05-04 12:26:03 -0400 |
---|---|---|
committer | mekolat <mekolat@users.noreply.github.com> | 2015-05-13 09:57:58 -0400 |
commit | b5c7cd1fd409489279a752b45f40fa3684434ae7 (patch) | |
tree | 76c82012659d59ac3195f467e25136ea8287c53e /world | |
parent | 833c70cf2ada6b6015ed49fc3f98c9aa4bb4ad4c (diff) | |
download | serverdata-b5c7cd1fd409489279a752b45f40fa3684434ae7.tar.gz serverdata-b5c7cd1fd409489279a752b45f40fa3684434ae7.tar.bz2 serverdata-b5c7cd1fd409489279a752b45f40fa3684434ae7.tar.xz serverdata-b5c7cd1fd409489279a752b45f40fa3684434ae7.zip |
convert cindy quest
Diffstat (limited to 'world')
-rw-r--r-- | world/map/db/quest-log.txt | 1 | ||||
-rw-r--r-- | world/map/npc/009-1/milly.txt | 6 | ||||
-rw-r--r-- | world/map/npc/031-1/angelaOutside.txt | 49 | ||||
-rw-r--r-- | world/map/npc/031-1/house.txt | 15 | ||||
-rw-r--r-- | world/map/npc/031-2/angelaHouse.txt | 22 | ||||
-rw-r--r-- | world/map/npc/031-2/cindyHouse.txt | 10 | ||||
-rw-r--r-- | world/map/npc/031-4/cindyCave.txt | 38 |
7 files changed, 49 insertions, 92 deletions
diff --git a/world/map/db/quest-log.txt b/world/map/db/quest-log.txt index ab1fd166..f623957d 100644 --- a/world/map/db/quest-log.txt +++ b/world/map/db/quest-log.txt @@ -18,3 +18,4 @@ // KAIZEI // 7,QL_WELL,QUEST_Nivalis_state,4,4 +8,QL_CINDY,QUEST_Nivalis_state,5,4 diff --git a/world/map/npc/009-1/milly.txt b/world/map/npc/009-1/milly.txt index f1408619..97752990 100644 --- a/world/map/npc/009-1/milly.txt +++ b/world/map/npc/009-1/milly.txt @@ -13,7 +13,7 @@ set @got_boneknife, ((QUEST_Forestbow_state & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT) >= 4; set @got_setzer, ((QUEST_Forestbow_state & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT) >= 8; set @saved_rossy, (FLAGS & FLAG_ROSSI_COMPLETED); - set @saved_cindy, ((QUEST_Nivalis_state & NIBBLE_5_MASK) >> NIBBLE_5_SHIFT) >= 4; + set @saved_cindy, QL_CINDY >= 4; if (FLAGS & FLAG_GOT_BEANIEHAT) goto L_FinishedGood; if (FLAGS & FLAG_DECLINED_BEANIEHAT) goto L_FinishedBad; @@ -416,7 +416,7 @@ L_DRossy: close; L_DCindy: - set QUEST_Nivalis_state, (QUEST_Nivalis_state & ~(NIBBLE_5_MASK)) | (4 << NIBBLE_5_SHIFT); + set QL_CINDY, 4; mes "Cindy quest set to completed."; close; @@ -442,7 +442,7 @@ L_NRossy: close; L_NCindy: - set QUEST_Nivalis_state, (QUEST_Nivalis_state & ~(NIBBLE_5_MASK)) | (0 << NIBBLE_5_SHIFT); + set QL_CINDY, 0; mes "Cindy quest set to not completed."; close; diff --git a/world/map/npc/031-1/angelaOutside.txt b/world/map/npc/031-1/angelaOutside.txt index 17bfff00..4b0c5db5 100644 --- a/world/map/npc/031-1/angelaOutside.txt +++ b/world/map/npc/031-1/angelaOutside.txt @@ -4,18 +4,41 @@ // state2 and state3: Cindy is saved Angela invites you to visit them for giving a reward // state greater than 3: Angela invites and asks you to bring present boxes -031-1,79,24,0|script|Angela|195 +031-1,81,24,0|script|Debug#Angela|195 { - set @Q_Nivalis_state_MASK, NIBBLE_5_MASK; - set @Q_Nivalis_state_SHIFT, NIBBLE_5_SHIFT; + mes "Current state: " + QL_CINDY; + mes "---"; + mes "Available states:"; + mes "0 - does not have the quest."; + mes "1 - got the quest."; + mes "2 - rescued cindy."; + mes "3 - got reward from cindy."; + mes "4 - got reward from angela."; + menu + "set state", L_Set, + "close", L_Close; + +L_Set: + input @state; + if(@state < 0 || @state > 4) set @state, 0; + set QL_CINDY, @state; + goto L_Close; - set @rescue_Cindy, ((QUEST_Nivalis_state & @Q_Nivalis_state_MASK) >> @Q_Nivalis_state_SHIFT); +L_Close: + close; +OnInit: + if (!debug) disablenpc strnpcinfo(0); + end; +} + +031-1,79,24,0|script|Angela|195 +{ 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; + if (QL_CINDY > 3) goto L_Please_Visit_Again; + if (QL_CINDY > 1) goto L_Please_Visit; + if (QL_CINDY == 1) goto L_Please_Help; mes "[Angela]"; mes "\"Please, I need help! My little daughter!\""; @@ -75,8 +98,7 @@ L_Calm_Down: mes "\"Oh my poor little girl. I'm so worried - what might they do with her? Oh no!\""; next; 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; + set QL_CINDY, 1; goto L_Close; L_No_Potion: @@ -103,15 +125,6 @@ L_Please_Visit_Again: 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: - set QUEST_Nivalis_state, - (QUEST_Nivalis_state & ~(@Q_Nivalis_state_MASK)) - | (@rescue_Cindy << @Q_Nivalis_state_SHIFT); - return; } diff --git a/world/map/npc/031-1/house.txt b/world/map/npc/031-1/house.txt index c64009ba..bf678666 100644 --- a/world/map/npc/031-1/house.txt +++ b/world/map/npc/031-1/house.txt @@ -4,19 +4,10 @@ 031-1,95,80,0|script|#Door|45,0,0 { - 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 > 2) + if (QL_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; + message strcharinfo(0), "##3Door : ##BThe door is locked."; + end; L_Warp: warp "031-2", 23, 28; diff --git a/world/map/npc/031-2/angelaHouse.txt b/world/map/npc/031-2/angelaHouse.txt index 3fe6f023..11eeaff6 100644 --- a/world/map/npc/031-2/angelaHouse.txt +++ b/world/map/npc/031-2/angelaHouse.txt @@ -5,13 +5,8 @@ 031-2,29,28,0|script|Angela#house|196 { - 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 == 4) goto L_Hello_Again; - if (@rescue_Cindy == 3) goto L_Reward; + if (QL_CINDY == 4) goto L_Hello_Again; + if (QL_CINDY == 3) goto L_Reward; mes "..."; goto L_Close; @@ -30,8 +25,7 @@ L_Reward: if (@inventorylist_count == 100) goto L_Full_Inv; getitem "RockKnife", 1; - set @rescue_Cindy, 4; - callsub S_Update_Mask; + set QL_CINDY, 4; next; mes "\"I hope this will be useful for you.\""; @@ -87,10 +81,6 @@ L_White: 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; @@ -100,10 +90,4 @@ L_Close: set @dq_exp, 0; set @dq_return, 0; close; - -S_Update_Mask: - set QUEST_Nivalis_state, - (QUEST_Nivalis_state & ~(@Q_Nivalis_state_MASK)) - | (@rescue_Cindy << @Q_Nivalis_state_SHIFT); - return; } diff --git a/world/map/npc/031-2/cindyHouse.txt b/world/map/npc/031-2/cindyHouse.txt index bd4c17fb..564e7935 100644 --- a/world/map/npc/031-2/cindyHouse.txt +++ b/world/map/npc/031-2/cindyHouse.txt @@ -4,12 +4,7 @@ 031-2,27,26,0|script|Cindy#house|197 { - 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 > 2) goto L_Happy_Random; + if (QL_CINDY > 2) goto L_Happy_Random; mes "..."; goto L_Close; @@ -44,9 +39,6 @@ L_Candy: 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; diff --git a/world/map/npc/031-4/cindyCave.txt b/world/map/npc/031-4/cindyCave.txt index 218e4c08..6459a047 100644 --- a/world/map/npc/031-4/cindyCave.txt +++ b/world/map/npc/031-4/cindyCave.txt @@ -11,17 +11,12 @@ set @KEYS_AMOUNT, 10; set @minlevel, 70; - 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 (Sex == 0) set @title$, "Misses"; if (Sex == 1) set @title$, "Mister"; - if (@rescue_Cindy >= 3) goto L_Please_Visit; - if (@rescue_Cindy == 2) goto L_Reward; - if (@rescue_Cindy == 1) goto L_Please_Help; + if (QL_CINDY >= 3) goto L_Please_Visit; + if (QL_CINDY == 2) goto L_Reward; + if (QL_CINDY == 1) goto 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."; next; @@ -89,16 +84,14 @@ L_Reward: if (@reward < 10) goto L_Wizard_Hat; getitem "WoodenStaff", 1; - set @rescue_Cindy, 3; - callsub S_Update_Mask; + set QL_CINDY, 3; goto L_Visit; L_Wizard_Hat: // get a wizard hat in one of the ten colors - no white setarray @wizardhats, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209; getitem @wizardhats[@reward], 1; - set @rescue_Cindy, 3; - callsub S_Update_Mask; + set QL_CINDY, 3; goto L_Visit; L_Visit: @@ -126,9 +119,6 @@ L_Full_Inv: 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; @@ -216,13 +206,9 @@ OnReward: 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 ) + if (QL_CINDY != 1 ) goto L_End; - set @rescue_Cindy, 2; - callsub S_Update_Mask; + set QL_CINDY, 2; message strcharinfo(0), "Cindy looks relieved and as if she wants to talk with you."; set BOSS_POINTS, BOSS_POINTS + 70; message strcharinfo(0), "You gain 70 Boss Points giving you a total of " + BOSS_POINTS + "."; @@ -230,9 +216,6 @@ OnReward: L_End: set @bonus, 0; - set @Q_Nivalis_state_MASK, 0; - set @Q_Nivalis_state_SHIFT, 0; - set @rescue_Cindy, 0; end; OnInit: @@ -250,11 +233,4 @@ OnInit: "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, - (QUEST_Nivalis_state & ~(@Q_Nivalis_state_MASK)) - | (@rescue_Cindy << @Q_Nivalis_state_SHIFT); - return; } |