Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ Auto Ignite 1.1 by HeX ]]--
- local iSlot = nil
- function OnLoad()
- PrintChat("<font color='#CCCCCC'> >> Auto Ignite 1.1 loaded! <<</font>")
- AIConfig = scriptConfig("Ignite Config", "AutoIgnite")
- AIConfig:addParam("useIgnite", "Ignite when killable", SCRIPT_PARAM_ONKEYTOGGLE, true, 73)
- AIConfig:addParam("doubleI", "Dont Double Ignite", SCRIPT_PARAM_ONOFF, true)
- AIConfig:permaShow("useIgnite")
- if myHero:GetSpellData(SUMMONER_1).name:find("SummonerDot") then iSlot = SUMMONER_1
- elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerDot") then iSlot = SUMMONER_2
- else iSlot = nil
- end
- end
- function OnTick()
- if AIConfig.useIgnite then
- local iDmg = 0
- if iSlot ~= nil and myHero:CanUseSpell(iSlot) == READY then
- for i = 1, heroManager.iCount, 1 do
- local target = heroManager:getHero(i)
- if ValidTarget(target) then
- iDmg = 50 + 20 * myHero.level
- if target ~= nil and target.team ~= myHero.team and not target.dead and target.visible and GetDistance(target) < 600 and target.health < iDmg then
- if AIConfig.doubleI and not TargetHaveBuff("SummonerDot", target) then
- CastSpell(iSlot, target)
- elseif not AIConfig.doubleI then
- CastSpell(iSlot, target)
- end
- end
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment