Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if myHero.charName ~= 'Aatrox' then return end
- --Changelog 1.00 release
- --
- --
- require "SxOrbWalk"
- require "VPrediction"
- local Q = {range = 650, delay = 0.5, speed = 1800, width = 140,IsReady = function() return myHero:CanUseSpell(_Q) == READY end}
- local W = {range = 125, IsReady = function() return myHero:CanUseSpell(_W) == READY end}
- local E = {range = 1000, delay = 0.25, speed = 1000, width = 80,IsReady = function() return myHero:CanUseSpell(_E) == READY end}
- local R = {range = 300, delay = 0.25, speed = math.huge, width = 100,IsReady = function() return myHero:CanUseSpell(_R) == READY end}
- local ignite = nil
- local iDmg = 0
- local target = nil
- local ts
- local ts = TargetSelector(TARGET_LESS_CAST_PRIORITY, 750, DAMAGE_PHISICAL, true)
- local myTarget = nil
- local Killable = false
- local ToInterrupt = {}
- local InterruptList = {
- { charName = "Caitlyn", spellName = "CaitlynAceintheHole"},
- { charName = "FiddleSticks", spellName = "Crowstorm"},
- { charName = "FiddleSticks", spellName = "DrainChannel"},
- { charName = "Galio", spellName = "GalioIdolOfDurand"},
- { charName = "Karthus", spellName = "FallenOne"},
- { charName = "Katarina", spellName = "KatarinaR"},
- { charName = "Lucian", spellName = "LucianR"},
- { charName = "Malzahar", spellName = "AlZaharNetherGrasp"},
- { charName = "MissFortune", spellName = "MissFortuneBulletTime"},
- { charName = "Nunu", spellName = "AbsoluteZero"},
- { charName = "Pantheon", spellName = "Pantheon_GrandSkyfall_Jump"},
- { charName = "Shen", spellName = "ShenStandUnited"},
- { charName = "Urgot", spellName = "UrgotSwap2"},
- { charName = "Varus", spellName = "VarusQ"},
- { charName = "Warwick", spellName = "InfiniteDuress"},
- { charName = "Velkoz", spellName = "VelkozR"}
- }
- TextList = {"", " Killable Ult!"}
- KillText = {}
- colorText = ARGB(255,255,204,0)
- function GetCustomTarget()
- ts:update()
- if _G.AutoCarry and ValidTarget(_G.AutoCarry.Crosshair:GetTarget()) then return _G.AutoCarry.Crosshair:GetTarget() end
- if not _G.Reborn_Loaded then return ts.target end
- return ts.target
- end
- function OnLoad()
- PrintChat("<font color=\"#00FF00\">Aatrox by Fukdapolice.</font>")
- ultActive = false
- IgniteCheck()
- FLoadLib()
- VP = VPrediction(true)
- _G.oldDrawCircle = rawget(_G, 'DrawCircle')
- _G.DrawCircle = DrawCircle2
- Minions = minionManager(MINION_ENEMY, E.range, myHero, MINION_SORT_MAXHEALTH_ASC)
- JungleMinions = minionManager(MINION_JUNGLE, E.range, myHero, MINION_SORT_MAXHEALTH_DEC)
- end
- function OnTick()
- target = GetCustomTarget()
- Checks()
- SmartW()
- if HazMenu.Combo.AutoUlt then AutoUlt() end
- end
- function OnDraw()
- if HazMenu.Draw.drawq then
- DrawCircle(myHero.x,myHero.y,myHero.z,650,0xFFFF0000)
- end
- if HazMenu.Draw.drawe then
- DrawCircle(myHero.x,myHero.y,myHero.z,1000,0xFFFF0000)
- end
- if HazMenu.Draw.drawr then
- DrawCircle(myHero.x,myHero.y,myHero.z,300,0xFFFF0000)
- end
- if HazMenu.Draw.drawHP then
- for i, enemy in ipairs(GetEnemyHeroes()) do
- if ValidTarget(enemy) then
- DrawIndicator(enemy)
- end
- end
- end
- if HazMenu.Misc.killtext then
- for i = 1, heroManager.iCount do
- local target = heroManager:GetHero(i)
- if ValidTarget(target) and target ~= nil then
- local barPos = WorldToScreen(D3DXVECTOR3(target.x, target.y, target.z))
- local PosX = barPos.x - 35
- local PosY = barPos.y - 10
- DrawText(TextList[KillText[i]], 16, PosX, PosY, colorText)
- end
- end
- end
- end
- function Checks()
- 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)
- calcDmg()
- LFCfunc()
- if ValidTarget(target) then
- if HazMenu.Misc.KS then KS(target) end
- if HazMenu.Misc.KSR then KS(target) end
- if HazMenu.Misc.Ignite then AutoIgnite(target) end
- end
- if HazMenu.combokey then
- Combo()
- end
- if HazMenu.harasskey then
- Poke()
- end
- if HazMenu.farmkey then
- Farm()
- end
- end
- function IgniteCheck()
- 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 FLoadLib()
- FMenu()
- end
- function FMenu()
- HazMenu = scriptConfig("FukDaAatrox", "Aatrox")
- HazMenu:addParam("combokey", "Combo key(Space)", SCRIPT_PARAM_ONKEYDOWN, false, 32)
- HazMenu:addParam("harasskey", "Harass key(C)", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("C"))
- HazMenu:addParam("farmkey", "Farm key(V)", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("V"))
- HazMenu:addTS(ts)
- HazMenu:addSubMenu("Combo", "Combo")
- HazMenu.Combo:addParam("comboQ", "Use Q", SCRIPT_PARAM_ONOFF, true)
- HazMenu.Combo:addParam("comboW", "Use W", SCRIPT_PARAM_ONOFF, true)
- HazMenu.Combo:addParam("comboE", "Use E", SCRIPT_PARAM_ONOFF, true)
- HazMenu.Combo:addParam("comboR", "Use R", SCRIPT_PARAM_ONOFF, true)
- HazMenu.Combo:addParam("minR", "Auto Ultimate if X enemies", SCRIPT_PARAM_SLICE, 2, 0, 5, 0)
- HazMenu.Combo:addParam("AutoUlt", "Use AutoUlt ^", SCRIPT_PARAM_ONOFF, false)
- HazMenu.Combo:addParam("autoW", "Use W logic", SCRIPT_PARAM_ONOFF, true)
- HazMenu:addSubMenu("Harass", "Harass")
- HazMenu.Harass:addParam("harassQ", "Use Q", SCRIPT_PARAM_ONOFF, true)
- HazMenu.Harass:addParam("harassW", "Use W", SCRIPT_PARAM_ONOFF, true)
- HazMenu.Harass:addParam("harassE", "Use E", SCRIPT_PARAM_ONOFF, true)
- HazMenu:addSubMenu("Farm", "Farm")
- HazMenu.Farm:addParam("farmQ", "Use Q", SCRIPT_PARAM_ONOFF, true)
- HazMenu.Farm:addParam("farmW", "Use W", SCRIPT_PARAM_ONOFF, true)
- HazMenu.Farm:addParam("farmE", "Use E", SCRIPT_PARAM_ONOFF, true)
- HazMenu:addSubMenu("Misc", "Misc")
- HazMenu.Misc:addParam("KSR", "KillSteal with R", SCRIPT_PARAM_ONOFF, true)
- HazMenu.Misc:addParam("KS", "KillSteal with Q and E", SCRIPT_PARAM_ONOFF, true)
- HazMenu.Misc:addParam("Ignite", "Use Auto Ignite", SCRIPT_PARAM_ONOFF, true)
- HazMenu.Misc:addParam("killtext", "Draw if Killable with Q+E+R", SCRIPT_PARAM_ONOFF, true)
- HazMenu:addSubMenu("Draw","Draw")
- HazMenu.Draw:addParam("drawq", "Draw Q", SCRIPT_PARAM_ONOFF, true)
- HazMenu.Draw:addParam("drawe", "Draw E", SCRIPT_PARAM_ONOFF, true)
- HazMenu.Draw:addParam("drawr", "Draw R", SCRIPT_PARAM_ONOFF, true)
- HazMenu.Draw:addParam("drawHP", "Draw Dmg on HPBar", SCRIPT_PARAM_ONOFF, true)
- HazMenu:addParam("Interrupt", "Q interrupt", SCRIPT_PARAM_ONOFF, true)
- HazMenu:addSubMenu("LagFreeCircles", "LFC")
- HazMenu.LFC:addParam("LagFree", "Activate Lag Free Circles", SCRIPT_PARAM_ONOFF, false)
- HazMenu.LFC:addParam("CL", "Length before Snapping", SCRIPT_PARAM_SLICE, 350, 75, 2000, 0)
- HazMenu.LFC:addParam("CLinfo", "Higher length = Lower FPS Drops", SCRIPT_PARAM_INFO, "")
- for i = 1, heroManager.iCount, 1 do
- local enemy = heroManager:getHero(i)
- if enemy.team ~= myHero.team then
- for _, champ in pairs(InterruptList) do
- if enemy.charName == champ.charName then
- table.insert(ToInterrupt, champ.spellName)
- end
- end
- end
- end
- if _G.Reborn_Loaded then
- DelayAction(function()
- PrintChat("<font color = \"#FFFFFF\">[Aatrox] </font><font color = \"#FF0000\">SAC Status:</font> <font color = \"#FFFFFF\">Successfully integrated.</font> </font>")
- HazMenu:addParam("SACON","[Aatrox] SAC:R support is active.", 5, "")
- isSAC = true
- end, 10)
- elseif not _G.Reborn_Loaded then
- PrintChat("<font color = \"#FFFFFF\">[Aatrox] </font><font color = \"#FF0000\">Orbwalker not found:</font> <font color = \"#FFFFFF\">SxOrbWalk integrated.</font> </font>")
- HazMenu:addSubMenu("Orbwalker", "SxOrb")
- SxOrb:LoadToMenu(HazMenu.SxOrb)
- isSX = true
- end
- HazMenu:permaShow("combokey")
- HazMenu:permaShow("harasskey")
- HazMenu:permaShow("farmkey")
- end
- function KS(enemy)
- for i, enemy in ipairs (GetEnemyHeroes()) do
- if E.IsReady() and getDmg("E", enemy, myHero) > enemy.health then
- if GetDistance(enemy) <= E.range and HazMenu.Misc.KS then
- local CastPosition, HitChance, CastPos = VP:GetLineCastPosition(target, E.delay, E.width, E.range, E.speed, myHero, false)
- if HitChance >= 2 and GetDistance(CastPosition) <= E.range and E.IsReady() then
- CastSpell(_E, CastPosition.x, CastPosition.z)
- end
- end
- elseif Q.IsReady() and getDmg("Q", enemy, myHero) > enemy.health and CountEnemies(1200, myHero) < 2 then
- if GetDistance(enemy) <= Q.range and HazMenu.Misc.KS then
- local AOECastPosition, MainTargetHitChance, nTargets = VP:GetCircularAOECastPosition(target, Q.delay, Q.width, Q.range, Q.speed, myHero, false)
- if MainTargetHitChance >= 2 and GetDistance(AOECastPosition) <= Q.range and Q.IsReady() then
- CastSpell(_Q, AOECastPosition.x, AOECastPosition.z)
- end
- end
- end
- if R.IsReady() and (getDmg("R", enemy, myHero)- 15) > enemy.health then
- if GetDistance(enemy) <= R.range and HazMenu.Misc.KSR then
- CastSpell(_R)
- end
- end
- end
- end
- function AutoIgnite(enemy)
- iDmg = ((IREADY and getDmg("IGNITE", enemy, myHero)) or 0)
- if enemy.health <= iDmg and GetDistance(enemy) <= 600 and ignite ~= nil
- then
- if IREADY then CastSpell(ignite, enemy) end
- end
- end
- function OnProcessSpell(unit, spell)
- if HazMenu.Interrupt and Q.IsReady() and #ToInterrupt > 0 then
- for _, ability in pairs(ToInterrupt) do
- if spell.name == ability and unit.team ~= myHero.team then
- if GetDistance(unit) <= Q.range then
- local CastPosition, HitChance, CastPos = VP:GetLineCastPosition(target, Q.delay, Q.width, Q.range, Q.speed, myHero, false)
- if HitChance >= 2 and GetDistance(CastPosition) <= Q.range and Q.IsReady() then
- CastSpell(_Q, CastPosition.x, CastPosition.z)
- end
- end
- end
- end
- end
- end
- function Combo()
- if ValidTarget(target) then
- if Q.IsReady() and HazMenu.Combo.comboQ then
- local AOECastPosition, MainTargetHitChance, nTargets = VP:GetCircularAOECastPosition(target, Q.delay, Q.width, Q.range, Q.speed, myHero, false)
- if MainTargetHitChance >= 2 and GetDistance(AOECastPosition) <= Q.range and Q.IsReady() then
- CastSpell(_Q, AOECastPosition.x, AOECastPosition.z)
- end
- end
- if E.IsReady() and HazMenu.Combo.comboE then
- local CastPosition, HitChance, CastPos = VP:GetLineCastPosition(target, E.delay, E.width, E.range, E.speed, myHero, true)
- if HitChance >= 2 and GetDistance(CastPosition) <= E.range and E.IsReady() then
- CastSpell(_E, CastPosition.x, CastPosition.z)
- end
- end
- if R.IsReady() and HazMenu.Combo.comboR then
- if GetDistance(myHero, target) <= R.range then
- CastSpell(_R)
- end
- end
- end
- end
- function Poke()
- if ValidTarget(target) then
- if Q.IsReady() and HazMenu.Harass.harassQ then
- local AOECastPosition, MainTargetHitChance, nTargets = VP:GetCircularAOECastPosition(target, Q.delay, Q.width, Q.range, Q.speed, myHero, false)
- if MainTargetHitChance >= 2 and GetDistance(AOECastPosition) <= Q.range and Q.IsReady() then
- CastSpell(_Q, AOECastPosition.x, AOECastPosition.z)
- end
- end
- if W.IsReady() and HazMenu.Harass.harassW then
- if GetDistance(target) <= W.range then
- if HazMenu.Combo.autoW then
- SmartW()
- end
- end
- end
- if E.IsReady() and HazMenu.Harass.harassE then
- local CastPosition, HitChance, CastPos = VP:GetLineCastPosition(target, E.delay, E.width, E.range, E.speed, myHero, true)
- if HitChance >= 2 and GetDistance(CastPosition) <= E.range and E.IsReady() then
- CastSpell(_E, CastPosition.x, CastPosition.z)
- end
- end
- end
- end
- function Farm()
- Minions:update()
- for i, Minion in pairs(Minions.objects) do
- if E.IsReady() and HazMenu.Farm.farmE and getDmg("E", Minion, myHero) > Minion.health then
- CastSpell(_E, Minion.x, Minion.z)
- end
- if W.IsReady() and HazMenu.Farm.farmW then
- if HazMenu.Combo.autoW then
- SmartW()
- end
- end
- end
- JungleMinions:update()
- for i, Minion in pairs(JungleMinions.objects) do
- if Q.IsReady() and HazMenu.Farm.farmQ then
- CastSpell(_Q, Minion.x, Minion.z)
- end
- if E.IsReady() and HazMenu.Farm.farmE then
- CastSpell(_E, Minion.x, Minion.z)
- end
- if W.IsReady() and HazMenu.Farm.farmW then
- if HazMenu.Combo.autoW then
- SmartW()
- end
- end
- end
- end
- function calcDmg()
- for i=1, heroManager.iCount do
- local Target = heroManager:GetHero(i)
- if ValidTarget(Target) and Target ~= nil then
- qDmg = ((QREADY and getDmg("Q", Target, myHero)) or 0)
- wDmg = ((WREADY and getDmg("W", Target, myHero)) or 0)
- eDmg = ((EREADY and getDmg("E", Target, myHero)) or 0)
- rDmg = ((RREADY and getDmg("R", Target, myHero)) or 0)
- allDmg = (rDmg)
- if Target.health > allDmg then
- KillText[i] = 1
- elseif Target.health <= allDmg then
- KillText[i] = 2
- end
- end
- end
- end
- function LFCfunc()
- if not HazMenu.LFC.LagFree then _G.DrawCircle = _G.oldDrawCircle end
- if HazMenu.LFC.LagFree then _G.DrawCircle = DrawCircle2 end
- end
- -- Barasia, vadash, viseversa
- function DrawCircleNextLvl(x, y, z, radius, width, color, chordlength)
- radius = radius or 300
- quality = math.max(8,round(180/math.deg((math.asin((chordlength/(2*radius)))))))
- quality = 2 * math.pi / quality
- radius = radius*.92
- local points = {}
- for theta = 0, 2 * math.pi + quality, quality do
- local c = WorldToScreen(D3DXVECTOR3(x + radius * math.cos(theta), y, z - radius * math.sin(theta)))
- points[#points + 1] = D3DXVECTOR2(c.x, c.y)
- end
- DrawLines2(points, width or 1, color or 4294967295)
- end
- function round(num)
- if num >= 0 then return math.floor(num+.5) else return math.ceil(num-.5) end
- end
- function DrawCircle2(x, y, z, radius, color)
- local vPos1 = Vector(x, y, z)
- local vPos2 = Vector(cameraPos.x, cameraPos.y, cameraPos.z)
- local tPos = vPos1 - (vPos1 - vPos2):normalized() * radius
- local sPos = WorldToScreen(D3DXVECTOR3(tPos.x, tPos.y, tPos.z))
- if OnScreen({ x = sPos.x, y = sPos.y }, { x = sPos.x, y = sPos.y }) then
- DrawCircleNextLvl(x, y, z, radius, 1, color, HazMenu.LFC.CL)
- end
- end
- function AutoUlt()
- for i, enemy in ipairs(GetEnemyHeroes()) do
- if enemy ~= nil and GetDistance(enemy) < R.range then
- if CountEnemies(R.range, enemy) >= HazMenu.Combo.minR then
- CastSpell(_R)
- end
- end
- end
- end
- function CountEnemies(range, unit)
- local Enemies = 0
- for _, enemy in ipairs(GetEnemyHeroes()) do
- if ValidTarget(enemy) and GetDistance(enemy, unit) < (range or math.huge) then
- Enemies = Enemies + 1
- end
- end
- return Enemies
- end
- for i, enemy in ipairs(GetEnemyHeroes()) do
- enemy.barData = {PercentageOffset = {x = 0, y = 0} }
- end
- function GetEnemyHPBarPos(enemy)
- if not enemy.barData then
- return
- end
- local barPos = GetUnitHPBarPos(enemy)
- local barPosOffset = GetUnitHPBarOffset(enemy)
- local barOffset = Point(enemy.barData.PercentageOffset.x, enemy.barData.PercentageOffset.y)
- local barPosPercentageOffset = Point(enemy.barData.PercentageOffset.x, enemy.barData.PercentageOffset.y)
- local BarPosOffsetX = 169
- local BarPosOffsetY = 47
- local CorrectionX = 16
- local CorrectionY = 4
- barPos.x = barPos.x + (barPosOffset.x - 0.5 + barPosPercentageOffset.x) * BarPosOffsetX + CorrectionX
- barPos.y = barPos.y + (barPosOffset.y - 0.5 + barPosPercentageOffset.y) * BarPosOffsetY + CorrectionY
- local StartPos = Point(barPos.x, barPos.y)
- local EndPos = Point(barPos.x + 103, barPos.y)
- return Point(StartPos.x, StartPos.y), Point(EndPos.x, EndPos.y)
- end
- function DrawIndicator(enemy)
- local Qdmg, Wdmg, Edmg, AAdmg = getDmg("Q", enemy, myHero), getDmg("W", enemy, myHero), getDmg("E", enemy, myHero), getDmg("AD", enemy, myHero)
- Qdmg = ((Q.IsReady and Qdmg) or 0)
- Wdmg = ((W.IsReady and Wdmg) or 0)
- Edmg = ((E.IsReady and Edmg) or 0)
- Rdmg = ((R.IsReady and Rdmg) or 0)
- AAdmg = ((Aadmg) or 0)
- local damage = Qdmg + Edmg + Rdmg
- local SPos, EPos = GetEnemyHPBarPos(enemy)
- if not SPos then return end
- local barwidth = EPos.x - SPos.x
- local Position = SPos.x + math.max(0, (enemy.health - damage) / enemy.maxHealth) * barwidth
- DrawText("|", 16, math.floor(Position), math.floor(SPos.y + 8), ARGB(255,0,255,0))
- 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))
- end
- function SmartW()
- if HazMenu.Combo.autoW then
- if myHero.health < (myHero.maxHealth * 0.35) then
- if isWOn() then
- CastSpell(_W)
- end
- end
- if myHero.health > (myHero.maxHealth * 0.35) then
- if not isWOn() then
- CastSpell(_W)
- end
- end
- end
- end
- function isWOn()
- if myHero:GetSpellData(_W).name == "aatroxw2" then
- return true
- else
- return false
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment