From 6ff12609c964d8ba1b4fc5cb670996339224ba01 Mon Sep 17 00:00:00 2001 From: Jessica Tölke Date: Fri, 13 Jan 2012 23:45:24 +0100 Subject: Adding magic fertilizer quest --- world/map/npc/024-1/tinris.txt | 194 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 192 insertions(+), 2 deletions(-) (limited to 'world/map/npc/024-1/tinris.txt') diff --git a/world/map/npc/024-1/tinris.txt b/world/map/npc/024-1/tinris.txt index cbe0b886..88ab1d42 100644 --- a/world/map/npc/024-1/tinris.txt +++ b/world/map/npc/024-1/tinris.txt @@ -1,7 +1,197 @@ -// A gardener at Tulimshar's magic academy +// 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 024-1.gat,82,64,0|script|Tinris|160,{ + + set @state, ((QUEST_NorthTulimshar & $@magicfieldNT_MASK) >> $@magicfieldNT_SHIFT); + + set @cake_exp, 50; + set @sweater_exp, 400; + + set @slime_amount1, 6; + set @slime_amount2, 4; + set @bugleg_amount1, 4; + set @bugleg_amount2, 5; + set @stinger_amount1, 3; + set @stinger_amount2, 2; + set @ash_amount1, 1; + 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; + + 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) + goto L_Close; + menu + "The farmer Anwar sent me to ask for exactly that! Can you give me something for his field?",-; + mes "[Tinris]"; + mes "\"Well... in principle yes. I can try to prepare something for him. But...\""; + next; + mes "\"The thing is, my girlfriend and I have our anniversary today. And the teachers won't let me leave the campus to get something for her!"; + 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; + goto L_Close; + +L_Annual: // @state == 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 + "Fresh from the bakery!",-, + "I didn't get it yet.",L_Close; + if (countitem("ChocolateCake") < 1) + goto L_NoItem; + delitem "ChocolateCake", 1; + getexp @cake_exp, 0; + set @state, 3; + callsub S_Update_Mask; + mes "[Tinris]"; + mes "\"Oh, thank you! You saved me!"; + mes "Alright, now we can start with the magic fertilizer.\""; + next; +L_FirstTry: // @state == 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.\""; + menu + "I have it.",-, + "Ok, I'll go and get it.",L_Close; + if ((countitem("MaggotSlime") < @slime_amount1) || (countitem("BugLeg") < @bugleg_amount1) || (countitem("ScorpionStinger") < @stinger_amount1) || (countitem("PileOfAsh") < @ash_amount1)) + goto L_NoItem; + delitem "MaggotSlime", @slime_amount1; + delitem "BugLeg", @bugleg_amount1; + delitem "ScorpionStinger", @stinger_amount1; + delitem "PileOfAsh", @ash_amount1; + set @state, 4; + callsub S_Update_Mask; + mes "Tinris takes the things and starts to mix them together while mumbling some invocations."; + misceffect sfx_magic_nature; + next; + mes "[Tinris]"; + mes "\"Ok. This should do it. But I'm not sure. I'm still working on the researches about this topic."; + mes "Here, bring this to Anwar.\""; + mes "He gives you some bottle with the magic fertilizer. You put it away in a seperate pocket, so it doesn't get mixed with your inventory."; + goto L_Close; + +L_FirstTryDone: // @state >= 4 but below 6 + mes "[Tinris]"; + mes "\"Bring the fertilizer to Anwar and let me know if it worked.\""; + if (@state != 5) + goto L_Close; + menu + "I did, the plants went brown and shriveled.",-; + set @state, 6; + callsub S_Update_Mask; +L_SecondTry: // @state == 6 + mes "[Tinris]"; + mes "\"Oh no! Alright, 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.\""; + menu + "Here it is.",-, + "Ok, I'll go and get it.",L_Close; + if ((countitem("MaggotSlime") < @slime_amount2) || (countitem("BugLeg") < @bugleg_amount2) || (countitem("ScorpionStinger") < @stinger_amount2) || (countitem("PileOfAsh") < @ash_amount2) || (countitem("CactusPotion") < @cactusp_amount)) + goto L_NoItem; + delitem "MaggotSlime", @slime_amount2; + delitem "BugLeg", @bugleg_amount2; + delitem "ScorpionStinger", @stinger_amount2; + delitem "PileOfAsh", @ash_amount2; + delitem "CactusPotion", @cactusp_amount; + set @state, 7; + callsub S_Update_Mask; + mes "Tinris takes the things and starts to mix and mumble again."; + misceffect sfx_magic_nature; + next; + mes "I takes quite a while."; + next; + mes "He looks rather stressed while working on the mixture."; + next; + mes "He sighs."; mes "[Tinris]"; - mes "\"This is a magic school.\""; + mes "\"Mh, I think the mixture itself is good. But I can't get the spells right. Maybe you should ask Professor Eomie to cast it, she's a genius regarding nature magic.\""; + mes "He gives you the bottle with the magic fertilizer."; + goto L_Close; + +L_Eomie: // @state >= 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 + mes "[Tinris]"; + mes "\"I heard Eomie casted the spell? I really hope it'll work this time. Bring the magic fertilizer to Anwar now.\""; + goto L_Close; + +L_GiveGift: // @state == 11 + mes "[Tinris]"; + mes "\"Ah, did Anwar try the new fertilizer?\""; + menu + "Yes, it works great and he sent me to give you this selfmade Green V-Neck Sweater.",-, + "Not yet.",L_Close; + if (countitem("GreenVNeckSweater") < 1) + goto L_NoItem; + delitem "GreenVNeckSweater", 1; + getexp @sweater_exp, 0; + set @state, 12; + callsub S_Update_Mask; + mes "[Tinris]"; + mes "\"Hey, that's really nice. Tell him my thanks.\""; + goto L_Close; + +L_Done: // @state >= 12 + mes "[Tinris]"; + mes "\"My girlfriend was very happy about the Chocolate Cake and Professor Eomie was happy about my work on the magic fertilizer.\""; + mes "He twinkels."; + mes "[Tinris]"; + mes "\"We're a good team.\""; + goto L_Close; + +L_NoItem: + mes "[Tinris]"; + mes "\"You don't have it!\""; + goto L_Close; + +L_Close: + set @state, 0; + set @slime_amount1, 0; + set @slime_amount2, 0; + set @bugleg_amount1, 0; + set @bugleg_amount2, 0; + set @stinger_amount1, 0; + set @stinger_amount2, 0; + set @ash_amount1, 0; + set @ash_amount2, 0; + set @cactusp_amount, 0; close; + +S_Update_Mask: + set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~($@magicfieldNT_MASK)) | (@state << $@magicfieldNT_SHIFT); + return; } -- cgit v1.2.3-60-g2f50