summaryrefslogblamecommitdiff
path: root/npc/functions/shops.txt
blob: 6e1a5780e0235dc903d2c1b093f91fea05f16251 (plain) (tree)
1
2
3
4
5
6
7
8
9
10


                  
               


                             
                                      

                                         









                                              

           
// Evol functions.
// Author:
//    4144
//    Jesusalva
// Description:
//    Shops utility functions
// Variables:
//    Item ID, Item Price, Item Amount

function	script	restoreshopitem	{
    if (getarg(2) < 1) {
        .@amount=getarg(1);
        .@price=-1;
    } else {
        .@amount=getarg(2);
        .@price=getarg(1);
    }

    if (shopcount(getarg(0)) < .@amount)
        sellitem getarg(0), .@price, .@amount;
    return;
}