Guest User

Untitled

a guest
Mar 17th, 2013
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.57 KB | None | 0 0
  1. -- AUTO LUX HELPER v1.1 --
  2.  
  3. if myHero.charName ~= "Lux" then return end
  4.  
  5.  
  6.  
  7. local ts = TargetSelector(TARGET_LESS_CAST,1200,DAMAGE_MAGIC,false)
  8.  
  9. local tp = TargetPrediction(1200,1.2,265)
  10.  
  11. local hp = TargetPrediction(1200,1,240)
  12.  
  13. local RDmg = 0
  14.  
  15. local LuxE = {}
  16.  
  17.  
  18.  
  19. local Junngle = {}
  20.  
  21.  
  22.  
  23. function OnLoad()
  24.  
  25. --TFConfig = scriptConfig("TF Helper", "TFHelper")
  26.  
  27. LuxConfig = scriptConfig("Lux Combo", "LuxCombo")
  28.  
  29. LuxConfig:addParam("active", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 32)
  30.  
  31. LuxConfig:addParam("harras", "Harras", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("A"))
  32.  
  33. LuxConfig:addParam("drawpred", "Draw Prediciton", SCRIPT_PARAM_ONOFF, false)
  34.  
  35. LuxConfig:addParam("junngle", "Autosteal with ult", SCRIPT_PARAM_ONOFF, true)
  36.  
  37. LuxConfig:addParam("autoE", "AutoE if can hit enemy", SCRIPT_PARAM_ONOFF, true)
  38.  
  39. LuxConfig:permaShow("active")
  40.  
  41. LuxConfig:permaShow("harras")
  42.  
  43. PrintChat("<font color='#E97FA5'>>> Lux Helper loaded!</font>")
  44.  
  45. end
  46.  
  47.  
  48.  
  49. function OnTick()
  50.  
  51. ts:update()
  52.  
  53. if ts.target ~= nil then
  54.  
  55. if ts.target.visible == true and LuxConfig.active then
  56.  
  57. qpred = tp:GetPrediction(ts.target)
  58.  
  59. if qpred ~= nil then
  60.  
  61. QReady = (myHero:CanUseSpell(_Q) == READY) -- Check if Q is ready to cast.
  62.  
  63. DFGSlot = GetInventorySlotItem(3128) -- Check if we have DFG and return his slot.
  64.  
  65. DFGReady = (DFGSlot ~= nil and myHero:CanUseSpell(DFGSlot) == READY)
  66.  
  67. if DFGReady then CastSpell(DFGSlot, ts.target) end
  68.  
  69. if QReady then CastSpell(_Q, qpred.x, qpred.z) end
  70.  
  71. end
  72.  
  73. end
  74.  
  75. if not ts.target.canMove and LuxConfig.active then
  76.  
  77. EReady = (myHero:CanUseSpell(_E) == READY)
  78.  
  79. RReady = (myHero:CanUseSpell(_R) == READY)
  80.  
  81. if EReady then CastSpell(_E, ts.target.x, ts.target.z) end
  82.  
  83. if RReady then CastSpell(_R, ts.target.x, ts.target.z) end
  84.  
  85. end
  86.  
  87. if LuxConfig.harras then
  88.  
  89. epred = hp:GetPrediction(ts.target)
  90.  
  91. if epred ~= nil then
  92.  
  93. EReady = (myHero:CanUseSpell(_E) == READY)
  94.  
  95. if EReady then CastSpell(_E,epred.x,epred.z) end
  96.  
  97. end
  98.  
  99. end
  100.  
  101. AllachAkbar()
  102.  
  103. end
  104.  
  105. if LuxConfig.junngle then
  106.  
  107. if not myHero.dead then
  108.  
  109. if Vilemaw ~= nil then checkMonster(Vilemaw) end
  110.  
  111. if Nashor ~= nil then checkMonster(Nashor) end
  112.  
  113. if Dragon ~= nil then checkMonster(Dragon) end
  114.  
  115. if Golem1 ~= nil then checkMonster(Golem1) end
  116.  
  117. if Golem2 ~= nil then checkMonster(Golem2) end
  118.  
  119. if Lizard1 ~= nil then checkMonster(Lizard1) end
  120.  
  121. if Lizard2 ~= nil then checkMonster(Lizard2) end
  122.  
  123. end
  124.  
  125. end
  126.  
  127. end
  128.  
  129.  
  130.  
  131. function AllachAkbar()
  132.  
  133. if LuxConfig.autoE then
  134.  
  135. if LuxE ~= nil then
  136.  
  137. if GetDistance(LuxE, ts.target) < 349 then
  138.  
  139. CastSpell(_E)
  140.  
  141. end
  142.  
  143. --PrintChat("LuxDetected")
  144.  
  145. end
  146.  
  147. end
  148.  
  149. end
  150.  
  151.  
  152.  
  153. function checkMonster(object)
  154.  
  155. if object ~= nil and not object.dead and object.x ~= nil then
  156.  
  157. if GetDistance(object) < 2999 then
  158.  
  159. RReady = (myHero:CanUseSpell(_R) == READY)
  160.  
  161. RDmg = getDmg("R", object, player)
  162.  
  163. --PrintChat(tostring(RDmg))
  164.  
  165. if object.health <= RDmg then
  166.  
  167. if RReady then CastSpell(_R, object.x, object.z) end
  168.  
  169. --PrintChat("CastingR")
  170.  
  171. end
  172.  
  173. end
  174.  
  175. end
  176.  
  177. end
  178.  
  179.  
  180.  
  181. function OnDraw()
  182.  
  183. if not myHero.dead then
  184.  
  185. DrawCircle(myHero.x,myHero.y,myHero.z,1200,0x540069)
  186.  
  187. if LuxConfig.drawpred and ts.target ~= nil then
  188.  
  189. qpred = tp:GetPrediction(ts.target)
  190.  
  191. if qpred ~= nil then
  192.  
  193. for j=0, 10 do
  194.  
  195. DrawCircle(qpred.x,qpred.y,qpred.z,100 + j*1.5, 0x540069)
  196.  
  197. end
  198.  
  199. end
  200.  
  201. end
  202.  
  203. end
  204.  
  205. end
  206.  
  207.  
  208.  
  209. function OnCreateObj(obj) -- by eXtragoZ
  210.  
  211. if obj ~= nil and obj.type == "obj_AI_Minion" and obj.name ~= nil then
  212.  
  213. if obj.name == "TT_Spiderboss7.1.1" then Vilemaw = obj
  214.  
  215. elseif obj.name == "Worm12.1.1" then Nashor = obj
  216.  
  217. elseif obj.name == "Dragon6.1.1" then Dragon = obj
  218.  
  219. elseif obj.name == "AncientGolem1.1.1" then Golem1 = obj
  220.  
  221. elseif obj.name == "AncientGolem7.1.1" then Golem2 = obj
  222.  
  223. elseif obj.name == "LizardElder4.1.1" then Lizard1 = obj
  224.  
  225. elseif obj.name == "LizardElder10.1.1" then Lizard2 = obj end
  226.  
  227. end
  228.  
  229. if obj ~= nil and string.find(obj.name, "LuxLightstrike") then
  230.  
  231. LuxE = obj
  232.  
  233. --PrintChat("SetSpell")
  234.  
  235. end
  236.  
  237. end
  238.  
  239.  
  240.  
  241. function OnDeleteObj(obj)
  242.  
  243. if obj ~= nil and obj.name ~= nil then
  244.  
  245. if obj.name == "TT_Spiderboss7.1.1" then Vilemaw = nil
  246.  
  247. elseif obj.name == "Worm12.1.1" then Nashor = nil
  248.  
  249. elseif obj.name == "Dragon6.1.1" then Dragon = nil
  250.  
  251. elseif obj.name == "AncientGolem1.1.1" then Golem1 = nil
  252.  
  253. elseif obj.name == "AncientGolem7.1.1" then Golem2 = nil
  254.  
  255. elseif obj.name == "LizardElder4.1.1" then Lizard1 = nil
  256.  
  257. elseif obj.name == "LizardElder10.1.1" then Lizard2 = nil end
  258.  
  259. end
  260.  
  261. if obj ~= nil and string.find(obj.name, "LuxLightstrike") then
  262.  
  263. LuxE = nil
  264.  
  265. --PrintChat("RemoveSpell")
  266.  
  267. end
  268.  
  269. end
Advertisement
Add Comment
Please, Sign In to add comment