sociophobia

Orianna

Jul 30th, 2015
542
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.03 KB | None | 0 0
  1. ballPos = nil
  2. rComboDmg = 0
  3. require('Inspired')
  4.  
  5.  
  6. OnLoop(function(myHero)
  7. if ballPos and (GetDistanceSqr(ballPos) <= (GetHitBox(myHero)*2+7)^2 or GetDistanceSqr(ballPos) > 1250*1250) then
  8. ballPos = nil
  9. end
  10. if ballPos then
  11. DrawCircle(ballPos.x,ballPos.y,ballPos.z,150,5,1000,0xff00ff00)
  12. end
  13. for _, unit in pairs(GetEnemyHeroes()) do
  14. if unit and CanUseSpell(myHero, _R) == READY then
  15. rComboDmg = CalcDamage(myHero, unit, 0, 105+105*GetCastLevel(myHero,_R)+1.2*GetBonusAP(myHero))
  16. if rComboDmg > 0 then
  17. DrawDmgOverHpBar(unit,GetCurrentHP(unit),0,rComboDmg,0xffffffff)
  18. end
  19. end
  20. end
  21. if not KeyIsDown(0x20) then return end
  22. local unit = GetTarget(1000, DAMAGE_MAGIC)
  23. if unit then
  24. local uPos = GetOrigin(unit)
  25. local QPred = GetPredictionForPlayer(ballPos or GetMyHeroPos(),unit,GetMoveSpeed(unit),1200,250,825,175,true,true)
  26. if CanUseSpell(myHero, _Q) == READY and QPred.HitChance == 1 and GetButtonValue("Q") then
  27. local pos = GenerateThrowPos(QPred.PredPos)
  28. CastSkillShot(_Q,pos.x,pos.y,pos.z)
  29. end
  30. if CanUseSpell(myHero, _W) == READY and GetDistanceSqr(ballPos or GetMyHeroPos(),GetOrigin(unit)) < 225*225 then
  31. CastTargetSpell(myHero, _W)
  32. end
  33. if CanUseSpell(myHero, _E) == READY and ballPos and GetDistanceSqr(ballPos,GetOrigin(unit)) < 80*80 and GetDistanceSqr(GetMyHeroPos(),GetOrigin(unit)) < GetDistanceSqr(GetMyHeroPos(),ballPos) then
  34. CastTargetSpell(myHero, _E)
  35. end
  36. if CanUseSpell(myHero, _R) == READY and CalcDamage(myHero, unit, 0, 105+105*GetCastLevel(myHero,_R)+1.2*GetBonusAP(myHero)) >= GetCurrentHP(unit) and CalcDamage(myHero, unit, 0, 105+105*GetCastLevel(myHero,_R)+1.2*GetBonusAP(myHero)) <= 0.25*GetCurrentHP(unit) and (GetDistanceSqr(ballPos or GetMyHeroPos(),GetOrigin(unit)) < 375*375) then
  37. CastTargetSpell(myHero, _R)
  38. end
  39. if CanUseSpell(myHero, _R) == READY and EnemiesAround(ballPos or GetMyHeroPos(), 375) >= 3 then
  40. CastTargetSpell(myHero, _R)
  41. end
  42. end
  43. for k,v in pairs(GetAllyHeroes()) do
  44. if IsInDistance(ally,1100) and IsObjectAlive(ally) and GetMaxHP(myHero)/100*GetCurrentLife(myHero)>25 and GetMaxHP(ally)/100*GetCurrentLife(myHero) < 15 then
  45. CastTargetSpell(ally,_E)
  46. end
  47. end)
  48.  
  49. OnProcessSpell(function(ally, spell)
  50. if unit and unit == GetMyHero() and spell and spell.name == "OrianaIzunaCommand" then
  51. ballPos = spell.endPos
  52. end
  53. if unit and unit == GetMyHero() and spell and spell.name == "OrianaRedactCommand" then
  54. ballPos = nil
  55. end
  56. if GetObjectName(ally) and GetObjectName(ally)== "LeeSin" and spell.name:lower():find("blindmonkqtwo") then
  57.  
  58. CastTargetSpell(unit,_E)
  59.  
  60. end
  61. if GetObjectName(ally) and GetObjectName(ally)== "Sejuani" and spell and spell.name== "SejuaniArcticAssaul" then
  62. CastTargetSpell(unit,_E)
  63. end
  64.  
  65. end)
  66.  
  67.  
  68. function GenerateThrowPos(pos)
  69. local tV = {x = (pos.x-GetMyHeroPos().x), z = (pos.z-GetMyHeroPos().z)}
  70. local len = math.sqrt(tV.x * tV.x + tV.z * tV.z)
  71. return {x = pos.x + 55 * tV.x / len, y = 0, z = pos.z + 55 * tV.z / len}
  72. end
Advertisement
Add Comment
Please, Sign In to add comment