diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-04-09 11:00:49 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-04-09 11:00:49 -0300 |
commit | 8a4bf716002a017de77fe7df301ef8e4aaf00a2e (patch) | |
tree | 4947d0b015baad639fa07133369e9a09c8a468bc /npc/functions/shops.txt | |
download | serverdata-8a4bf716002a017de77fe7df301ef8e4aaf00a2e.tar.gz serverdata-8a4bf716002a017de77fe7df301ef8e4aaf00a2e.tar.bz2 serverdata-8a4bf716002a017de77fe7df301ef8e4aaf00a2e.tar.xz serverdata-8a4bf716002a017de77fe7df301ef8e4aaf00a2e.zip |
Initial commit
Diffstat (limited to 'npc/functions/shops.txt')
-rw-r--r-- | npc/functions/shops.txt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/npc/functions/shops.txt b/npc/functions/shops.txt new file mode 100644 index 00000000..8962997e --- /dev/null +++ b/npc/functions/shops.txt @@ -0,0 +1,18 @@ +// Evol functions. +// Author: +// 4144 +// Jesusalva +// Description: +// Shops utility functions + + + +// restoreshopitem(<item nameid>, <amount>{, <price>}) +// adds back an item to the sell list if less than the specified amount +// returns true + +function script restoreshopitem { + if (shopcount(getarg(0)) < getarg(1)) + sellitem(getarg(0), getarg(2, -1), getarg(1)); + return; +} |