diff options
author | Jessica Tölke <jtoelke@mail.upb.de> | 2013-06-09 13:15:25 +0200 |
---|---|---|
committer | Jessica Tölke <jtoelke@mail.upb.de> | 2013-06-09 19:19:34 +0200 |
commit | 7006007a2338d97bbbe071eb5c83a6ca2a01c03a (patch) | |
tree | 22688ae30a6d2f155cd0c4d8cb1cd77232226725 /world/map | |
parent | bc9bedd8b3e0cf91a0dfbabd9c533d5b6361e418 (diff) | |
download | serverdata-7006007a2338d97bbbe071eb5c83a6ca2a01c03a.tar.gz serverdata-7006007a2338d97bbbe071eb5c83a6ca2a01c03a.tar.bz2 serverdata-7006007a2338d97bbbe071eb5c83a6ca2a01c03a.tar.xz serverdata-7006007a2338d97bbbe071eb5c83a6ca2a01c03a.zip |
Add logic to Blossom to trade Rose Hats against Rose Hats in different colors.
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; +} |