Advertisement
Cloudhax23

Untitled

Jul 31st, 2015
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.22 KB | None | 0 0
  1. -- Requires
  2. require('IAC')
  3. require('twgank')
  4. --Menu
  5. Config = scriptConfig("Graves", "Graves.lua")
  6. Config.addParam("Q", "Use Q", SCRIPT_PARAM_ONOFF, true)
  7. Config.addParam("W", "Use W", SCRIPT_PARAM_ONOFF, true)
  8. Config.addParam("E", "Use E", SCRIPT_PARAM_ONOFF, true)
  9. Config.addParam("R", "Use R", SCRIPT_PARAM_ONOFF, true)
  10. --Start
  11. OnLoop(function(myHero)
  12. local target = GetCurrentTarget()
  13. if ValidTarget(target, math.huge) then
  14. if KeyIsDown(32) then
  15. castW(target)
  16. castQ(target)
  17. castE(target)
  18. castR(target)
  19. end
  20. end
  21. end
  22. -- End
  23. -- W cast
  24. )function castW( target )
  25. if Config.W then
  26. pred = GetPredictionForPlayer(GetOrigin(target),target,GetMoveSpeed(target),math.huge,500,GetCastRange(myHero,_W),900,false,true)
  27. if IsInDistance(target, GetCastRange(myHero,_W)) and CanUseSpell(myHero,_W) == READY and pred.HitChance == 1 then
  28. CastSkillShot(_W,pred.PredPos.x,pred.PredPos.y,pred.PredPos.z)
  29. end
  30. end
  31. -- Q cast
  32. function castQ( target )
  33. if Config.Q then
  34. pred = GetPredictionForPlayer(GetOrigin(target),target,GetMoveSpeed(target),math.huge,500,GetCastRange(myHero,_Q),900,false,true)
  35. if IsInDistance(target, GetCastRange(myHero,_Q)) and CanUseSpell(myHero,_Q) == READY and pred.HitChance == 1 then
  36. CastSkillShot(_Q,pred.PredPos.x,pred.PredPos.y,pred.PredPos.z)
  37. end
  38. end
  39. -- E cast
  40. end
  41. function castE( target )
  42. if Config.E then
  43. if IsInDistance(target, GetCastRange(myHero,_E)) and CanUseSpell(myHero,_E) == READY then
  44. CastSkillShot(_E, GetMousePos().x, GetMousePos().y, GetMousePos().z)
  45. end
  46. end
  47.  
  48. -- R cast
  49. function castR( target )
  50. if Config.R then
  51. pred = GetPredictionForPlayer(GetOrigin(target),target,GetMoveSpeed(target),math.huge,500,GetCastRange(myHero,_R),950,false,true)
  52. if IsInDistance(target, GetCastRange(myHero,_R)) and CanUseSpell(myHero,_R) == READY and pred.HitChance == 1 then
  53. CastSkillShot(_R,pred.PredPos.x,pred.PredPos.y,pred.PredPos.z)
  54. end
  55. end
  56. end
  57. end
  58. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement