diff options
author | Jesusaves <cpntb1@ymail.com> | 2018-03-11 16:38:48 -0300 |
---|---|---|
committer | gumi <git@gumi.ca> | 2018-03-14 13:55:21 -0400 |
commit | 99f4e1606e8e4bd5c476d81758803da82476c5f4 (patch) | |
tree | c0c1f109ea9efb3a3c41af37a9d0a9bef10351b9 | |
parent | f1816342347f8f2ccf9623603f0cf9014e4f36b6 (diff) | |
download | serverdata-99f4e1606e8e4bd5c476d81758803da82476c5f4.tar.gz serverdata-99f4e1606e8e4bd5c476d81758803da82476c5f4.tar.bz2 serverdata-99f4e1606e8e4bd5c476d81758803da82476c5f4.tar.xz serverdata-99f4e1606e8e4bd5c476d81758803da82476c5f4.zip |
Allows restoreshopitems to take an optional price parameter.
-rw-r--r-- | npc/functions/shops.txt | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/npc/functions/shops.txt b/npc/functions/shops.txt index 79890e81..8962997e 100644 --- a/npc/functions/shops.txt +++ b/npc/functions/shops.txt @@ -1,13 +1,18 @@ // Evol functions. // Author: // 4144 +// Jesusalva // Description: // Shops utility functions -// Variables: -// none + + + +// 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), -1, getarg(1); + sellitem(getarg(0), getarg(2, -1), getarg(1)); return; } |