Advertisement
Cloudhax23

Untitled

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