Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- AUTO LUX HELPER v1.1 --
- if myHero.charName ~= "Lux" then return end
- local ts = TargetSelector(TARGET_LESS_CAST,1200,DAMAGE_MAGIC,false)
- local tp = TargetPrediction(1200,1.2,265)
- local hp = TargetPrediction(1200,1,240)
- local RDmg = 0
- local LuxE = {}
- local Junngle = {}
- function OnLoad()
- --TFConfig = scriptConfig("TF Helper", "TFHelper")
- LuxConfig = scriptConfig("Lux Combo", "LuxCombo")
- LuxConfig:addParam("active", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 32)
- LuxConfig:addParam("harras", "Harras", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("A"))
- LuxConfig:addParam("drawpred", "Draw Prediciton", SCRIPT_PARAM_ONOFF, false)
- LuxConfig:addParam("junngle", "Autosteal with ult", SCRIPT_PARAM_ONOFF, true)
- LuxConfig:addParam("autoE", "AutoE if can hit enemy", SCRIPT_PARAM_ONOFF, true)
- LuxConfig:permaShow("active")
- LuxConfig:permaShow("harras")
- PrintChat("<font color='#E97FA5'>>> Lux Helper loaded!</font>")
- end
- function OnTick()
- ts:update()
- if ts.target ~= nil then
- if ts.target.visible == true and LuxConfig.active then
- qpred = tp:GetPrediction(ts.target)
- if qpred ~= nil then
- QReady = (myHero:CanUseSpell(_Q) == READY) -- Check if Q is ready to cast.
- DFGSlot = GetInventorySlotItem(3128) -- Check if we have DFG and return his slot.
- DFGReady = (DFGSlot ~= nil and myHero:CanUseSpell(DFGSlot) == READY)
- if DFGReady then CastSpell(DFGSlot, ts.target) end
- if QReady then CastSpell(_Q, qpred.x, qpred.z) end
- end
- end
- if not ts.target.canMove and LuxConfig.active then
- EReady = (myHero:CanUseSpell(_E) == READY)
- RReady = (myHero:CanUseSpell(_R) == READY)
- if EReady then CastSpell(_E, ts.target.x, ts.target.z) end
- if RReady then CastSpell(_R, ts.target.x, ts.target.z) end
- end
- if LuxConfig.harras then
- epred = hp:GetPrediction(ts.target)
- if epred ~= nil then
- EReady = (myHero:CanUseSpell(_E) == READY)
- if EReady then CastSpell(_E,epred.x,epred.z) end
- end
- end
- AllachAkbar()
- end
- if LuxConfig.junngle then
- if not myHero.dead then
- if Vilemaw ~= nil then checkMonster(Vilemaw) end
- if Nashor ~= nil then checkMonster(Nashor) end
- if Dragon ~= nil then checkMonster(Dragon) end
- if Golem1 ~= nil then checkMonster(Golem1) end
- if Golem2 ~= nil then checkMonster(Golem2) end
- if Lizard1 ~= nil then checkMonster(Lizard1) end
- if Lizard2 ~= nil then checkMonster(Lizard2) end
- end
- end
- end
- function AllachAkbar()
- if LuxConfig.autoE then
- if LuxE ~= nil then
- if GetDistance(LuxE, ts.target) < 349 then
- CastSpell(_E)
- end
- --PrintChat("LuxDetected")
- end
- end
- end
- function checkMonster(object)
- if object ~= nil and not object.dead and object.x ~= nil then
- if GetDistance(object) < 2999 then
- RReady = (myHero:CanUseSpell(_R) == READY)
- RDmg = getDmg("R", object, player)
- --PrintChat(tostring(RDmg))
- if object.health <= RDmg then
- if RReady then CastSpell(_R, object.x, object.z) end
- --PrintChat("CastingR")
- end
- end
- end
- end
- function OnDraw()
- if not myHero.dead then
- DrawCircle(myHero.x,myHero.y,myHero.z,1200,0x540069)
- if LuxConfig.drawpred and ts.target ~= nil then
- qpred = tp:GetPrediction(ts.target)
- if qpred ~= nil then
- for j=0, 10 do
- DrawCircle(qpred.x,qpred.y,qpred.z,100 + j*1.5, 0x540069)
- end
- end
- end
- end
- end
- function OnCreateObj(obj) -- by eXtragoZ
- if obj ~= nil and obj.type == "obj_AI_Minion" and obj.name ~= nil then
- if obj.name == "TT_Spiderboss7.1.1" then Vilemaw = obj
- elseif obj.name == "Worm12.1.1" then Nashor = obj
- elseif obj.name == "Dragon6.1.1" then Dragon = obj
- elseif obj.name == "AncientGolem1.1.1" then Golem1 = obj
- elseif obj.name == "AncientGolem7.1.1" then Golem2 = obj
- elseif obj.name == "LizardElder4.1.1" then Lizard1 = obj
- elseif obj.name == "LizardElder10.1.1" then Lizard2 = obj end
- end
- if obj ~= nil and string.find(obj.name, "LuxLightstrike") then
- LuxE = obj
- --PrintChat("SetSpell")
- end
- end
- function OnDeleteObj(obj)
- if obj ~= nil and obj.name ~= nil then
- if obj.name == "TT_Spiderboss7.1.1" then Vilemaw = nil
- elseif obj.name == "Worm12.1.1" then Nashor = nil
- elseif obj.name == "Dragon6.1.1" then Dragon = nil
- elseif obj.name == "AncientGolem1.1.1" then Golem1 = nil
- elseif obj.name == "AncientGolem7.1.1" then Golem2 = nil
- elseif obj.name == "LizardElder4.1.1" then Lizard1 = nil
- elseif obj.name == "LizardElder10.1.1" then Lizard2 = nil end
- end
- if obj ~= nil and string.find(obj.name, "LuxLightstrike") then
- LuxE = nil
- --PrintChat("RemoveSpell")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement