Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for i, enemy in ipairs(GetEnemyHeroes()) do
- if enemy and not enemy.dead then
- local dist = GetDistance(enemy)
- local edmg = cassdmg("e", enemy)
- local rdmg = cassdmg("r", enemy)
- if m.ks.ksr and Rready and Eready and dist < 680 and enemy.health < (edmg+rdmg) then
- CastSpell(_E, enemy)
- CastSpell(_R, enemy.x, enemy.z)
- elseif m.ks.ksr and Rready and dist < 750 and enemy.health < rdmg then
- CastSpell(_R, enemy.x, enemy.z)
- elseif m.ks.kse and Eready and dist < 690 and enemy.health < edmg then
- CastSpell(_E, enemy)
- end
- end
- end
- function CastPreW(unit)
- local CastPosition, HitChance, Position = VP:GetCircularAOECastPosition(target, 0.5, 90, 925, 2500, myHero)
- if HitChance >= 2 then
- CastSpell(_W, CastPosition.x, CastPosition.z)
- end
- end
- function cassdmg(spell, object)
- if spell == "e" then
- local dmg = ((30+25*myHero:GetSpellData(_E).level)+myHero.ap*(0.35+myHero:GetSpellData(_E).level*0.05))*(100/(100+(object.magicArmor*myHero.magicPenPercent-myHero.magicPen)))
- return dmg
- elseif spell == "r" then
- local dmg = ((50+100*myHero:GetSpellData(_R).level)+myHero.ap*0.5)*(100/(100+(object.magicArmor*myHero.magicPenPercent-myHero.magicPen)))
- return dmg
- end
- endfunction CastPreW(unit)
- local CastPosition, HitChance, Position = VP:GetCircularAOECastPosition(target, 0.5, 90, 925, 2500, myHero)
- if HitChance >= 2 then
- CastSpell(_W, CastPosition.x, CastPosition.z)
- end
- end
- function cassdmg(spell, object)
- if spell == "e" then
- local dmg = ((30+25*myHero:GetSpellData(_E).level)+myHero.ap*(0.35+myHero:GetSpellData(_E).level*0.05))*(100/(100+(object.magicArmor*myHero.magicPenPercent-myHero.magicPen)))
- return dmg
- elseif spell == "r" then
- local dmg = ((50+100*myHero:GetSpellData(_R).level)+myHero.ap*0.5)*(100/(100+(object.magicArmor*myHero.magicPenPercent-myHero.magicPen)))
- return dmg
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement