diff options
Diffstat (limited to 'world/map')
-rw-r--r-- | world/map/npc/012-1/shops.txt | 71 |
1 files changed, 70 insertions, 1 deletions
diff --git a/world/map/npc/012-1/shops.txt b/world/map/npc/012-1/shops.txt index 2c48b9b6..67c477e8 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 "@have_id: " + @have_id; + + 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; + mes "@receive_id: " + @receive_id; + + 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; + close; +} |