summaryrefslogblamecommitdiff
path: root/world/map/npc/012-1/shops.txt
blob: c746811132b593a1f5bba9313e64284047e967f2 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11

  
                                                                                                                                                                                                     
 
                                    
 




                                                         
                                                                              

       
           






                                                  







                                      
                                       



                                              







                                       
                                          













                                                         
                                            





                                                     

                                                      
        
                                                         



                                          

                       

          
//

012-1.gat,36,99,0|shop|#FlowerShop|127,RedRose:*80,PinkRose:*80,YellowRose:*80,WhiteRose:*80,OrangeRose:*80,DarkRedRose:*80,RedTulip:*80,PinkTulip:*80,YellowTulip:*80,WhiteTulip:*80,OrangeTulip:*80

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 for a differently colored one?", L_RoseHat;

L_Shop:
    close2;
    shop "#FlowerShop";

L_RoseHat:
    set @base_id, 897;
    mes "[Blossom]";
    mes "\"Certainly, which color do you have?\"";
    menu
        "A red one.", L_MenuItems,
        "A white one.", L_MenuItems,
        "A pink one.", L_MenuItems,
        "A yellow one.", L_MenuItems,
        "An orange one.", L_MenuItems,
        "A blue one.", L_MenuItems;

L_MenuItems:
    set @have_id, @base_id + @menu - 1;

    mes "[Blossom]";
    mes "\"And which color would you like?\"";
    menu
        "A red one.", L_MenuItems1,
        "A white one.", L_MenuItems1,
        "A pink one.", L_MenuItems1,
        "A yellow one.", L_MenuItems1,
        "An orange one.", L_MenuItems1,
        "A blue one.", L_MenuItems1;

L_MenuItems1:
    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 a different color?\"";
    menu
        "Yes, I meant a different color.", L_RoseHat,
        "No, I changed my mind.", L_Close;

L_SameColor:
    mes "[Blossom]";
    mes "\"Oh, you already have a hat in that color.";
    mes "Did you want something else?\"";
    menu
        "Yes, let me pick a different color.", L_RoseHat,
        "No, I changed my mind.", L_Close;

L_Close:
    set @base_id, 0;
    set @have_id, 0;
    set @receive_id, 0;
    close;
}