Having issues with a function in a soraka script of mine, it is supposed to handle healing with w and r
However, it is having issues with the way I have the checks for ally health. Can anybody help me get this working?
function Heal() local needHeal = 0 for _, hero in pairs(GetAllyHeroes()) do if hero ~= myHero and ValidTarget(hero, Spells.W.range) and (GetCurrentHP(hero)/GetMaxHP(hero)) >= 0.8 and (GetCurrentMana(myHero)/GetMaxMana(myHero)) >= (Menu.Heal.Mana:Value()/100) then castTargetSpell(hero, _W) end if hero and (Menu.Heal.RHP:Value()/100) >= (GetCurrentHP(hero)/GetMaxHP(hero)) then needHeal = (needHeal + 1) if hero == myHero and Menu.Heal.RSelf:Value() then castR() end end end if needHeal >= Menu.Heal.RCount:Value() then castR() end end
Edited by hyyerrkid, 05 February 2018 - 07:10 .