diff options
Diffstat (limited to 'world/map/npc/001-1')
-rw-r--r-- | world/map/npc/001-1/adrian.txt | 15 | ||||
-rw-r--r-- | world/map/npc/001-1/eomie.txt | 52 | ||||
-rw-r--r-- | world/map/npc/001-1/tinris.txt | 80 | ||||
-rw-r--r-- | world/map/npc/001-1/weellos.txt | 8 |
4 files changed, 38 insertions, 117 deletions
diff --git a/world/map/npc/001-1/adrian.txt b/world/map/npc/001-1/adrian.txt index de2966b5..9582cba5 100644 --- a/world/map/npc/001-1/adrian.txt +++ b/world/map/npc/001-1/adrian.txt @@ -1,17 +1,8 @@ -// part of quest given by 021-2/kylian.txt -// Author: Jenalya - -// state 1: player has the task to get the luggage from the harbor -// state 2: Adrian gave the luggage to the player -// state 3: player gave luggage to Kylian and Kylian asks who to talk to for the shop license - 001-1,113,64,0|script|Adrian|213 { - set @state, ((QUEST_NorthTulimshar & NIBBLE_5_MASK) >> NIBBLE_5_SHIFT); - mes "[Adrian]"; mes "\"Hello. Are you here to pick up some luggage?\""; - if (@state == 1) + if (QL_KYLIAN == 1) menu "Yes. Kylian sent me to get his luggage.",L_Get, "No.",L_No; @@ -37,8 +28,7 @@ L_Get: mes "\"Alright. Here it is. Good luck carrying that thing.\""; mes "Adrain hands you a very heavy suitcase."; getitem "LeatherSuitcase", 1; - set @state, 2; - set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~(NIBBLE_5_MASK)) | (@state << NIBBLE_5_SHIFT); + set QL_KYLIAN, 2; goto L_Close; L_Inventory: @@ -48,7 +38,6 @@ L_Inventory: goto L_Close; L_Close: - set @state, 0; set @inventorylist_count, 0; close; } diff --git a/world/map/npc/001-1/eomie.txt b/world/map/npc/001-1/eomie.txt index 99085bcf..65cee42e 100644 --- a/world/map/npc/001-1/eomie.txt +++ b/world/map/npc/001-1/eomie.txt @@ -1,40 +1,18 @@ -// A professor at Tulimshar's magic academy, involved in quest: -// Anwar needs a magic fertilizer for his field -// Quest uses Nibble 3 of QUEST_NorthTulimshar -// Author: Jenalya -// state 1: Anwar sent to Tinris for help to get a magic fertilizer -// state 2: Tinris asked for chocolate cake as present for his girlfriend -// state 3: Tinris asked for ingredients for the fertilizer -// state 4: Tinris gave you the fertilizer -// state 5: Anwar tried it out and it doesn't work well, sent you back to Tinris -// state 6: Tinris asked for more ingredients for a new try -// state 7: Tinris says it's really hard, gives you the fertilizer and tells you to ask Eomie to cast a spell on it -// state 8: Eomie sends you to get some stuff so she can interrupt her spell on the spot of grass -// state 9: Eomie casted a spell on the fertilizer -// state 10: Anwar used it and it worked. he asks you to help him preparing a thank-you-gift for each Tinris and Eomis -// state 11: Anwar asked to bring present to Tinris -// state 12: gave present to Tinris -// state 13: Anwar asked to bring present to Eomie -// state 14: gave present to Eomie -// state 15: reported back to Anwar and done - 001-1,71,23,0|script|Eomie|164 { - set @state, ((QUEST_NorthTulimshar & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT); - set @grass_amount, 5; set @water_amount, 2; set @ice_amount, 2; set @silk_exp, 600; - if (@state >= 14) goto L_Done; - if (@state >= 9) goto L_CastedSpell; - if (@state == 8) goto L_GetStuff; + if (QL_ANWAR >= 14) goto L_Done; + if (QL_ANWAR >= 9) goto L_CastedSpell; + if (QL_ANWAR == 8) goto L_GetStuff; mes "[Eomie]"; mes "\"I maintain this little oasis in the desert.\""; - if (@state != 7) + if (QL_ANWAR != 7) goto L_Close; menu "I need to learn a spell to use Tinris' magic fertilizer. Can you help me out?",L_Next; @@ -50,12 +28,11 @@ L_Next: L_Continue: mes "She hesitates."; - set @state, 8; - callsub S_Update_Mask; + set QL_ANWAR, 8; goto L_GetStuff; L_GetStuff: - // @state == 8 + // QL_ANWAR == 8 mes "[Eomie]"; mes "\"I could try to briefly interrupt my magic and then cast the spell on the fertilizer, but I would need to prepare the grass beforehand."; mes "Bring me " + @grass_amount + " " + getitemlink("GrassSeed") + ", " + @water_amount + " " + getitemlink("BottleOfWater") + ", and " + @ice_amount + " " + getitemlink("IceCube") + ".\""; @@ -71,8 +48,7 @@ L_More: delitem "GrassSeed", @grass_amount; delitem "BottleOfWater", @water_amount; delitem "IceCube", @ice_amount; - set @state, 9; - callsub S_Update_Mask; + set QL_ANWAR, 9; mes "[Eomie]"; mes "\"Very good!\""; mes "She takes the ingredients you brought her and uses them to cast a cool mist into the air."; @@ -98,10 +74,10 @@ L_Mine: // player asked how to get Ice Cubes mes "\"I heard that Ice Goblins were seen in the caves surrounding Nivalis. Maybe you can find " + getitemlink("IceCube") + " there.\""; goto L_Close; -L_CastedSpell: // @state >= 9 but below 14 +L_CastedSpell: // QL_ANWAR >= 9 but below 14 mes "[Eomie]"; mes "\"Thankfully, the grass wasn't damaged. I hope Anwar finds the magic fertilizer to be useful.\""; - if (@state != 13) + if (QL_ANWAR != 13) goto L_Close; menu "It was. He even created this Silk Headband as a present for you!",L_Present, @@ -112,14 +88,13 @@ L_Present: goto L_NoItem; delitem "SilkHeadband", 1; getexp @silk_exp, 0; - set @state, 14; - callsub S_Update_Mask; + set QL_ANWAR, 14; mes "[Eomie]"; mes "\"Oh, that's so nice of him! Please tell him that I really like it!\""; mes "She smiles."; goto L_Close; -L_Done: // @state >= 14 +L_Done: // QL_ANWAR >= 14 mes "[Eomie]"; mes "\"Hello! I'm happy to see someone like you so dedicated to the environment.\" %%8"; goto L_Close; @@ -130,13 +105,8 @@ L_NoItem: goto L_Close; L_Close: - set @state, 0; set @grass_amount, 0; set @water_amount, 0; set @ice_amount, 0; close; - -S_Update_Mask: - set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~(NIBBLE_3_MASK)) | (@state << NIBBLE_3_SHIFT); - return; } diff --git a/world/map/npc/001-1/tinris.txt b/world/map/npc/001-1/tinris.txt index 1a6aab33..2ae908bc 100644 --- a/world/map/npc/001-1/tinris.txt +++ b/world/map/npc/001-1/tinris.txt @@ -1,26 +1,5 @@ -// Anwar needs a magic fertilizer for his field -// Quest uses Nibble 3 of QUEST_NorthTulimshar -// Author: Jenalya -// state 1: Anwar sent to Tinris for help to get a magic fertilizer -// state 2: Tinris asked for chocolate cake as present for his girlfriend -// state 3: Tinris asked for ingredients for the fertilizer -// state 4: Tinris gave you the fertilizer -// state 5: Anwar tried it out and it doesn't work well, sent you back to Tinris -// state 6: Tinris asked for more ingredients for a new try -// state 7: Tinris says it's really hard, gives you the fertilizer and tells you to ask Eomie to cast a spell on it -// state 8: Eomie sends you to get some stuff so she can interrupt her spell on the spot of grass -// state 9: Eomie casted a spell on the fertilizer -// state 10: Anwar used it and it worked. he asks you to help him preparing a thank-you-gift for each Tinris and Eomis -// state 11: Anwar asked to bring present to Tinris -// state 12: gave present to Tinris -// state 13: Anwar asked to bring present to Eomie -// state 14: gave present to Eomie -// state 15: reported back to Anwar and done - 001-1,69,29,0|script|Tinris|160 { - set @state, ((QUEST_NorthTulimshar & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT); - set @cake_exp, 50; set @sweater_exp, 400; @@ -34,19 +13,19 @@ set @ash_amount2, 2; set @cactusp_amount, 1; - if (@state >= 12) goto L_Done; - if (@state == 11) goto L_GiveGift; - if (@state == 9) goto L_FertilizerDone; - if (@state >= 7) goto L_Eomie; - if (@state == 6) goto L_SecondTry; - if (@state >= 4) goto L_FirstTryDone; - if (@state == 3) goto L_FirstTry; - if (@state == 2) goto L_Annual; + if (QL_ANWAR >= 12) goto L_Done; + if (QL_ANWAR == 11) goto L_GiveGift; + if (QL_ANWAR == 9) goto L_FertilizerDone; + if (QL_ANWAR >= 7) goto L_Eomie; + if (QL_ANWAR == 6) goto L_SecondTry; + if (QL_ANWAR >= 4) goto L_FirstTryDone; + if (QL_ANWAR == 3) goto L_FirstTry; + if (QL_ANWAR == 2) goto L_Annual; mes "[Tinris]"; mes "\"This is a magic school. I'm a student here and focus on ways to magically enhance growth of plants."; mes "That topic is very important in a desert area.\""; - if (@state != 1) + if (QL_ANWAR != 1) goto L_Close; menu "The farmer Anwar sent me to ask for exactly that! Can you give me something for his field?",L_Next; @@ -59,11 +38,10 @@ L_Next: mes "Please go to the bakery and buy a Chocolate Cake for me. She loves Chocolate Cakes.\""; next; mes "\"When I have a present for her I can focus on creating some magic fertilizer.\""; - set @state, 2; - callsub S_Update_Mask; + set QL_ANWAR, 2; goto L_Close; -L_Annual: // @state == 2 +L_Annual: // QL_ANWAR == 2 mes "[Tinris]"; mes "\"Hello, did you get the Chocolate Cake for my girlfriend? After that I can focus on creating some magic fertilizer for you.\""; menu @@ -75,8 +53,7 @@ L_FreshFrom: goto L_NoItem; delitem "ChocolateCake", 1; getexp @cake_exp, 0; - set @state, 3; - callsub S_Update_Mask; + set QL_ANWAR, 3; mes "[Tinris]"; mes "\"Oh, thank you! You saved me!"; mes "All right, now we can start with the magic fertilizer.\""; @@ -84,7 +61,7 @@ L_FreshFrom: goto L_FirstTry; L_FirstTry: - // @state == 3 + // QL_ANWAR == 3 mes "[Tinris]"; mes "\"You need to bring me some ingredients."; mes "The ingredients are " + @slime_amount1 + " Maggot Slimes, " + @bugleg_amount1 + " Bug Legs, " + @stinger_amount1 + " Scorpion Stingers and " + @ash_amount1 + " Piles of Ash.\""; @@ -99,8 +76,7 @@ L_Continue: delitem "BugLeg", @bugleg_amount1; delitem "ScorpionStinger", @stinger_amount1; delitem "PileOfAsh", @ash_amount1; - set @state, 4; - callsub S_Update_Mask; + set QL_ANWAR, 4; mes "Tinris takes the things and starts to mix them together while mumbling some invocations."; misceffect sfx_magic_nature; next; @@ -110,21 +86,20 @@ L_Continue: mes "He gives you a bottle with the magic fertilizer. You put it away in a separate pocket, so it doesn't get mixed with your inventory."; goto L_Close; -L_FirstTryDone: // @state >= 4 but below 6 +L_FirstTryDone: // QL_ANWAR >= 4 but below 6 mes "[Tinris]"; mes "\"Bring the fertilizer to Anwar and let me know if it worked.\""; - if (@state != 5) + if (QL_ANWAR != 5) goto L_Close; menu "I did, the plants went brown and shriveled.",L_More; L_More: - set @state, 6; - callsub S_Update_Mask; + set QL_ANWAR, 6; goto L_SecondTry; L_SecondTry: - // @state == 6 + // QL_ANWAR == 6 mes "[Tinris]"; mes "\"Oh no! All right, we need to do another try."; mes "Bring me " + @slime_amount2 + " Maggot Slimes, " + @bugleg_amount2 + " Bug Legs, " + @stinger_amount2 + " Scorpion Stingers, " + @ash_amount2 + " Piles of Ash and " + @cactusp_amount + " Cactus Potion.\""; @@ -140,8 +115,7 @@ L_HereItIs: delitem "ScorpionStinger", @stinger_amount2; delitem "PileOfAsh", @ash_amount2; delitem "CactusPotion", @cactusp_amount; - set @state, 7; - callsub S_Update_Mask; + set QL_ANWAR, 7; mes "Tinris takes the things and starts to mix and mumble again."; misceffect sfx_magic_nature; next; @@ -156,19 +130,19 @@ L_HereItIs: goto L_Close; L_Eomie: - // @state >= 7 but below 9 + // QL_ANWAR >= 7 but below 9 mes "[Tinris]"; mes "\"I did the best I could, but it seems I'm not experienced enough to cast the spells correctly. Better ask Professor Eomie for help.\""; goto L_Close; L_FertilizerDone: - // @state == 9 + // QL_ANWAR == 9 mes "[Tinris]"; mes "\"I heard Eomie cast the spell? I really hope it'll work this time. Bring the magic fertilizer to Anwar now.\""; goto L_Close; L_GiveGift: - // @state == 11 + // QL_ANWAR == 11 mes "[Tinris]"; mes "\"Ah, did Anwar try the new fertilizer?\""; menu @@ -180,14 +154,13 @@ L_ItWorksGreat: goto L_NoItem; delitem "GreenVNeckSweater", 1; getexp @sweater_exp, 0; - set @state, 12; - callsub S_Update_Mask; + set QL_ANWAR, 12; mes "[Tinris]"; mes "\"Hey, that's really nice. Tell him my thanks.\""; goto L_Close; L_Done: - // @state >= 12 + // QL_ANWAR >= 12 mes "[Tinris]"; mes "\"My girlfriend was delighted with the Chocolate Cake and Professor Eomie was happy with my work on the magic fertilizer.\""; mes "He twinkles."; @@ -201,7 +174,6 @@ L_NoItem: goto L_Close; L_Close: - set @state, 0; set @slime_amount1, 0; set @slime_amount2, 0; set @bugleg_amount1, 0; @@ -212,8 +184,4 @@ L_Close: set @ash_amount2, 0; set @cactusp_amount, 0; close; - -S_Update_Mask: - set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~(NIBBLE_3_MASK)) | (@state << NIBBLE_3_SHIFT); - return; } diff --git a/world/map/npc/001-1/weellos.txt b/world/map/npc/001-1/weellos.txt index e49c6814..d5b76a27 100644 --- a/world/map/npc/001-1/weellos.txt +++ b/world/map/npc/001-1/weellos.txt @@ -1,13 +1,9 @@ -// A historian -// takes part in quest given by 021-2/kylian.txt - 001-1,55,25,0|script|Weellos|103 { set @halloween_npc_id, $@halloween_npc_weellos; callfunc "TrickOrTreat"; set QUEST_NorthTulimshar, QUEST_NorthTulimshar | $@knowWeellosNT; - set @kylian, ((QUEST_NorthTulimshar & NIBBLE_5_MASK) >> NIBBLE_5_SHIFT); if (isin("001-1", 48, 20, 61, 28)) goto L_In; @@ -19,20 +15,18 @@ mes "\"Due to its historical significance, part of it has been turned into a museum.\""; goto L_BeforeClose; -// If the player is inside the fence with Weellos L_In: mes "[Weellos]"; mes "\"What did you think? Isn't the building intriguing?\""; goto L_BeforeClose; L_BeforeClose: - if (@kylian != 4) + if (QL_KYLIAN != 4) goto L_Close; next; mes "You wonder if Kylian would be interested in seeing this historic landmark..."; goto L_Close; L_Close: - set @kylian, 0; close; } |