Advertisement
kam726

Untitled

Sep 20th, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. local lastmove = 0
  2. local lastaa = 0
  3. local anim = 0
  4. local wind = 0
  5.  
  6. menu = MenuConfig("gso_twitch", "gso twitch")
  7. menu:KeyBinding("combo", "Combo", 32)
  8.  
  9. OnProcessSpellAttack(function(unit, aa)
  10. if unit == myHero then
  11. anim = aa.animationTime * 850
  12. wind = aa.windUpTime * 850
  13. lastaa = GetTickCount()
  14. end
  15. end)
  16.  
  17. OnTick(function()
  18. if menu.combo:Value() then
  19. local t = nil
  20. local num = 10000
  21. local r = myHero.range + myHero.boundingRadius
  22. for _, enemy in pairs(GetEnemyHeroes()) do
  23. if ValidTarget(enemy, r + enemy.boundingRadius) then
  24. local arm = enemy.armor
  25. local hp = enemy.health * (arm/(arm+100))
  26. if hp < num then
  27. num = hp
  28. t = enemy
  29. end
  30. end
  31. end
  32. if t ~= nil then
  33. if GetTickCount() > lastaa + anim then
  34. AttackUnit(t)
  35. lastmove = 0
  36. elseif GetTickCount() > lastaa + wind and GetTickCount() > lastmove + 175 then
  37. MoveToXYZ(GetMousePos())
  38. lastmove = GetTickCount()
  39. end
  40. elseif GetTickCount() > lastaa + wind and GetTickCount() > lastmove + 175 then
  41. MoveToXYZ(GetMousePos())
  42. lastmove = GetTickCount()
  43. end
  44. end
  45. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement