summaryrefslogtreecommitdiff
path: root/npc/items/rand_mp_heal.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/items/rand_mp_heal.txt')
-rw-r--r--npc/items/rand_mp_heal.txt13
1 files changed, 10 insertions, 3 deletions
diff --git a/npc/items/rand_mp_heal.txt b/npc/items/rand_mp_heal.txt
index 918e02dc3..4b6a5ca11 100644
--- a/npc/items/rand_mp_heal.txt
+++ b/npc/items/rand_mp_heal.txt
@@ -8,10 +8,11 @@
// @max
// @delay
+function script MPHeal {
+ @delay = getarg(0);
+ @min = getarg(1);
+ @max = getarg(2);
-- script rand_mp_heal -1,{
-
-OnUse:
if (@delay <= 0) {
Exception("Invalid healing item, deleting without healing effect.");
end;
@@ -40,6 +41,12 @@ OnUse:
@delay=0;
@min=0;
@max=0;
+}
+
+- script rand_mp_heal -1,{
+
+OnUse:
+ MPHeal(@delay, @min, @max);
end;
// Script Heart