diff options
Diffstat (limited to 'world/map/npc/012-1')
-rw-r--r-- | world/map/npc/012-1/_import.txt | 1 | ||||
-rw-r--r-- | world/map/npc/012-1/flowerpentagram2.txt | 96 | ||||
-rw-r--r-- | world/map/npc/012-1/shops.txt | 71 |
3 files changed, 167 insertions, 1 deletions
diff --git a/world/map/npc/012-1/_import.txt b/world/map/npc/012-1/_import.txt index 095de153..0829616e 100644 --- a/world/map/npc/012-1/_import.txt +++ b/world/map/npc/012-1/_import.txt @@ -4,5 +4,6 @@ map: 012-1.gat npc: npc/012-1/_mobs.txt npc: npc/012-1/_warps.txt npc: npc/012-1/amrak.txt +npc: npc/012-1/flowerpentagram2.txt npc: npc/012-1/injured-mouboo.txt npc: npc/012-1/shops.txt diff --git a/world/map/npc/012-1/flowerpentagram2.txt b/world/map/npc/012-1/flowerpentagram2.txt new file mode 100644 index 00000000..688a7639 --- /dev/null +++ b/world/map/npc/012-1/flowerpentagram2.txt @@ -0,0 +1,96 @@ +// Author: Jenalya + +012-1.gat,143,70,0|script|#FlowerPentagram2|400,{ + + if (OrumQuest >= 31) goto L_PlacedFifthFlower; + + if (OrumQuest > 20) goto L_PlacedSecondFlower; + if (OrumQuest == 20) goto L_SecondFlower; + + message strcharinfo(0), "Something is odd with this place."; + end; + +L_SecondFlower: + mes "Orum described this place. Here you have to place the second magical flower."; + menu + "Place the flower.", -, + "Leave.", L_Close; + + if (isin("012-1.gat", 142, 69, 144, 71)) + goto L_Place; + + mes "This doesn't work, you're too far away."; + goto L_Close; + +L_Place: + set @localMonsterCount, + mobcount("012-1.gat", "#FlowerPentagram2::OnSquirrelDeath") + + mobcount("012-1.gat", "#FlowerPentagram2::OnMushroomDeath") + + mobcount("012-1.gat", "#FlowerPentagram2::OnScorpionDeath") + + mobcount("012-1.gat", "#FlowerPentagram2::OnRScorpionDeath") + + 4; // the mobcount function has an offset of -1, so we add 4 to have the actual amount of monsters + if (@localMonsterCount > 2) + goto L_MonstersAlive; + + if (countitem("PurpleSummonFlower") < 1) + goto L_NoFlower; + delitem "PurpleSummonFlower", 1; + mes "Remembering what happened last time, you take a careful look around. Everything's calm. You proceed and place the second flower."; + mes "Tension builds up around you. You're alarmed."; + set OrumQuest, 21; + close2; + areamonster "012-1.gat", 140, 64, 146, 73, "", 1105, 2, "#FlowerPentagram2::OnSquirrelDeath"; + areamonster "012-1.gat", 140, 64, 146, 73, "", 1106, 2, "#FlowerPentagram2::OnMushroomDeath"; + areamonster "012-1.gat", 140, 64, 146, 73, "", 1003, 2, "#FlowerPentagram2::OnScorpionDeath"; + areamonster "012-1.gat", 140, 64, 146, 73, "", 1004, 2, "#FlowerPentagram2::OnRScorpionDeath"; + set @value, 15; + callfunc "QuestSagathaAnnoy"; + set @value, 0; + end; + +OnSquirrelDeath: + set @mobID, 1105; + callfunc "MobPoints"; + end; + +OnMushroomDeath: + set @mobID, 1106; + callfunc "MobPoints"; + end; + +OnScorpionDeath: + set @mobID, 1003; + callfunc "MobPoints"; + end; + +OnRScorpionDeath: + set @mobID, 1004; + callfunc "MobPoints"; + end; + +L_MonstersAlive: + mes "As you get closer to the place, you feel an unnerving presence."; + mes "The place has recently been used to summon something! And the beings are still near!"; + next; + mes "You should get rid of them before attempting the summoning yourself."; + goto L_Close; + +L_NoFlower: + mes "You look into your pocket, but the flower isn't there. Where did you put it?"; + mes "If you can't find it again, better talk to Orum."; + goto L_Close; + +L_PlacedSecondFlower: + mes "On this spot you placed the second of Orum's magical flowers."; + mes "There's a slight glowing of magic power around the place, waiting to be unleashed."; + goto L_Close; + +L_PlacedFifthFlower: + mes "This is the place where you put the second of Orum's magical flowers."; + mes "But after the pentagram was finished and the summoning happened, everything is back to normal with this spot."; + goto L_Close; + +L_Close: + set @localMonsterCount, 0; + close; +} diff --git a/world/map/npc/012-1/shops.txt b/world/map/npc/012-1/shops.txt index 2c48b9b6..d82eea64 100644 --- a/world/map/npc/012-1/shops.txt +++ b/world/map/npc/012-1/shops.txt @@ -1,3 +1,72 @@ // -012-1.gat,36,99,0|shop|Blossom|163,RedRose :-1,PinkRose :-1,YellowRose :-1,WhiteRose :-1,OrangeRose :-1,DarkRedRose :-1,RedTulip :-1,PinkTulip :-1,YellowTulip :-1,WhiteTulip :-1,OrangeTulip :-1 +012-1.gat,36,99,0|shop|#FlowerShop|127,RedRose :-1,PinkRose :-1,YellowRose :-1,WhiteRose :-1,OrangeRose :-1,DarkRedRose :-1,RedTulip :-1,PinkTulip :-1,YellowTulip :-1,WhiteTulip :-1,OrangeTulip :-1 + +012-1.gat,36,99,0|script|Blossom|163,{ + + mes "[Blossom]"; + mes "\"Hello, would you like to buy some flowers?\""; + menu + "Sure.", L_Shop, + "Not right now.", L_Close, + "Can I trade this Rose Hat against a different one?", L_RoseHat; + +L_Shop: + shop "#FlowerShop"; + +L_RoseHat: + set @base_id, 897; + mes "[Blossom]"; + mes "\"Certainly, which color do you have?\""; + menu + "A red one.", -, + "A white one.", -, + "A pink one.", -, + "A yellow one.", -, + "A orange one.", -, + "A blue one.", -; + set @have_id, @base_id + @menu - 1; + + mes "[Blossom]"; + mes "\"And which color would you like?\""; + menu + "A red one.", -, + "A white one.", -, + "A pink one.", -, + "A yellow one.", -, + "A orange one.", -, + "A blue one.", -; + set @receive_id, @base_id + @menu - 1; + + if (@have_id == @receive_id) + goto L_SameColor; + if (countitem(@have_id) < 1) + goto L_NoItem; + delitem @have_id, 1; + getitem @receive_id, 1; + mes "[Blossom]"; + mes "\"Here it is.\""; + goto L_Close; + +L_NoItem: + mes "[Blossom]"; + mes "\"Oh, you don't have a Rose Hat in that color."; + mes "Did you mean something else?\""; + menu + "Yes, I meant a different color.", L_RoseHat, + "No, I changed my mind.", L_Close; + +L_SameColor: + mes "[Blossom]"; + mes "\"Oh, but it doesn't make sense to trade agains the same color."; + mes "Did you mean something else?\""; + menu + "Yes, let me correct.", L_RoseHat, + "No, I changed my mind.", L_Close; + +L_Close: + set @base_id, 0; + set @have_id, 0; + set @receive_id, 0; + close; +} |