summaryrefslogtreecommitdiff
path: root/npc/items/legacy_heal.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-05-19 19:00:05 -0300
committerJesusaves <cpntb1@ymail.com>2022-05-19 19:00:05 -0300
commit4196c9f78f2e05ae832bc4be7d3b3c9b2b01f113 (patch)
treebdaec893e42793f3d38bf8a8b9071234dc900a84 /npc/items/legacy_heal.txt
parentf92b2d13b09cc87736b15a878f2d0255f7474433 (diff)
downloadserverdata-4196c9f78f2e05ae832bc4be7d3b3c9b2b01f113.tar.gz
serverdata-4196c9f78f2e05ae832bc4be7d3b3c9b2b01f113.tar.bz2
serverdata-4196c9f78f2e05ae832bc4be7d3b3c9b2b01f113.tar.xz
serverdata-4196c9f78f2e05ae832bc4be7d3b3c9b2b01f113.zip
Fix more bugs on healing items
Diffstat (limited to 'npc/items/legacy_heal.txt')
-rw-r--r--npc/items/legacy_heal.txt5
1 files changed, 3 insertions, 2 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