Advertisement
Guest User

Untitled

a guest
Dec 17th, 2014
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.87 KB | None | 0 0
  1.     for i, enemy in ipairs(GetEnemyHeroes()) do
  2.      if enemy and not enemy.dead then
  3.             local dist = GetDistance(enemy)
  4.             local edmg = cassdmg("e", enemy)
  5.             local rdmg = cassdmg("r", enemy)
  6.             if m.ks.ksr and Rready and Eready and dist < 680 and enemy.health < (edmg+rdmg) then
  7.                 CastSpell(_E, enemy)
  8.                 CastSpell(_R, enemy.x, enemy.z)
  9.             elseif m.ks.ksr and Rready and dist < 750 and enemy.health < rdmg then
  10.                 CastSpell(_R, enemy.x, enemy.z)
  11.             elseif m.ks.kse and Eready and dist < 690 and enemy.health < edmg then
  12.                 CastSpell(_E, enemy)
  13.             end
  14.         end
  15.     end
  16. function CastPreW(unit)
  17.     local CastPosition, HitChance, Position = VP:GetCircularAOECastPosition(target, 0.5, 90, 925, 2500, myHero)
  18.         if HitChance >= 2 then
  19.         CastSpell(_W, CastPosition.x, CastPosition.z)
  20.     end
  21. end
  22.  
  23. function cassdmg(spell, object)
  24.     if spell == "e" then
  25.         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)))
  26.         return dmg
  27.     elseif spell == "r" then
  28.         local dmg = ((50+100*myHero:GetSpellData(_R).level)+myHero.ap*0.5)*(100/(100+(object.magicArmor*myHero.magicPenPercent-myHero.magicPen)))
  29.         return dmg
  30.     end
  31. endfunction CastPreW(unit)
  32.     local CastPosition, HitChance, Position = VP:GetCircularAOECastPosition(target, 0.5, 90, 925, 2500, myHero)
  33.         if HitChance >= 2 then
  34.         CastSpell(_W, CastPosition.x, CastPosition.z)
  35.     end
  36. end
  37.  
  38. function cassdmg(spell, object)
  39.     if spell == "e" then
  40.         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)))
  41.         return dmg
  42.     elseif spell == "r" then
  43.         local dmg = ((50+100*myHero:GetSpellData(_R).level)+myHero.ap*0.5)*(100/(100+(object.magicArmor*myHero.magicPenPercent-myHero.magicPen)))
  44.         return dmg
  45.     end
  46. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement