Advertisement
Guest User

Untitled

a guest
Jan 27th, 2017
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.65 KB | None | 0 0
  1. local vayne = false
  2.  
  3. if myHero.charName == "Vayne" then
  4. vayne = true
  5. end
  6.  
  7. local lastmove = 0
  8.  
  9. local menu = MenuElement({id = "ParaMenu", name = "ParaOrb", type = MENU})
  10. menu:MenuElement({id = "combo", name = "Combo Key", key = string.byte(" ")})
  11.  
  12. function Orb()
  13. local et = myHero.attackData.endTime
  14. local wd = myHero.attackData.windDownTime
  15. if vayne then
  16. if Ready(_Q) and Game.Timer() > et - wd - 0.75 and Game.Timer() < et - (wd*0.25) then
  17. Control.CastSpell(HK_Q, mousePos)
  18. end
  19. end
  20. local t = GetAATarget(myHero.range + myHero.boundingRadius)
  21. if t == nil then
  22. if Game.Timer() > et - wd - 0.75 and GetTickCount() > lastmove + 175 then
  23. lastmove = GetTickCount()
  24. Control.Move()
  25. end
  26. return
  27. end
  28. if Game.Timer() > et then
  29. Control.Attack(t)
  30. return
  31. end
  32. if Game.Timer() > et - wd - 0.75 and GetTickCount() > lastmove + 175 then
  33. lastmove = GetTickCount()
  34. Control.Move()
  35. end
  36. end
  37.  
  38. Callback.Add("Tick", function()
  39. if menu.combo:Value() then
  40. Orb()
  41. end
  42. end)
  43.  
  44. function ValidTarget(range, enemy)
  45. if enemy.distance < range and enemy.valid and not enemy.dead and enemy.isTargetable and enemy.visible then
  46. return true
  47. end
  48. return false
  49. end
  50.  
  51. function GetAATarget(range)
  52. local t = nil
  53. num = 10000
  54. for i = 1, Game.HeroCount() do
  55. local enemy = Game.Hero(i)
  56. if enemy.isEnemy then
  57. local armor = enemy.armor
  58. local hp = enemy.health * (armor/(armor+100))
  59. if ValidTarget(range+enemy.boundingRadius, enemy) then
  60. if hp < num then
  61. num = hp
  62. t = enemy
  63. end
  64. end
  65. end
  66. end
  67. return t
  68. end
  69.  
  70. function HasQBuff(slot)
  71. for i = 0, myHero.buffCount do
  72. local buff = myHero:GetBuff(i)
  73. if buff.count > 0 and buff.name == "vaynetumblebonus" then
  74. return true
  75. end
  76. end
  77. return false
  78. end
  79.  
  80. function Ready(slot)
  81. return (not HasQBuff(slot) and myHero:GetSpellData(slot).level >= 1 and myHero:GetSpellData(slot).currentCd == 0 and myHero.mana > myHero:GetSpellData(slot).mana)
  82. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement