summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/items/legacy_heal.txt5
-rw-r--r--npc/items/rand_sc_heal.txt2
2 files changed, 4 insertions, 3 deletions
diff --git a/npc/items/legacy_heal.txt b/npc/items/legacy_heal.txt
index f9e737234..2f3484080 100644
--- a/npc/items/legacy_heal.txt
+++ b/npc/items/legacy_heal.txt
@@ -30,11 +30,12 @@ function script ItHeal {
.@skill = SC_S_LIFEPOTION;
// Vitality can improve the healing amount
- .@min = max(.@max, .@min + (.@min * readparam2(bVit) / 100));
+ .@min = min(.@max, .@min + (.@min * readparam2(bVit) / 100));
.@max = .@max + (.@max * readparam2(bVit) / 240);
// Obtain the real healing
- @val1 = rand2(.@min, .@max);
+ @val1 = rand2(.@min, .@max) / .@delay;
+ debugmes "Heal %d-%d/%d = %d", .@min, .@max, .@delay, @val1;
.@delay *= 1000; // Put the delay in ms
diff --git a/npc/items/rand_sc_heal.txt b/npc/items/rand_sc_heal.txt
index 1bf582444..41ea3b3a7 100644
--- a/npc/items/rand_sc_heal.txt
+++ b/npc/items/rand_sc_heal.txt
@@ -57,7 +57,7 @@ function script ItHeal2 {
@val1 = rand2(.@min, .@max);
// Calculate delay if it was not given
- if (.@delay < 0) {
+ if (.@delay <= 0) {
.@delay=1 + ((.@type*3)/2);
}