Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ Irelia Helper 1.4 by HeX ]]-- (killsteal and calculations fixed by vitouch)
- if myHero.charName ~= "Irelia" then return end
- --[[ Ranges ]]--
- local qRange = 650
- local eRange = 425
- local rRange = 1000
- --[[ Prediction ]]--
- local travelDuration = 0
- local rSpeed = 1.7
- --[[ Farm ]]--
- local nextTick = 0
- local waitDelay = 650
- --[[ Damage Calculation ]]--
- local calculationenemy = 1
- local killable = {}
- --[[ Items ]]--
- local ignite = nil
- local QREADY, WREADY, EREADY, RREADY = false, false, false, false
- local SheenSlot, TrinitySlot, IcebornSlot = nil, nil, nil
- local BRKSlot, DFGSlot, HXGSlot, BWCSlot, TMTSlot, RAHSlot, RNDSlot = nil, nil, nil, nil, nil, nil, nil
- local BRKREADY, DFGREADY, HXGREADY, BWCREADY, TMTREADY, RAHREADY, RNDREADY = false, false, false, false, false, false, false
- function OnLoad()
- lasthiten = 0
- hitendelay = 6
- hitendmg = 0
- lastfloat = 0
- floatdelay = 0
- PrintChat("<font color='#CCCCCC'> >> Irelia Helper 1.4 loaded! <<</font>")
- IHConfig = scriptConfig("Irelia Helper", "IreliaHelper")
- IHConfig:addParam("scriptActive", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 32)
- IHConfig:addParam("autoStun", "Auto Stun", SCRIPT_PARAM_ONKEYTOGGLE, true, 90)
- IHConfig:addParam("lasthit", "Last Hit", SCRIPT_PARAM_ONKEYDOWN, false, 65)
- IHConfig:addParam("autoQ", "Auto Q killable", SCRIPT_PARAM_ONKEYTOGGLE, true, 88)
- IHConfig:addParam("useR", "Use ultimate", SCRIPT_PARAM_ONOFF, true)
- IHConfig:addParam("eStun", "Only use E to stun", SCRIPT_PARAM_ONOFF, false)
- IHConfig:addParam("autoignite", "Ignite when Killable", SCRIPT_PARAM_ONOFF, true)
- IHConfig:addParam("IFarm", "Farm with Q", SCRIPT_PARAM_ONOFF, false)
- IHConfig:addParam("qBuffer", "Min Range to Q Farm",SCRIPT_PARAM_SLICE, 0, 0, 650, 1)
- IHConfig:addParam("mousemoving", "Move to mouse", SCRIPT_PARAM_ONOFF, true)
- IHConfig:addParam("drawcirclesSelf", "Draw Circles - Self", SCRIPT_PARAM_ONOFF, false)
- IHConfig:addParam("drawcirclesEnemy", "Draw Circles - Enemy", SCRIPT_PARAM_ONOFF, false)
- IHConfig:permaShow("scriptActive")
- IHConfig:permaShow("autoStun")
- ts = TargetSelector(TARGET_LOW_HP, qRange+50, DAMAGE_PHYSICAL)
- ts.name = "Irelia"
- IHConfig:addTS(ts)
- enemyMinions = minionManager(MINION_ENEMY, 650, player, MINION_SORT_HEALTH_ASC)
- if myHero:GetSpellData(SUMMONER_1).name:find("SummonerDot") then ignite = SUMMONER_1
- elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerDot") then ignite = SUMMONER_2
- end
- end
- function OnProcessSpell(object,spell)
- local spellName = spell.name
- local P1 = spell.startPos
- local P2 = spell.endPos
- if object.isMe then
- --PrintChat("spell:"..spellName)
- if spellName == "IreliaHitenStyle" then
- lasthiten = os.clock()
- hitendmg = spell.level*15
- end
- end
- end
- function OnTick()
- ts:update()
- DFGSlot, BRKSlot, HXGSlot, BWCSlot = GetInventorySlotItem(3153), GetInventorySlotItem(3128), GetInventorySlotItem(3146), GetInventorySlotItem(3144)
- SheenSlot, TrinitySlot, IcebornSlot = GetInventorySlotItem(3025), GetInventorySlotItem(3057), GetInventorySlotItem(3078)
- DFGREADY = (DFGSlot ~= nil and myHero:CanUseSpell(DFGSlot) == READY)
- HXGREADY = (HXGSlot ~= nil and myHero:CanUseSpell(HXGSlot) == READY)
- BWCREADY = (BWCSlot ~= nil and myHero:CanUseSpell(BWCSlot) == READY)
- BRKREADY = (BRKSlot ~= nil and myHero:CanUseSpell(BRKSlot) == READY)
- TMTREADY = (TMTSlot ~= nil and myHero:CanUseSpell(TMTSlot) == READY)
- RAHREADY = (RAHSlot ~= nil and myHero:CanUseSpell(RAHSlot) == READY)
- RNDREADY = (RNDSlot ~= nil and myHero:CanUseSpell(RNDSlot) == READY)
- IREADY = (ignite ~= nil and myHero:CanUseSpell(ignite) == READY)
- QREADY = (myHero:CanUseSpell(_Q) == READY)
- WREADY = (myHero:CanUseSpell(_W) == READY)
- EREADY = (myHero:CanUseSpell(_E) == READY)
- RREADY = (myHero:CanUseSpell(_R) == READY)
- if os.clock() > lasthiten + hitendelay then
- hitendmg = 0
- end
- if os.clock() > floatdelay + 2 then
- lastfloat = 0
- end
- if ts.target ~= nil and not myHero.dead then
- travelDuration = GetDistance(ts.target, myHero)/rSpeed
- end
- if ts.target ~= nil and RREADY and travelDuration ~= nil then
- predic = GetPredictionPos(ts.target, travelDuration)
- end
- --[[ Auto Ignite ]]--
- if IHConfig.autoignite then
- if IREADY then
- local ignitedmg = 0
- for i = 1, heroManager.iCount, 1 do
- local enemyhero = heroManager:getHero(i)
- if ValidTarget(enemyhero,600) then
- ignitedmg = 50 + 20 * myHero.level
- if enemyhero.health <= ignitedmg then
- CastSpell(ignite, enemyhero)
- end
- end
- end
- end
- end
- --[[ Auto Stun ]]--
- if ts.target ~= nil and IHConfig.autoStun then
- if GetDistance(ts.target) < eRange and EREADY and ((myHero.health / myHero.maxHealth) < (ts.target.health / ts.target.maxHealth)) then
- CastSpell(_E, ts.target)
- end
- end
- --[[ Basic Combo ]]--
- if ts.target ~= nil and IHConfig.scriptActive then
- --[[ Items ]]--
- if GetDistance(ts.target) < 550 then
- if DFGREADY then CastSpell(DFGSlot, ts.target) end
- if HXGREADY then CastSpell(HXGSlot, ts.target) end
- if BWCREADY then CastSpell(BWCSlot, ts.target) end
- if BRKREADY then CastSpell(BRKSlot, ts.target) end
- if TMTREADY and GetDistance(ts.target) < 275 then CastSpell(TMTSlot) end
- if RAHREADY and GetDistance(ts.target) < 275 then CastSpell(RAHSlot) end
- if RNDREADY and GetDistance(ts.target) < 275 then CastSpell(RNDSlot) end
- end
- --[[ Abilities ]]--
- if WREADY and GetDistance(ts.target) <= qRange then
- CastSpell(_W)
- end
- if QREADY and GetDistance(ts.target) <= qRange then
- CastSpell(_Q, ts.target)
- end
- if EREADY and GetDistance(ts.target) < eRange and IHConfig.eStun and ((myHero.health / myHero.maxHealth) < (ts.target.health / ts.target.maxHealth)) then
- CastSpell(_E, ts.target)
- elseif EREADY and GetDistance(ts.target) <= eRange and not IHConfig.eStun then
- CastSpell(_E, ts.target)
- end
- if predic ~= nil and RREADY and IHConfig.useR then
- if GetDistance(predic) <= rRange then
- CastSpell(_R, predic.x, predic.z)
- end
- end
- if GetDistance(ts.target) <= 275 then
- myHero:Attack(ts.target)
- end
- end
- --[[ Auto Q ]]--
- if IHConfig.autoQ then
- for i=1, heroManager.iCount do
- Target = heroManager:GetHero(i)
- qDMG = getDmg("Q",Target,myHero)
- bDMG = (SheenSlot and getDmg("SHEEN",Target,myHero) or 0)+(TrinitySlot and getDmg("TRINITY",Target,myHero) or 0)+(IcebornSlot and getDmg("ICEBORN",Target,myHero) or 0)
- if QREADY and Target ~= nil and Target.team ~= myHero.team and not Target.dead and Target.visible and GetDistance(Target) < qRange and Target.health < (qDMG+bDMG+hitendmg) then
- CastSpell(_Q, Target)
- end
- end
- end
- --[[ Last Hit ]]--
- enemyMinions:update()
- if IHConfig.lasthit then
- if IHConfig.mousemoving and GetTickCount() > nextTick then
- myHero:MoveTo(mousePos.x, mousePos.z)
- end
- for index, minion in pairs(enemyMinions.objects) do
- local aDmg = getDmg("AD", minion, myHero)
- local bDmg = (SheenSlot and getDmg("SHEEN",minion,myHero) or 0)+(TrinitySlot and getDmg("TRINITY",minion,myHero) or 0)+(IcebornSlot and getDmg("ICEBORN",minion,myHero) or 0)
- local QDMG = getDmg("Q", minion, myHero)
- if minion.health <= aDmg and GetDistance(minion) <= (myHero.range+75) and GetTickCount() > nextTick then
- myHero:Attack(minion)
- nextTick = GetTickCount() + waitDelay
- elseif IHConfig.IFarm and QREADY and GetDistance(minion) <= qRange and GetDistance(minion) > IHConfig.qBuffer and minion.health <= (aDmg+QDMG+bDmg) then
- CastSpell(_Q, minion)
- end
- end
- end
- end
- function OnDraw()
- if IHConfig.drawcirclesSelf and not myHero.dead then
- DrawCircle(myHero.x, myHero.y, myHero.z, qRange, 0x00FF00)
- end
- if ts.target ~= nil and IHConfig.drawcirclesEnemy then
- for j=0, 10 do
- DrawCircle(ts.target.x, ts.target.y, ts.target.z, 40 + j*1.5, 0x00FF00)
- end
- end
- for i=1, heroManager.iCount do
- local enemydraw = heroManager:GetHero(i)
- if ValidTarget(enemydraw) then
- if IHConfig.drawcirclesEnemy then
- if killable[i] == 1 then
- for e=0, 15 do
- DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + e*1.5, 0x0000FF)
- end
- elseif killable[i] == 2 then
- for e=0, 10 do
- DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + e*1.5, 0xFF0000)
- DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 110 + e*1.5, 0xFF0000)
- DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 140 + e*1.5, 0xFF0000)
- end
- end
- end
- end
- end
- end
- --[[
- Explanation of the marks:
- -Green circle: Marks the current target to which you will do the combo
- -Blue circle: Killed with a combo, if all the skills were available
- -3 Red circles: Killed using Items + 2 Attack + Q + E + R
- ]]
- function DmgCalculation()
- local enemy = heroManager:GetHero(calculationenemy)
- if ValidTarget(enemy) then
- local ignitedamage, dfgdamage, hxgdamage, bwcdamage, brkdamage = 0, 0, 0, 0, 0
- local qdamage = getDmg("Q",enemy,myHero)
- local edamage = getDmg("E",enemy,myHero)
- local rdamage = getDmg("R", enemy, myHero,3)
- local hitdamage = getDmg("AD", enemy, myHero)
- local ignitedamage = (ignite and getDmg("IGNITE",enemy,myHero) or 0)
- local dfgdamage = (DFGSlot and getDmg("DFG",enemy,myHero) or 0)
- local hxgdamage = (HXGSlot and getDmg("HXG",enemy,myHero) or 0)
- local bwcdamage = (BWCSlot and getDmg("BWC",enemy,myHero) or 0)
- local brkdamage = (BRKSlot and getDmg("RUINEDKING",enemy,myHero) or 0)
- local tmtdamage = (TMTSlot and getDmg("TIAMAT",enemy,myHero) or 0)
- local rahdamage = (RAHSlot and getDmg("HYDRA",enemy,myHero) or 0)
- local combo1 = hitdamage*2 + qdamage + hitendmg*2 + edamage + rdamage
- local combo2 = hitdamage*1
- if QREADY then
- combo2 = combo2 + qdamage
- end
- if EREADY then
- combo2 = combo2 + edamage
- end
- if RREADY then
- combo2 = combo2 + rdamage
- end
- if DFGREADY then
- combo1 = combo1 + dfgdamage
- combo2 = combo2 + dfgdamage
- end
- if HXGREADY then
- combo1 = combo1 + hxgdamage
- combo2 = combo2 + hxgdamage
- end
- if BWCREADY then
- combo1 = combo1 + bwcdamage
- combo2 = combo2 + bwcdamage
- end
- if BRKREADY then
- combo1 = combo1 + brkdamage
- combo2 = combo2 + brkdamage
- end
- if TMTREADY then
- combo1 = combo1 + tmtdamage
- combo2 = combo2 + tmtdamage
- end
- if RAHREADY then
- combo1 = combo1 + rahdamage
- combo2 = combo2 + rahdamage
- end
- if IREADY then
- combo1 = combo1 + ignitedamage
- combo2 = combo2 + ignitedamage
- end
- if combo2 >= enemy.health then killable[calculationenemy] = 2
- elseif combo1 >= enemy.health then killable[calculationenemy] = 1
- else killable[calculationenemy] = 0
- end
- end
- if calculationenemy == 1 then calculationenemy = heroManager.iCount
- else calculationenemy = calculationenemy-1
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment