16HeX16

Auto Ignite 1.1

Mar 30th, 2013
2,209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.27 KB | None | 0 0
  1. --[[ Auto Ignite 1.1 by HeX ]]--
  2. local iSlot = nil
  3.  
  4. function OnLoad()
  5.     PrintChat("<font color='#CCCCCC'> >> Auto Ignite 1.1 loaded! <<</font>")
  6.     AIConfig = scriptConfig("Ignite Config", "AutoIgnite")
  7.     AIConfig:addParam("useIgnite", "Ignite when killable", SCRIPT_PARAM_ONKEYTOGGLE, true, 73)
  8.     AIConfig:addParam("doubleI", "Dont Double Ignite", SCRIPT_PARAM_ONOFF, true)
  9.     AIConfig:permaShow("useIgnite")
  10.     if myHero:GetSpellData(SUMMONER_1).name:find("SummonerDot") then iSlot = SUMMONER_1
  11.         elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerDot") then iSlot = SUMMONER_2
  12.             else iSlot = nil
  13.     end
  14. end
  15.  
  16. function OnTick()
  17.     if AIConfig.useIgnite then
  18.         local iDmg = 0     
  19.         if iSlot ~= nil and myHero:CanUseSpell(iSlot) == READY then
  20.             for i = 1, heroManager.iCount, 1 do
  21.                 local target = heroManager:getHero(i)
  22.                 if ValidTarget(target) then
  23.                     iDmg = 50 + 20 * myHero.level
  24.                     if target ~= nil and target.team ~= myHero.team and not target.dead and target.visible and GetDistance(target) < 600 and target.health < iDmg then
  25.                         if AIConfig.doubleI and not TargetHaveBuff("SummonerDot", target) then
  26.                             CastSpell(iSlot, target)
  27.                             elseif not AIConfig.doubleI then
  28.                                 CastSpell(iSlot, target)
  29.                         end
  30.                     end
  31.                 end
  32.             end
  33.         end
  34.     end
  35. end
Advertisement
Add Comment
Please, Sign In to add comment