Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if myHero.charName ~= "Rengar" then return end
- local VP
- require "VPrediction"
- require "SxOrbWalk"
- local qRange = 100
- local eRange = 1050
- local leapRange = 775
- local fury = myHero.mana
- local Visible = true
- function OnLoad()
- VP = VPrediction()
- print("AutoRengar v1.50 loaded - Created by Fret13103 - thank you for using")
- Config = scriptConfig("AutoRengar v1.3", "Rengar")
- Config:addSubMenu("Empowered Control", "empCont")
- Config:addSubMenu("Orbwalker", "SxOrb")
- Config:addSubMenu("Harass Settings", "SettingHarass")
- Config:addSubMenu("Drawing Settings", "drawing")
- Config:addParam("delete", "Combo Key", SCRIPT_PARAM_ONKEYDOWN, false, string.byte(" "))
- Config:addParam("tripleQ", "triple Q Key(dont change!)", SCRIPT_PARAM_ONKEYDOWN, false, string.byte(" "))
- Config:addParam("harass", "Harass key", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("C"))
- Config:addParam("autoCombo", "Combo as soon as you leap", SCRIPT_PARAM_ONOFF, true)
- Config.drawing:addParam("drawCircles", "Draw Circle", SCRIPT_PARAM_ONOFF, true)
- Config.drawing:addParam("drawE", "Draw E range", SCRIPT_PARAM_ONOFF, true)
- Config.drawing:addParam("drawW", "Draw W range", SCRIPT_PARAM_ONOFF, true)
- Config.empCont:addParam("dontEmpE", "Dont use E at 5 stacks", SCRIPT_PARAM_ONOFF, false)
- Config.empCont:addParam("autoheal", "Auto Heal if low", SCRIPT_PARAM_SLICE, 25,0,100,0)
- Config.empCont:addParam("autoEmpQ", "Auto Use 5 stacks of fury on Q if in range",SCRIPT_PARAM_ONOFF, true)
- SxOrb:LoadToMenu(Config.SxOrb)
- Config.SettingHarass:addParam("UseE", "Use E in harass", SCRIPT_PARAM_ONOFF, true)
- Config.SettingHarass:addParam("UseW", "Use W in harass", SCRIPT_PARAM_ONOFF, true)
- ts = TargetSelector(TARGET_LOW_HP_PRIORITY,950, true)
- end
- function castE()
- if ts.target ~= nil and Config.delete and CanCast(_E) and Visible == true and ValidTarget(target) then
- local CastPosition, HitChance, Position = VP:GetLineCastPosition(ts.target, 0, 75, eRange, 2.25, myHero, true)
- if HitChance >= 2 and GetDistance(ts.target) <= eRange then
- if myHero.mana == 5 then
- if Config.empCont.dontEmpE then
- --Do nothing--
- else
- if GetDistance(target) > myHero.range + 250 and target.ms > myHero.ms - 50 then
- CastSpell(_E,CastPosition.x,CastPosition.z)
- end
- end
- else
- CastSpell(_E, CastPosition.x,CastPosition.z)
- end
- end
- end
- end
- function AutoQ() -- OMFG IT'S TABBED CODE HOLY SHIT IT'S A FUQIN MIRACLE!!!
- if Config.delete and ValidTarget(target) then
- if myHero.mana == 5 and GetDistance(target) < (myHero.range+75) then
- if CanCast(_Q) then CastSpell(_Q) myHero:Attack(target) end
- end
- end
- end
- function AutoHeal()
- if myHero.health <= myHero.maxHealth/100*Config.empCont.autoheal and myHero.mana == 5 and CanCast(_W)then
- CastSpell(_W) end
- end
- function calcRange()
- if myHero.range > 150 and myHero.range < 700 then leapRange = myHero.range+175 end
- if myHero.range >150 and myHero.range >= 700 then leapRange = myHero.range+75 end
- if myHero.range < 150 then leapRange = 125 end
- end
- function Visibility()
- if leapRange > 150 then Visible = false else Visible = true end
- end
- function CanCast(Spell)
- return (myHero:CanUseSpell(Spell) == READY)
- end
- function isEmpowered()
- if target ~= nil and ValidTarget(target) then
- if myHero.mana == 5 then
- if Config.empCont.AutoEmpQ and myHero.health > ((myHero.maxHealth/100)*25) and ValidTarget(target) then
- local Dist = GetDistance(target)
- if Dist <= myHero.range then
- CastSpell(_Q)
- else
- if Visible == false then
- CastSpell(_Q)
- end
- end
- end
- end
- end
- end
- function CastW()
- if Config.delete and ValidTarget(target) then
- if GetDistance(target) < 500 and myHero.mana < 5 and Visible == true then
- if CanCast(_W) then CastSpell(_W) end
- end
- end
- end
- function Harass()
- if Config.harass and Visible == true and ValidTarget(target) then
- if Config.SettingHarass.UseW and GetDistance(target)<500 and CanCast(_W) and myHero.mana < 5 then
- CastSpell(_W)
- end
- if Config.SettingHarass.UseW and CanCast(_E) then
- local CastPosition, HitChance, Position = VP:GetLineCastPosition(ts.target, 0, 80, eRange, 2.25, myHero, true)
- if HitChance >= 2 and GetDistance(ts.target) <= eRange and myHero.mana < 5 then
- CastSpell(_E, CastPosition.x,CastPosition.z)
- end
- end
- end
- end
- function OnTick()
- ts:update()
- target = ts.target
- SxOrb:ForceTarget(target)
- castE()
- calcRange()
- Visibility()
- AutoHeal()
- isEmpowered()
- calcRange()
- AutoQ()
- CastW()
- Harass()
- autoCombo()
- tripleQ()
- instantWE()
- getItemSlot()
- fHydra()
- --getItemName()
- end
- function OnDraw()
- if Config.drawing.drawE and CanCast(_E) then
- DrawCircle(myHero.x, myHero.y, myHero.z, eRange, 0xFFFF0000)
- end
- if Config.drawing.drawW and CanCast(_W) then
- DrawCircle(myHero.x, myHero.y, myHero.z, 500, 0xFFFF0000)
- end
- end
- function autoCombo()
- if Config.autoCombo and ValidTarget(target) and myHero.y > 90 then
- if GetDistance(target) < 600 then
- if CanCast(_Q) then CastSpell(_Q) end
- if CanCast(_W) and fury < 5 then CastSpell(_W) end
- if CanCast(_E) and fury < 5 then CastSpell(_E, target.x, target.z) end
- if Hydra and CanCast(_Hydra) then CastSpell(_Hydra) end
- if Ghostblade and CanCast(_Ghostblade) then CastSpell(_Ghostblade) end
- end
- end
- end
- function tripleQ()
- if Config.tripleQ and ValidTarget(target) then
- if GetDistance(target) < (myHero.range + 100) then
- if CanCast(_Q) then CastSpell(_Q) myHero:Attack(target) end
- end
- end
- end
- function instantWE()
- if Config.delete and ValidTarget(target) then
- if CanCast(_W) and GetDistance(target) <= 500 then CastSpell(_W) end
- if CanCast(_E) then
- if GetDistance(target) <= 500 then CastSpell(_E, target.x, target.z) else
- local CastPosition, HitChance, Position = VP:GetLineCastPosition(ts.target, 0, 75, eRange, 2.25, myHero, true)
- if HitChance >= 2 and GetDistance(ts.target) <= eRange then CastSpell(_E, CastPosition.x,CastPosition.z)
- end
- end
- end
- end
- end
- local Tiamat -- tiamat and Hydra share the same name
- local Hydra
- local Ghostblade
- function getItemSlot()
- for slot = ITEM_1, ITEM_7 do
- local currentItemName = myHero:GetSpellData(slot).name
- if currentItemName == "ItemTiamatCleave" then
- Hydra = slot
- end
- if currentItemName == "YoumusBlade" then
- Ghostblade = slot
- end
- end
- end
- function fHydra()
- if ValidTarget(target) then
- if GetDistance(target) < 200 then
- if Hydra then
- if CanCast(Hydra) then CastSpell(Hydra)
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement