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.txt18
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;
+}