summaryrefslogtreecommitdiff
path: root/npc/functions/shops.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions/shops.txt')
-rw-r--r--npc/functions/shops.txt11
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;
}