Advertisement
Cloudhax23

Untitled

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