Re: Monk Spells
Posted: Thu Sep 04, 2014 3:45 pm
According to the data tab MinHeal (the 3rd parameter) is 1.1
so the code on the script just passes that value through, we want to heal for that % so we need to turn the 1.1 into a percentage, by dividing by 100, and multiply it by the targets max health to get the heal amount so it would be something like this
There is also a potential issue with float value vs the int that SpellHeal wants, so if this doesn't work as expected let me know, will have to look up the float vs int thing.
Code: Select all
-- Painbringer Component (instant heal)
if MinHeal ~= nil then
SpellHeal("Heal", MinHeal, 0, Caster)
-- ModifyHP(Caster, MinHeal) -- heals 2 every 3 seconds for 9 seconds
endCode: Select all
local HealAmount = (MinHeal / 100) * GetMaxHP(Caster)
SpellHeal("Heal", HealAmount, 0, Caster)