summaryrefslogblamecommitdiff
path: root/npc/014-1/galimatia.txt
blob: 745a2ec5cec2590b2a24450239f37b3a3018389f (plain) (tree)
1
2
3
4
5
6
7
8
9








                                                                                                                                                                     
                                 
                              























                                                                                                                                                                              
                              








                                                




                    
                                                              

        
// TMW2 scripts.
// Author:
//    Jesusalva
// Description:
//    A bee keeper

014-1,126,21,0	script	Galimatia	NPC_BEEKEEPER,{
    mesn;
    mesq l("Feel free to collect honey from the hives. Remember to bottle them before picking up... You can use the discardable bottles I keep near them for that.");
    if (!countitem(Honey)) close;
    if (BaseLevel < 30) close;
    next;
    mesn;
    mesq l("I can also pay %d GP per %s.", .price, getitemlink(Honey));
    if (countitem(BeeStinger)) mesc l("But if you bring me %d %s and %d %s and %s GP, I can give you a %s!", 20, getitemlink(BeeStinger), 10, getitemlink(Honey), fnum(3500));
    next;
    do
    {
        select
            rif(countitem(Honey), "Sell a honey for %d GP", .price),
            rif(countitem(Honey) >= 10 &&
                countitem(BeeStinger) >= 20 &&
                Zeny >= 3500, "Deal, I want the hat!"),
            l("Nice, thanks.");
        mes "";
        switch (@menu) {
        case 1:
            delitem Honey, 1;
            Zeny+=.price;
            break;
        case 2:
            delitem Honey, 10;
            delitem BeeStinger, 20;
            Zeny-=3500;
            getitem BeeKeeperHat, 1;
            getexp 5000, 4500;
            mesn;
            mesq l("Thanks, here is your hat!");
            close;
            break;
        case 3:
            close;
            break;
        }
    } while (true);
    close;

OnInit:
    .sex = G_FEMALE;
    .distance = 4;
    .price = getiteminfo(Honey, ITEMINFO_SELLPRICE) * 15 / 10;
    end;
}