Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[Gragas by FukDapolice 1.5]]
- if myHero.charName ~= 'Gragas' then return end
- assert(load(Base64Decode("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"), nil, "bt", _ENV))() ScriptStatus("XKNLSSJSRJS")
- --Changelog 1.00 release
- --Changelog 1.1 draws hp bar
- -- fixed ult
- -- reordered code
- --Changelog 1.3 Added HPred for R (experimental)
- --CHANGELOG 1.4 fixed httf messing up with api
- --Changelog 1.5 fixed bugs released open source
- require "SxOrbWalk"
- require "VPrediction"
- require "HPrediction"
- local Q = {range = 950, delay = 0.25, speed = 1100, width = 200,IsReady = function() return myHero:CanUseSpell(_Q) == READY end}
- local W = {range = 600, IsReady = function() return myHero:CanUseSpell(_W) == READY end}
- local E = {range = 650, delay = 0.25, speed = 1000, width = 100,IsReady = function() return myHero:CanUseSpell(_E) == READY end}
- local R = {range = 800, delay = 0.25, speed = 1300, width = 100,IsReady = function() return myHero:CanUseSpell(_R) == READY end}
- local ignite = nil
- local iDmg = 0
- local target = nil
- local myTarget = nil
- local ts
- local ts = TargetSelector(TARGET_LESS_CAST_PRIORITY, 1500, DAMAGE_MAGIC, true)
- local myTarget = nil
- local Killable = false
- local HPred = HPrediction()
- 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\">Gragas by Fukdapolice.</font>")
- ultActive = false
- IgniteCheck()
- FLoadLib()
- VP = VPrediction(true)
- _G.oldDrawCircle = rawget(_G, 'DrawCircle')
- _G.DrawCircle = DrawCircle2
- Minions = minionManager(MINION_ENEMY, Q.range, myHero, MINION_SORT_MAXHEALTH_ASC)
- JungleMinions = minionManager(MINION_JUNGLE, Q.range, myHero, MINION_SORT_MAXHEALTH_DEC)
- HP_Q = HPSkillshot({collisionM = false, collisionH = false, delay = 0.25, range = 800, speed = 1100, type = "DelayLine", width = 200})
- HP_E = HPSkillshot({collisionM = true, collisionH = true, delay = 0.25, range = 650, speed = 1000, type = "DelayLine", width = 100})
- HP_R = HPSkillshot({collisionM = false, collisionH = false, delay = 0.25, range = 950, speed = 1300, type = "DelayLine", width = 100})
- end
- function OnTick()
- target = GetCustomTarget()
- Checks()
- --if isSX then
- --SxOrb:ForceTarget(target)
- --end
- if UltActive then
- if CountEnemyHeroInRange(R.range) == 0 then
- local AOECastPosition, MainTargetHitChance, nTargets = VP:GetCircularAOECastPosition(target, R.delay, R.width, R.range, R.speed, myHero, false)
- if MainTargetHitChance >= 2 and GetDistance(AOECastPosition) <= R.range and R.IsReady() then
- CastSpell(_R, AOECastPosition.x, AOECastPosition.z)
- end
- end
- end
- if HazMenu.Combo.AutoUlt then AutoUlt() end
- end
- function OnDraw()
- if HazMenu.Draw.drawq then
- DrawCircle(myHero.x,myHero.y,myHero.z,950,0xFFFF0000)
- end
- if HazMenu.Draw.drawe then
- DrawCircle(myHero.x,myHero.y,myHero.z,650,0xFFFF0000)
- end
- if HazMenu.Draw.drawr then
- DrawCircle(myHero.x,myHero.y,myHero.z,850,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 target then
- if HazMenu.Misc.UltIn and GetDistance(Target) <= Rrange then CastR(Target, 3) end
- if HazMenu.Misc.UltOut and GetDistance(Target) <= Rrange then CastR(Target, 2) end
- if R.IsReady() and HazMenu.Combo.comboR and GetDistance(target) <= R.range then castR(target, HazMenu.Misc.UltDir) end
- end
- if HazMenu.combokey then
- Combo()
- end
- if HazMenu.harasskey and myHero.mana / myHero.maxMana > HazMenu.Harass.Mana /100 then
- Poke()
- end
- if HazMenu.farmkey and myHero.mana / myHero.maxMana > HazMenu.Farm.Mana /100 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("Gragas", "Gragas")
- 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: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.Harass:addParam("Mana", "Mana Manager %", SCRIPT_PARAM_SLICE, 50, 1, 100, 0)
- 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.Farm:addParam("Mana", "Mana Manager %", SCRIPT_PARAM_SLICE, 50, 1, 100, 0)
- HazMenu:addSubMenu("Misc", "Misc")
- HazMenu.Misc:addParam("Pred", "Use HPred", SCRIPT_PARAM_ONOFF, true)
- HazMenu.Misc:addParam("KSR", "KillSteal with R", SCRIPT_PARAM_ONOFF, true)
- HazMenu.Misc:addParam("KS", "KillSteal with Q", SCRIPT_PARAM_ONOFF, true)
- HazMenu.Misc:addParam("Ignite", "Use Auto Ignite", SCRIPT_PARAM_ONOFF, true)
- HazMenu.Misc:addParam("killtext", "Draw if Killable with combo", SCRIPT_PARAM_ONOFF, true)
- HazMenu.Misc:addParam("UltOut", "Ult enemy Away", SCRIPT_PARAM_ONKEYDOWN, false, 46)
- HazMenu.Misc:addParam("UltIn", "Ult enemy To-You", SCRIPT_PARAM_ONKEYDOWN, false, 44)
- HazMenu.Misc:addParam("UltDir", "Default Ult direction", SCRIPT_PARAM_LIST, 1, { "On Target", "ahead", "behind" })
- 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", "Ult 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\">[Gragas] </font><font color = \"#FF0000\">SAC Status:</font> <font color = \"#FFFFFF\">Successfully integrated.</font> </font>")
- HazMenu:addParam("SACON","[Gragas] SAC:R support is active.", 5, "")
- isSAC = true
- end, 10)
- elseif not _G.Reborn_Loaded then
- PrintChat("<font color = \"#FFFFFF\">[Gragas] </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)
- if Q.IsReady() and getDmg("Q", enemy, myHero) > enemy.health then
- if GetDistance(enemy) <= Q.range and HazMenu.Misc.KS 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
- if R.IsReady() and (getDmg("R", enemy, myHero)- 15) > enemy.health then
- if GetDistance(enemy) <= R.range and HazMenu.Misc.KSR then
- local AOECastPosition, MainTargetHitChance, nTargets = VP:GetCircularAOECastPosition(target, R.delay, R.width, R.range, R.speed, myHero, false)
- if MainTargetHitChance >= 2 and GetDistance(AOECastPosition) <= R.range and R.IsReady() then
- CastSpell(_R, AOECastPosition.x, AOECastPosition.z)
- 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 Rready and #ToInterrupt > 0 then
- for _, ability in pairs(ToInterrupt) do
- if spell.name == ability and unit.team ~= myHero.team then
- if GetDistance(unit) <= Rrange then CastR(unit) end
- end
- end
- end
- end
- function Combo()
- if ValidTarget(target) then
- if R.IsReady() and HazMenu.Combo.comboR then
- if HazMenu.Misc.Pred then
- HPredR(target, HazMenu.Misc.UltDir)
- elseif not HazMenu.Misc.Pred then
- castR(target, HazMenu.Misc.UltDir)
- end
- end
- if W.IsReady() and HazMenu.Combo.comboW then
- if GetDistance(target) <= W.range then
- CastSpell(_W)
- end
- end
- if E.IsReady() and HazMenu.Combo.comboE then
- if HazMenu.Misc.Pred then
- HPredE()
- elseif not HazMenu.Misc.Pred 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
- if Q.IsReady() and HazMenu.Combo.comboQ then
- if HazMenu.Misc.Pred then
- HPredQ()
- elseif not HazMenu.Misc.Pred 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
- function Poke()
- if ValidTarget(target) then
- if Q.IsReady() and HazMenu.Harass.harassQ then
- if HazMenu.Misc.Pred then
- HPredQ()
- elseif not HazMenu.Misc.Pred 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
- if W.IsReady() and HazMenu.Harass.harassW then
- if GetDistance(target) <= W.range then
- CastSpell(_W)
- end
- end
- if E.IsReady() and HazMenu.Harass.harassE then
- if HazMenu.Misc.Pred then
- HPredE()
- elseif not HazMenu.Misc.Pred 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
- end
- function Farm()
- Minions:update()
- for i, Minion in pairs(Minions.objects) do
- if Q.IsReady() and HazMenu.Farm.farmQ and getDmg("Q", Minion, myHero) > Minion.health then
- CastSpell(_Q, Minion.x, Minion.z)
- 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
- CastSpell(_W)
- end
- end
- end
- function castR(enemy, direction)
- if HazMenu.Combo.comboR and HazMenu.combokey then
- local CastPosition, HitChance, Position = VP:GetCircularCastPosition(enemy, R.delay, R.width, R.range, R.speed, myHero, false)
- if GetDistance(CastPosition) <= R.range then
- if HitChance >= 2 then
- if direction and direction == 3 then
- local CastBehind = CastPosition + Vector(CastPosition.x-myHero.x, 0, CastPosition.z-myHero.z):normalized()*100
- CastSpell(_R, CastBehind.x, CastBehind.z)
- elseif direction and direction == 2 then
- local CastAhead = CastPosition + Vector(CastPosition.x-myHero.x, 0, CastPosition.z-myHero.z):normalized()
- CastSpell(_R, CastAhead.x, CastAhead.z)
- else CastSpell(_R, CastPosition.x, CastPosition.z) end
- end
- end
- end
- end
- function HPredR(enemy, direction)
- local unit = target
- if HazMenu.Combo.comboR and HazMenu.combokey then
- local RPos, RHitChance = HPred:GetPredict(HP_R, unit, myHero)
- if GetDistance(target, myHero) <= R.range then
- if RHitChance >= 1 then
- if direction and direction == 3 then
- local CastBehind = RPos + Vector(RPos.x-myHero.x, 0, RPos.z-myHero.z):normalized()*100
- CastSpell(_R, CastBehind.x, CastBehind.z)
- elseif direction and direction == 2 then
- local CastAhead = RPos + Vector(RPos.x-myHero.x, 0, RPos.z-myHero.z):normalized()
- CastSpell(_R, CastAhead.x, CastAhead.z)
- else CastSpell(_R, RPos.x, RPos.z) end
- end
- end
- end
- end
- function HPredQ(unit)
- local unit = target
- local QPos, QHitChance = HPred:GetPredict(HP_Q, unit, myHero)
- if QHitChance >= 1 then
- CastSpell(_Q, QPos.x, QPos.z)
- end
- end
- function HPredE(unit)
- local unit = target
- local EPos, EHitChance = HPred:GetPredict(HP_E, unit, myHero)
- if EHitChance >= 1 then
- CastSpell(_E, EPos.x, EPos.z)
- 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 and not ultActive then
- if CountEnemies(R.range, enemy) >= HazMenu.Combo.minR then
- local AOECastPosition, MainTargetHitChance, nTargets = VP:GetCircularAOECastPosition(target, R.delay, R.width, R.range, R.speed, myHero, false)
- if MainTargetHitChance >= 2 and GetDistance(AOECastPosition) <= R.range and R.IsReady() then
- CastSpell(_R, AOECastPosition.x, AOECastPosition.z)
- end
- 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 + Wdmg + 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement