From 99f4e1606e8e4bd5c476d81758803da82476c5f4 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 11 Mar 2018 16:38:48 -0300 Subject: Allows restoreshopitems to take an optional price parameter. --- npc/functions/shops.txt | 11 ++++++++--- 1 file 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(, {, }) +// 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; } -- cgit v1.2.3-70-g09d2