Advertisement
Cloudhax23

Untitled

Aug 12th, 2015
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.43 KB | None | 0 0
  1. if GetObjectName(GetMyHero()) == "Darius" then
  2. -- Requirements
  3. require('twgank')
  4. -- Keys
  5. Config = scriptConfig("IDarius", "Darius")
  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. AutoRConfig = scriptConfig("AT", "Auto R")
  10. AutoRConfig.addParam("R", "Auto R", SCRIPT_PARAM_ONOFF, true)
  11. -- PrintChat
  12. local info = "Evolved Darius Loaded"
  13. local upv = "Upvote if you like it!"
  14. local sig = "Made by Asserio"
  15. local ver = "v 1.0"
  16. textTable = {info,upv,sig,ver}
  17. PrintChat(textTable[1])
  18. PrintChat(textTable[2])
  19. PrintChat(textTable[3])
  20. PrintChat(textTable[4])
  21.  
  22. OnLoop(function(myHero)
  23. Killsteal()
  24. local unit = GetCurrentTarget()
  25. if ValidTarget(unit, 1400) then
  26. if IWalkConfig.Combo then
  27. local hp = GetCurrentHP(unit)
  28. local maxHP = GetMaxHP(unit)
  29. -- Darius E
  30. -- GetPredictionForPlayer(startPosition, targetUnit, targetUnitMoveSpeed, spellTravelSpeed, spellDelay, spellRange, spellWidth, collision, addHitBox)
  31. local EPred = GetPredictionForPlayer(GetMyHeroPos(),unit,GetMoveSpeed(unit),math.huge,300,550,80,false,true)
  32. if Config.E then
  33. if CanUseSpell(myHero, _E) == READY and EPred.HitChance == 1 then
  34. CastTargetSpell(unit, _E)
  35. end
  36. end
  37.  
  38. -- Darius Q
  39. if Config.Q then
  40. local QPred = GetPredictionForPlayer(GetMyHeroPos(),unit,GetMoveSpeed(unit),1700,250,475,50,true,true)
  41. if CanUseSpell(myHero, _Q) == READY and QPred.HitChance == 1 and IsInDistance(unit, 475) then
  42. CastSkillShot(_Q,QPred.PredPos.x,QPred.PredPos.y,QPred.PredPos.z)
  43. end
  44. end
  45. -- Darius W
  46. if Config.W then
  47. if CanUseSpell(myHero, _W) == READY and IsInDistance(unit, GetRange(myHero)) then
  48. CastTargetSpell(myHero, _W)
  49. end
  50. end
  51.  
  52.  
  53.  
  54. end
  55. end
  56. end)
  57.  
  58. function Killsteal()
  59. for i,enemy in pairs(GetEnemyHeroes()) do
  60. -- GetPredictionForPlayer(startPosition, targetUnit, targetUnitMoveSpeed, spellTravelSpeed, spellDelay, spellRange, spellWidth, collision, addHitBox)
  61. if CanUseSpell(myHero, _R) == READY and ValidTarget(enemy,GetCastRange(myHero,_R)) and AutoRConfig.R and GetCurrentHP(enemy) < CalcDamage(myHero, enemy, 0, (math.max(90*GetCastLevel(myHero,_R)+70+.75*GetBonusDmg(myHero),(90*GetCastLevel(myHero,_R)+70+.75*GetBonusDmg(myHero))*2))) then
  62. CastTargetSpell(enemy, _R)
  63. end
  64. end
  65. end
  66. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement