FukDaPolice

Clarity Aatrox

May 6th, 2015
418
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 17.14 KB | None | 0 0
  1. if myHero.charName ~= 'Aatrox' then return end
  2.  
  3.  
  4. --Changelog 1.00 release
  5. --
  6. --                          
  7.  
  8. require "SxOrbWalk"
  9. require "VPrediction"
  10.  
  11.  
  12. local Q = {range = 650, delay = 0.5, speed = 1800, width = 140,IsReady = function() return myHero:CanUseSpell(_Q) == READY end}
  13. local W = {range = 125, IsReady = function() return myHero:CanUseSpell(_W) == READY end}
  14. local E = {range = 1000, delay = 0.25, speed = 1000, width = 80,IsReady = function() return myHero:CanUseSpell(_E) == READY end}
  15. local R = {range = 300, delay = 0.25, speed = math.huge, width = 100,IsReady = function() return myHero:CanUseSpell(_R) == READY end}
  16. local ignite = nil
  17. local iDmg = 0
  18. local target = nil
  19. local ts
  20. local ts = TargetSelector(TARGET_LESS_CAST_PRIORITY, 750, DAMAGE_PHISICAL, true)
  21. local myTarget = nil
  22. local Killable = false
  23.  
  24.  
  25. local ToInterrupt = {}
  26. local InterruptList = {
  27.     { charName = "Caitlyn", spellName = "CaitlynAceintheHole"},
  28.     { charName = "FiddleSticks", spellName = "Crowstorm"},
  29.     { charName = "FiddleSticks", spellName = "DrainChannel"},
  30.     { charName = "Galio", spellName = "GalioIdolOfDurand"},
  31.     { charName = "Karthus", spellName = "FallenOne"},
  32.     { charName = "Katarina", spellName = "KatarinaR"},
  33.     { charName = "Lucian", spellName = "LucianR"},
  34.     { charName = "Malzahar", spellName = "AlZaharNetherGrasp"},
  35.     { charName = "MissFortune", spellName = "MissFortuneBulletTime"},
  36.     { charName = "Nunu", spellName = "AbsoluteZero"},                            
  37.     { charName = "Pantheon", spellName = "Pantheon_GrandSkyfall_Jump"},
  38.     { charName = "Shen", spellName = "ShenStandUnited"},
  39.     { charName = "Urgot", spellName = "UrgotSwap2"},
  40.     { charName = "Varus", spellName = "VarusQ"},
  41.     { charName = "Warwick", spellName = "InfiniteDuress"},
  42.     { charName = "Velkoz", spellName = "VelkozR"}
  43. }
  44.  
  45.  
  46. TextList = {"", " Killable Ult!"}
  47. KillText = {}
  48. colorText = ARGB(255,255,204,0)
  49.  
  50.  
  51. function GetCustomTarget()
  52.     ts:update()
  53.     if _G.AutoCarry and ValidTarget(_G.AutoCarry.Crosshair:GetTarget()) then return _G.AutoCarry.Crosshair:GetTarget() end
  54.     if not _G.Reborn_Loaded then return ts.target end
  55.     return ts.target
  56. end
  57.  
  58. function OnLoad()
  59.     PrintChat("<font color=\"#00FF00\">Aatrox by Fukdapolice.</font>")
  60.     ultActive = false
  61.     IgniteCheck()
  62.     FLoadLib()
  63.     VP = VPrediction(true)  
  64.     _G.oldDrawCircle = rawget(_G, 'DrawCircle')
  65.     _G.DrawCircle = DrawCircle2
  66.     Minions = minionManager(MINION_ENEMY, E.range, myHero, MINION_SORT_MAXHEALTH_ASC)
  67.     JungleMinions = minionManager(MINION_JUNGLE, E.range, myHero, MINION_SORT_MAXHEALTH_DEC)
  68.    
  69. end
  70.  
  71. function OnTick()
  72.     target = GetCustomTarget()
  73.     Checks()
  74.     SmartW()
  75.    
  76.    
  77.     if HazMenu.Combo.AutoUlt then AutoUlt() end
  78. end
  79.  
  80. function OnDraw()
  81.     if HazMenu.Draw.drawq then
  82.         DrawCircle(myHero.x,myHero.y,myHero.z,650,0xFFFF0000)
  83.     end            
  84.     if HazMenu.Draw.drawe then
  85.         DrawCircle(myHero.x,myHero.y,myHero.z,1000,0xFFFF0000)
  86.     end
  87.     if HazMenu.Draw.drawr then
  88.         DrawCircle(myHero.x,myHero.y,myHero.z,300,0xFFFF0000)
  89.     end
  90.     if  HazMenu.Draw.drawHP then
  91.             for i, enemy in ipairs(GetEnemyHeroes()) do
  92.                 if ValidTarget(enemy) then
  93.                    DrawIndicator(enemy)
  94.                 end
  95.             end
  96.     end    
  97.     if HazMenu.Misc.killtext then
  98.         for i = 1, heroManager.iCount do
  99.             local target = heroManager:GetHero(i)
  100.             if ValidTarget(target) and target ~= nil then
  101.                 local barPos = WorldToScreen(D3DXVECTOR3(target.x, target.y, target.z))
  102.                 local PosX = barPos.x - 35
  103.                 local PosY = barPos.y - 10
  104.                
  105.                 DrawText(TextList[KillText[i]], 16, PosX, PosY, colorText)
  106.             end
  107.         end
  108.     end
  109. end
  110.  
  111.  
  112. function Checks()
  113.     IREADY = (ignite ~= nil and myHero:CanUseSpell(ignite) == READY)
  114.     QREADY = (myHero:CanUseSpell(_Q) == READY)
  115.     WREADY = (myHero:CanUseSpell(_W) == READY)
  116.     EREADY = (myHero:CanUseSpell(_E) == READY)
  117.     RREADY = (myHero:CanUseSpell(_R) == READY) 
  118.    
  119.  
  120.  
  121.    
  122.     calcDmg()
  123.     LFCfunc()
  124.     if ValidTarget(target) then
  125.         if HazMenu.Misc.KS then KS(target) end
  126.         if HazMenu.Misc.KSR then KS(target) end
  127.         if HazMenu.Misc.Ignite then AutoIgnite(target) end
  128.     end
  129.    
  130.    
  131.    
  132.     if HazMenu.combokey then
  133.         Combo()
  134.     end
  135.    
  136.    if HazMenu.harasskey then
  137.         Poke()
  138.    end
  139.    if HazMenu.farmkey then
  140.         Farm()
  141.    end
  142. end
  143.  
  144. function IgniteCheck()
  145.     if myHero:GetSpellData(SUMMONER_1).name:find("summonerdot") then
  146.         ignite = SUMMONER_1
  147.     elseif myHero:GetSpellData(SUMMONER_2).name:find("summonerdot") then
  148.         ignite = SUMMONER_2
  149.     end
  150. end
  151.  
  152. function FLoadLib()
  153.     FMenu()
  154. end
  155.  
  156. function FMenu()
  157.     HazMenu = scriptConfig("FukDaAatrox", "Aatrox")
  158.         HazMenu:addParam("combokey", "Combo key(Space)", SCRIPT_PARAM_ONKEYDOWN, false, 32)
  159.         HazMenu:addParam("harasskey", "Harass key(C)", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("C"))
  160.         HazMenu:addParam("farmkey", "Farm key(V)", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("V"))
  161.    
  162.     HazMenu:addTS(ts)
  163.        
  164.     HazMenu:addSubMenu("Combo", "Combo")
  165.         HazMenu.Combo:addParam("comboQ", "Use Q", SCRIPT_PARAM_ONOFF, true)
  166.         HazMenu.Combo:addParam("comboW", "Use W", SCRIPT_PARAM_ONOFF, true)
  167.         HazMenu.Combo:addParam("comboE", "Use E", SCRIPT_PARAM_ONOFF, true)
  168.         HazMenu.Combo:addParam("comboR", "Use R", SCRIPT_PARAM_ONOFF, true)
  169.         HazMenu.Combo:addParam("minR", "Auto Ultimate if X enemies", SCRIPT_PARAM_SLICE, 2, 0, 5, 0)
  170.         HazMenu.Combo:addParam("AutoUlt", "Use AutoUlt ^", SCRIPT_PARAM_ONOFF, false)
  171.         HazMenu.Combo:addParam("autoW", "Use W logic", SCRIPT_PARAM_ONOFF, true)
  172.        
  173.        
  174.        
  175.     HazMenu:addSubMenu("Harass", "Harass")
  176.         HazMenu.Harass:addParam("harassQ", "Use Q", SCRIPT_PARAM_ONOFF, true)
  177.         HazMenu.Harass:addParam("harassW", "Use W", SCRIPT_PARAM_ONOFF, true)
  178.         HazMenu.Harass:addParam("harassE", "Use E", SCRIPT_PARAM_ONOFF, true)
  179.  
  180.    
  181.     HazMenu:addSubMenu("Farm", "Farm")
  182.         HazMenu.Farm:addParam("farmQ", "Use Q", SCRIPT_PARAM_ONOFF, true)
  183.         HazMenu.Farm:addParam("farmW", "Use W", SCRIPT_PARAM_ONOFF, true)
  184.         HazMenu.Farm:addParam("farmE", "Use E", SCRIPT_PARAM_ONOFF, true)
  185.        
  186.    
  187.     HazMenu:addSubMenu("Misc", "Misc")
  188.         HazMenu.Misc:addParam("KSR", "KillSteal with R", SCRIPT_PARAM_ONOFF, true)
  189.         HazMenu.Misc:addParam("KS", "KillSteal with Q and E", SCRIPT_PARAM_ONOFF, true)
  190.         HazMenu.Misc:addParam("Ignite", "Use Auto Ignite", SCRIPT_PARAM_ONOFF, true)
  191.         HazMenu.Misc:addParam("killtext", "Draw if Killable with Q+E+R", SCRIPT_PARAM_ONOFF, true)     
  192.        
  193.     HazMenu:addSubMenu("Draw","Draw")
  194.       HazMenu.Draw:addParam("drawq", "Draw Q", SCRIPT_PARAM_ONOFF, true)
  195.       HazMenu.Draw:addParam("drawe", "Draw E", SCRIPT_PARAM_ONOFF, true)
  196.       HazMenu.Draw:addParam("drawr", "Draw R", SCRIPT_PARAM_ONOFF, true)
  197.       HazMenu.Draw:addParam("drawHP", "Draw Dmg on HPBar", SCRIPT_PARAM_ONOFF, true)
  198.    
  199.     HazMenu:addParam("Interrupt", "Q interrupt", SCRIPT_PARAM_ONOFF, true)
  200.    
  201.     HazMenu:addSubMenu("LagFreeCircles", "LFC")
  202.       HazMenu.LFC:addParam("LagFree", "Activate Lag Free Circles", SCRIPT_PARAM_ONOFF, false)
  203.       HazMenu.LFC:addParam("CL", "Length before Snapping", SCRIPT_PARAM_SLICE, 350, 75, 2000, 0)
  204.       HazMenu.LFC:addParam("CLinfo", "Higher length = Lower FPS Drops", SCRIPT_PARAM_INFO, "")
  205.    
  206.     for i = 1, heroManager.iCount, 1 do
  207.         local enemy = heroManager:getHero(i)
  208.         if enemy.team ~= myHero.team then
  209.             for _, champ in pairs(InterruptList) do
  210.                 if enemy.charName == champ.charName then
  211.                     table.insert(ToInterrupt, champ.spellName)
  212.                 end
  213.             end
  214.         end
  215.     end
  216.    
  217.     if _G.Reborn_Loaded then
  218.     DelayAction(function()
  219.         PrintChat("<font color = \"#FFFFFF\">[Aatrox] </font><font color = \"#FF0000\">SAC Status:</font> <font color = \"#FFFFFF\">Successfully integrated.</font> </font>")
  220.         HazMenu:addParam("SACON","[Aatrox] SAC:R support is active.", 5, "")
  221.         isSAC = true
  222.     end, 10)
  223.     elseif not _G.Reborn_Loaded then
  224.         PrintChat("<font color = \"#FFFFFF\">[Aatrox] </font><font color = \"#FF0000\">Orbwalker not found:</font> <font color = \"#FFFFFF\">SxOrbWalk integrated.</font> </font>")
  225.         HazMenu:addSubMenu("Orbwalker", "SxOrb")
  226.         SxOrb:LoadToMenu(HazMenu.SxOrb)
  227.         isSX = true
  228.     end
  229.     HazMenu:permaShow("combokey")
  230.     HazMenu:permaShow("harasskey")
  231.     HazMenu:permaShow("farmkey")
  232. end
  233.  
  234. function KS(enemy)
  235.     for i, enemy in ipairs (GetEnemyHeroes()) do
  236.     if E.IsReady() and getDmg("E", enemy, myHero) > enemy.health then
  237.         if GetDistance(enemy) <= E.range and HazMenu.Misc.KS then
  238.             local CastPosition, HitChance, CastPos = VP:GetLineCastPosition(target, E.delay, E.width, E.range, E.speed, myHero, false)
  239.             if HitChance >= 2 and GetDistance(CastPosition) <= E.range and E.IsReady() then
  240.                 CastSpell(_E, CastPosition.x, CastPosition.z)
  241.             end
  242.         end
  243.     elseif Q.IsReady() and getDmg("Q", enemy, myHero) > enemy.health and CountEnemies(1200, myHero) < 2 then
  244.             if GetDistance(enemy) <= Q.range and HazMenu.Misc.KS then
  245.                 local AOECastPosition, MainTargetHitChance, nTargets = VP:GetCircularAOECastPosition(target, Q.delay, Q.width, Q.range, Q.speed, myHero, false)
  246.                 if MainTargetHitChance >= 2 and GetDistance(AOECastPosition) <= Q.range and Q.IsReady() then
  247.                    CastSpell(_Q, AOECastPosition.x, AOECastPosition.z)
  248.                 end
  249.             end
  250.         end
  251.     if R.IsReady() and (getDmg("R", enemy, myHero)- 15) > enemy.health then
  252.         if GetDistance(enemy) <= R.range and HazMenu.Misc.KSR then
  253.                 CastSpell(_R)
  254.             end
  255.         end
  256.     end
  257. end
  258.  
  259. function AutoIgnite(enemy)
  260.     iDmg = ((IREADY and getDmg("IGNITE", enemy, myHero)) or 0)
  261.     if enemy.health <= iDmg and GetDistance(enemy) <= 600 and ignite ~= nil
  262.         then
  263.             if IREADY then CastSpell(ignite, enemy) end
  264.     end
  265. end
  266.  
  267. function OnProcessSpell(unit, spell)
  268.     if HazMenu.Interrupt and Q.IsReady() and #ToInterrupt > 0 then
  269.         for _, ability in pairs(ToInterrupt) do
  270.             if spell.name == ability and unit.team ~= myHero.team then
  271.                 if GetDistance(unit) <= Q.range then
  272.                     local CastPosition, HitChance, CastPos = VP:GetLineCastPosition(target, Q.delay, Q.width, Q.range, Q.speed, myHero, false)
  273.                     if HitChance >= 2 and GetDistance(CastPosition) <= Q.range and Q.IsReady() then
  274.                        CastSpell(_Q, CastPosition.x, CastPosition.z)
  275.                     end
  276.                 end
  277.             end
  278.         end
  279.     end
  280.    
  281. end
  282.  
  283. function Combo()
  284.     if ValidTarget(target) then
  285.                            
  286.         if Q.IsReady() and HazMenu.Combo.comboQ then
  287.             local AOECastPosition, MainTargetHitChance, nTargets = VP:GetCircularAOECastPosition(target, Q.delay, Q.width, Q.range, Q.speed, myHero, false)
  288.             if MainTargetHitChance >= 2 and GetDistance(AOECastPosition) <= Q.range and Q.IsReady() then
  289.                 CastSpell(_Q, AOECastPosition.x, AOECastPosition.z)
  290.             end
  291.         end
  292.         if E.IsReady() and HazMenu.Combo.comboE then
  293.             local CastPosition, HitChance, CastPos = VP:GetLineCastPosition(target, E.delay, E.width, E.range, E.speed, myHero, true)
  294.             if HitChance >= 2 and GetDistance(CastPosition) <= E.range and E.IsReady() then
  295.                 CastSpell(_E, CastPosition.x, CastPosition.z)
  296.             end
  297.         end
  298.         if R.IsReady() and HazMenu.Combo.comboR then       
  299.             if GetDistance(myHero, target) <= R.range then
  300.                CastSpell(_R)
  301.             end  
  302.         end            
  303.     end
  304. end
  305.  
  306. function Poke()
  307.     if ValidTarget(target) then
  308.         if Q.IsReady() and HazMenu.Harass.harassQ then
  309.             local AOECastPosition, MainTargetHitChance, nTargets = VP:GetCircularAOECastPosition(target, Q.delay, Q.width, Q.range, Q.speed, myHero, false)
  310.             if MainTargetHitChance >= 2 and GetDistance(AOECastPosition) <= Q.range and Q.IsReady() then
  311.                 CastSpell(_Q, AOECastPosition.x, AOECastPosition.z)
  312.             end
  313.         end
  314.         if W.IsReady() and HazMenu.Harass.harassW then
  315.             if GetDistance(target) <= W.range then
  316.                 if HazMenu.Combo.autoW then
  317.                     SmartW()               
  318.                 end
  319.             end
  320.         end
  321.         if E.IsReady() and HazMenu.Harass.harassE then
  322.             local CastPosition, HitChance, CastPos = VP:GetLineCastPosition(target, E.delay, E.width, E.range, E.speed, myHero, true)
  323.             if HitChance >= 2 and GetDistance(CastPosition) <= E.range and E.IsReady() then
  324.                 CastSpell(_E, CastPosition.x, CastPosition.z)
  325.             end
  326.         end
  327.     end
  328. end
  329.  
  330. function Farm()
  331.     Minions:update()
  332.    
  333.     for i, Minion in pairs(Minions.objects) do
  334.         if E.IsReady() and HazMenu.Farm.farmE and getDmg("E", Minion, myHero) > Minion.health then
  335.             CastSpell(_E, Minion.x, Minion.z)
  336.         end
  337.         if  W.IsReady() and HazMenu.Farm.farmW then
  338.             if HazMenu.Combo.autoW then
  339.                 SmartW()           
  340.             end
  341.         end
  342.     end
  343.     JungleMinions:update()
  344.     for i, Minion in pairs(JungleMinions.objects) do
  345.         if  Q.IsReady() and HazMenu.Farm.farmQ then
  346.             CastSpell(_Q, Minion.x, Minion.z)
  347.         end
  348.         if  E.IsReady() and HazMenu.Farm.farmE then
  349.             CastSpell(_E, Minion.x, Minion.z)
  350.         end
  351.         if  W.IsReady() and HazMenu.Farm.farmW then
  352.             if HazMenu.Combo.autoW then
  353.                 SmartW()           
  354.             end
  355.         end
  356.     end
  357. end
  358.  
  359.  
  360.  
  361. function calcDmg()
  362.     for i=1, heroManager.iCount do
  363.         local Target = heroManager:GetHero(i)
  364.         if ValidTarget(Target) and Target ~= nil then
  365.             qDmg = ((QREADY and getDmg("Q", Target, myHero)) or 0)
  366.             wDmg = ((WREADY and getDmg("W", Target, myHero)) or 0)
  367.             eDmg = ((EREADY and getDmg("E", Target, myHero)) or 0)
  368.             rDmg = ((RREADY and getDmg("R", Target, myHero)) or 0)
  369.             allDmg = (rDmg)
  370.            
  371.             if Target.health > allDmg then
  372.                 KillText[i] = 1
  373.             elseif Target.health <= allDmg then
  374.                 KillText[i] = 2
  375.             end
  376.         end
  377.     end
  378. end
  379.  
  380. function LFCfunc()
  381.     if not HazMenu.LFC.LagFree then _G.DrawCircle = _G.oldDrawCircle end
  382.     if HazMenu.LFC.LagFree then _G.DrawCircle = DrawCircle2 end
  383. end
  384.  
  385. -- Barasia, vadash, viseversa
  386.  
  387. function DrawCircleNextLvl(x, y, z, radius, width, color, chordlength)
  388.     radius = radius or 300
  389.     quality = math.max(8,round(180/math.deg((math.asin((chordlength/(2*radius)))))))
  390.     quality = 2 * math.pi / quality
  391.     radius = radius*.92
  392.     local points = {}
  393.     for theta = 0, 2 * math.pi + quality, quality do
  394.         local c = WorldToScreen(D3DXVECTOR3(x + radius * math.cos(theta), y, z - radius * math.sin(theta)))
  395.         points[#points + 1] = D3DXVECTOR2(c.x, c.y)
  396.     end
  397.     DrawLines2(points, width or 1, color or 4294967295)
  398. end
  399.  
  400. function round(num)
  401.     if num >= 0 then return math.floor(num+.5) else return math.ceil(num-.5) end
  402. end
  403.  
  404. function DrawCircle2(x, y, z, radius, color)
  405.     local vPos1 = Vector(x, y, z)
  406.     local vPos2 = Vector(cameraPos.x, cameraPos.y, cameraPos.z)
  407.     local tPos = vPos1 - (vPos1 - vPos2):normalized() * radius
  408.     local sPos = WorldToScreen(D3DXVECTOR3(tPos.x, tPos.y, tPos.z))
  409.     if OnScreen({ x = sPos.x, y = sPos.y }, { x = sPos.x, y = sPos.y }) then
  410.         DrawCircleNextLvl(x, y, z, radius, 1, color, HazMenu.LFC.CL)
  411.     end
  412. end
  413.  
  414. function AutoUlt()
  415.     for i, enemy in ipairs(GetEnemyHeroes()) do
  416.         if enemy ~= nil and GetDistance(enemy) < R.range then
  417.             if CountEnemies(R.range, enemy) >= HazMenu.Combo.minR then             
  418.                   CastSpell(_R)
  419.                 end
  420.                
  421.             end
  422.         end
  423.    
  424. end
  425.  
  426. function CountEnemies(range, unit)
  427.     local Enemies = 0
  428.     for _, enemy in ipairs(GetEnemyHeroes()) do
  429.         if ValidTarget(enemy) and GetDistance(enemy, unit) < (range or math.huge) then
  430.             Enemies = Enemies + 1
  431.         end
  432.     end
  433.     return Enemies
  434. end
  435.  
  436.  
  437.  
  438. for i, enemy in ipairs(GetEnemyHeroes()) do
  439.     enemy.barData = {PercentageOffset = {x = 0, y = 0} }
  440. end
  441.  
  442. function GetEnemyHPBarPos(enemy)
  443.  
  444.     if not enemy.barData then
  445.         return
  446.     end
  447.  
  448.     local barPos = GetUnitHPBarPos(enemy)
  449.     local barPosOffset = GetUnitHPBarOffset(enemy)
  450.     local barOffset = Point(enemy.barData.PercentageOffset.x, enemy.barData.PercentageOffset.y)
  451.     local barPosPercentageOffset = Point(enemy.barData.PercentageOffset.x, enemy.barData.PercentageOffset.y)
  452.  
  453.     local BarPosOffsetX = 169
  454.     local BarPosOffsetY = 47
  455.     local CorrectionX = 16
  456.     local CorrectionY = 4
  457.  
  458.     barPos.x = barPos.x + (barPosOffset.x - 0.5 + barPosPercentageOffset.x) * BarPosOffsetX + CorrectionX
  459.     barPos.y = barPos.y + (barPosOffset.y - 0.5 + barPosPercentageOffset.y) * BarPosOffsetY + CorrectionY
  460.  
  461.     local StartPos = Point(barPos.x, barPos.y)
  462.     local EndPos = Point(barPos.x + 103, barPos.y)
  463.  
  464.     return Point(StartPos.x, StartPos.y), Point(EndPos.x, EndPos.y)
  465.  
  466. end
  467.  
  468.  
  469.  
  470. function DrawIndicator(enemy)
  471.     local Qdmg, Wdmg, Edmg, AAdmg = getDmg("Q", enemy, myHero), getDmg("W", enemy, myHero), getDmg("E", enemy, myHero), getDmg("AD", enemy, myHero)
  472.    
  473.     Qdmg = ((Q.IsReady and Qdmg) or 0)
  474.     Wdmg = ((W.IsReady and Wdmg) or 0)
  475.     Edmg = ((E.IsReady and Edmg) or 0)
  476.     Rdmg = ((R.IsReady and Rdmg) or 0)
  477.     AAdmg = ((Aadmg) or 0)
  478.  
  479.     local damage = Qdmg + Edmg + Rdmg
  480.  
  481.     local SPos, EPos = GetEnemyHPBarPos(enemy)
  482.  
  483.     if not SPos then return end
  484.  
  485.     local barwidth = EPos.x - SPos.x
  486.     local Position = SPos.x + math.max(0, (enemy.health - damage) / enemy.maxHealth) * barwidth
  487.  
  488.     DrawText("|", 16, math.floor(Position), math.floor(SPos.y + 8), ARGB(255,0,255,0))
  489.     DrawText("HP: "..math.floor(enemy.health - damage), 12, math.floor(SPos.x + 25), math.floor(SPos.y - 15), (enemy.health - damage) > 0 and ARGB(255, 0, 255, 0) or  ARGB(255, 255, 0, 0))
  490. end
  491.  
  492.  
  493.  
  494.  
  495. function SmartW()
  496.     if HazMenu.Combo.autoW then
  497.         if myHero.health < (myHero.maxHealth * 0.35) then
  498.             if isWOn() then
  499.                CastSpell(_W)    
  500.             end  
  501.         end
  502.         if myHero.health > (myHero.maxHealth * 0.35) then
  503.             if not isWOn() then
  504.                CastSpell(_W)    
  505.             end  
  506.         end
  507.     end
  508. end
  509.  
  510. function isWOn()
  511.   if myHero:GetSpellData(_W).name == "aatroxw2" then
  512.     return true
  513.   else
  514.     return false
  515.   end
  516. end
Advertisement
Add Comment
Please, Sign In to add comment