16HeX16

Hecarim Helper 1.2.1

Mar 30th, 2013
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.89 KB | None | 0 0
  1. --[[    Hecarim Helper 1.2.1 by HeX ]]--
  2.  
  3. if myHero.charName ~= "Hecarim" then return end
  4. --[[    Ranges  ]]--
  5. local qRange = 350
  6. local wRange = 525
  7. local rRange = 1000
  8. local rSpeed = 1.6
  9. --[[    Items   ]]--
  10. local ignite, ghost = nil, nil
  11. local QREADY, WREADY, EREADY, RREADY  = false, false, false, false
  12. local DFGREADY, BRKREADY, HXGREADY, BWCREADY, SRRREADY, YGBREADY = false, false, false, false, false, false
  13. local DFGSlot, BRKSlot, HXGSlot, BWCSlot, SRRSlot, YGBSlot = nil, nil, nil, nil, nil, nil
  14.  
  15. function OnLoad()
  16.     PrintChat("<font color='#CCCCCC'> >> Hecarim Helper 1.2.1 loaded! <<</font>")
  17.     HHConfig = scriptConfig("Hecarim Helper", "HecarimHelper")
  18.     HHConfig:addParam("scriptActive", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 32)
  19.     HHConfig:addParam("speedBurst", "Speed Burst", SCRIPT_PARAM_ONKEYDOWN, false, 90)
  20.     HHConfig:addParam("useR", "Use Ultimate in combo", SCRIPT_PARAM_ONOFF, true)
  21.     HHConfig:addParam("autoignite", "Ignite when Killable", SCRIPT_PARAM_ONOFF, true)
  22.     HHConfig:addParam("drawcirclesSelf", "Draw Circles - Self", SCRIPT_PARAM_ONOFF, false)
  23.     HHConfig:addParam("drawcirclesEnemy", "Draw Circles - Enemy", SCRIPT_PARAM_ONOFF, false)
  24.     HHConfig:permaShow("scriptActive")
  25.     HHConfig:permaShow("speedBurst")
  26.     HHConfig:permaShow("useR")
  27.     ts = TargetSelector(TARGET_LOW_HP, wRange+50, DAMAGE_MAGIC)
  28.     ts.name = "Hecarim"
  29.     HHConfig:addTS(ts)
  30.    
  31.     if myHero:GetSpellData(SUMMONER_1).name:find("SummonerDot") then ignite = SUMMONER_1
  32.         elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerDot") then ignite = SUMMONER_2
  33.     end
  34.     if myHero:GetSpellData(SUMMONER_1).name:find("SummonerHaste") then ghost = SUMMONER_1
  35.         elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerHaste") then ghost = SUMMONER_2
  36.     end
  37. end
  38.  
  39. function OnTick()
  40.     ts:update()
  41.    
  42.     if ts.target ~= nil and not myHero.dead then
  43.         travelDuration = (GetDistance(ts.target, myHero)/rSpeed)
  44.     end
  45.    
  46.     if ts.target ~= nil and RREADY and travelDuration ~= nil then
  47.         predic = GetPredictionPos(ts.target, travelDuration)
  48.     end
  49.    
  50.     if predic ~= nil and ts.target ~= nil then
  51.         TargetPos = Vector(predic.x, predic.y, predic.z)
  52.         MyPos = Vector(myHero.x, myHero.y, myHero.z)
  53.         UltPos = TargetPos + (TargetPos-MyPos)*((200/GetDistance(ts.target)))
  54.     end
  55.    
  56.     DFGSlot, BRKSlot, HXGSlot, BWCSlot, SRRSlot, YGBSlot = GetInventorySlotItem(3153), GetInventorySlotItem(3128), GetInventorySlotItem(3146), GetInventorySlotItem(3144), GetInventorySlotItem(3069), GetInventorySlotItem(3142)
  57.     DFGREADY = (DFGSlot ~= nil and myHero:CanUseSpell(DFGSlot) == READY)
  58.     BRKREADY = (BRKSlot ~= nil and myHero:CanUseSpell(BRKSlot) == READY)
  59.     HXGREADY = (HXGSlot ~= nil and myHero:CanUseSpell(HXGSlot) == READY)
  60.     BWCREADY = (BWCSlot ~= nil and myHero:CanUseSpell(BWCSlot) == READY)
  61.     SRRREADY = (SRRSlot ~= nil and myHero:CanUseSpell(SRRSlot) == READY)
  62.     YGBREADY = (YGBSlot ~= nil and myHero:CanUseSpell(YGBSlot) == READY)
  63.     IREADY = (ignite ~= nil and myHero:CanUseSpell(ignite) == READY)
  64.     GREADY = (ghost ~= nil and myHero:CanUseSpell(ghost) == READY)
  65.     QREADY = (myHero:CanUseSpell(_Q) == READY)
  66.     WREADY = (myHero:CanUseSpell(_W) == READY)
  67.     EREADY = (myHero:CanUseSpell(_E) == READY)
  68.     RREADY = (myHero:CanUseSpell(_R) == READY)
  69.    
  70.     --[[    Auto Ignite ]]--
  71.     if HHConfig.autoignite then    
  72.         if IREADY then
  73.             local ignitedmg = 0    
  74.             for i = 1, heroManager.iCount, 1 do
  75.                 local enemyhero = heroManager:getHero(i)
  76.                 if ValidTarget(enemyhero,600) then
  77.                     ignitedmg = 50 + 20 * myHero.level
  78.                     if enemyhero.health <= ignitedmg then
  79.                         CastSpell(ignite, enemyhero)
  80.                     end
  81.                 end
  82.             end
  83.         end
  84.     end
  85.    
  86.     --[[     Speed Burst    ]]--
  87.     if HHConfig.speedBurst then
  88.         if SRRREADY then CastSpell(SRRSlot) end
  89.         if GREADY then CastSpell(ghost) end
  90.         if EREADY then CastSpell(_E) end
  91.         if YGBREADY then CastSpell(YGBSlot) end
  92.     end
  93.    
  94.     --[[    Basic Combo ]]--
  95.     if ts.target ~= nil and HHConfig.scriptActive then
  96.         --[[    Items   ]]--
  97.         if GetDistance(ts.target) < 550 then
  98.             if DFGREADY then CastSpell(DFGSlot, ts.target) end
  99.             if BRKREADY then CastSpell(BRKSlot, ts.target) end
  100.             if HXGREADY then CastSpell(HXGSlot, ts.target) end
  101.             if BWCREADY then CastSpell(BWCSlot, ts.target) end
  102.             if YGBREADY then CastSpell(YGBSlot) end
  103.         end
  104.         --[[    Abilities   ]]--
  105.         if QREADY and GetDistance(ts.target) <= qRange then
  106.             CastSpell(_Q)
  107.         end
  108.         if WREADY and GetDistance(ts.target) <= wRange then
  109.             CastSpell(_W)
  110.         end
  111.         if RREADY and UltPos ~= nil and GetDistance(predic) < rRange and HHConfig.useR then
  112.             CastSpell(_R, UltPos.x, UltPos.z)
  113.         end
  114.             --[[    Attacks ]]--
  115.         --[[    Nothing Yet ]]--
  116.     end
  117. end
  118.  
  119. function OnDraw()
  120.     if HHConfig.drawcirclesSelf and not myHero.dead then
  121.         DrawCircle(myHero.x, myHero.y, myHero.z, qRange, 0x00FF00)
  122.         DrawCircle(myHero.x, myHero.y, myHero.z, rRange, 0x00FFFF)
  123.     end
  124.     if ts.target ~= nil and HHConfig.drawcirclesEnemy then
  125.         for j=0, 10 do
  126.             DrawCircle(ts.target.x, ts.target.y, ts.target.z, 40 + j*1.5, 0x00FF00)
  127.         end
  128.     end
  129. end
Advertisement
Add Comment
Please, Sign In to add comment