Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local _b = 2
- if GetMyHero().charName ~= "Gangplank" then
- return
- end
- require("HPrediction")
- require("VPrediction")
- local ab, bb, cb, db
- local _c = 630
- ab = TargetSelector(TARGET_LOW_HP_PRIORITY, _c)
- bb = TargetSelector(TARGET_LOW_HP_PRIORITY, 1400)
- db = TargetSelector(TARGET_LOW_HP_PRIORITY, 100000000)
- cb = TargetSelector(TARGET_LOW_HP_PRIORITY, 300)
- COLOR_WHITE, COLOR_GREEN, COLOR_RED, COLOR_YELLOW, COLOR_TRANS_WHITE = ARGB(255, 255, 255, 255), ARGB(255, 0, 255, 0), ARGB(255, 255, 0, 0), ARGB(255, 255, 255, 0), ARGB(170, 255, 255, 255)
- COLOR_TRANS_GREEN, COLOR_TRANS_RED, COLOR_TRANS_YELLOW = ARGB(150, 0, 255, 0), ARGB(150, 255, 0, 0), ARGB(150, 255, 255, 0)
- Recalling = false
- local ac = {
- [5] = true,
- [8] = true,
- [11] = true,
- [21] = true,
- [22] = true,
- [24] = true,
- [25] = true,
- [28] = true
- }
- local bc = {
- [10] = true
- }
- local cc = {
- [7] = true
- }
- function OnLoad()
- local dc = tonumber(GetWebResult("raw.github.com", "/barasia283/Main/master/Captain%20Gameplank.rev"))
- HPred = HPrediction()
- VP = VPrediction()
- HP_E = HPSkillshot({
- type = "DelayCircle",
- delay = 1,
- range = 1345,
- radius = 345,
- speed = 1200
- })
- HP_R = HPSkillshot({
- type = "DelayCircle",
- delay = 3,
- range = 100000000,
- radius = 150,
- speed = 0
- })
- enemyTable = GetEnemyHeroes()
- if 0 < #enemyTable then
- if #enemyTable == 1 then
- menucharsettinge = {"c1"}
- elseif #enemyTable == 2 then
- menucharsettinge = {"c1", "c2"}
- elseif #enemyTable == 3 then
- menucharsettinge = {
- "c1",
- "c2",
- "c3"
- }
- elseif #enemyTable == 4 then
- menucharsettinge = {
- "c1",
- "c2",
- "c3",
- "c4"
- }
- elseif #enemyTable == 5 then
- menucharsettinge = {
- "c1",
- "c2",
- "c3",
- "c4",
- "c5"
- }
- end
- else
- menucharsettinge = {}
- end
- menucc = {
- "hard",
- "slow",
- "silence"
- }
- menucolors = {
- "WHITE",
- "GREEN",
- "RED",
- "YELLOW",
- "BLUE",
- "CYAN",
- "MAGENTA"
- }
- menuexecutioner = {
- "1",
- "2",
- "3"
- }
- menucolorsval = {
- RGB(255, 255, 255),
- RGB(0, 255, 0),
- RGB(255, 0, 0),
- RGB(255, 255, 0),
- RGB(0, 0, 255),
- RGB(0, 255, 255),
- RGB(255, 0, 255)
- }
- barreltable = {}
- lastAttack, lastWindUpTime, lastAttackCD, qlastWindUpTime = 0, 0, 0, 0
- sheenbuff = false
- autoeflag = false
- lastsheenbuff = 0
- lastautoe = 0
- lastmove = 0
- automoveflag = false
- sheenbuffcheck = false
- frozenfistbuffcheck = false
- lichbanebuffcheck = false
- muramanabuffcheck = false
- Menu = scriptConfig("Captain Gameplank", "")
- Menu:addParam("trinityflag", "Have Trinity Force", SCRIPT_PARAM_ONOFF, false)
- Menu.trinityflag = false
- ab.name = "Q TS"
- Menu:addTS(ab)
- bb.name = "E TS"
- Menu:addTS(bb)
- Menu:addSubMenu("W Settings", "AutoW2")
- Menu.AutoW2:addParam("AutoW", "Auto W when Low HP", SCRIPT_PARAM_ONOFF, true)
- Menu.AutoW2:addParam("percenthp", "What % to W", SCRIPT_PARAM_SLICE, 20, 0, 100, 0)
- for _d, ad in pairs(menucharsettinge) do
- local bd = enemyTable[_d]
- Menu.AutoW2:addSubMenu("W CC from:" .. bd.charName, ad)
- for cd, dd in pairs(menucc) do
- Menu.AutoW2[ad]:addParam(dd, bd.charName .. "|AutoW|" .. dd, SCRIPT_PARAM_ONOFF, false)
- end
- end
- Menu:addSubMenu("Combo", "Combo")
- Menu.Combo:addDynamicParam("modeswitch", "Auto Combo", SCRIPT_PARAM_ONKEYDOWN, false, 32)
- Menu.Combo:addDynamicParam("FarmQ", "Farm Q Minions", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("A"))
- Menu.Combo:addDynamicParam("CastE", "Cast Kegs", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("C"))
- Menu.Combo:addDynamicParam("HarasQ", "Harass Q", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("Z"))
- Menu.Combo:addDynamicParam("DBarrel", "Detonate Barrel", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("X"))
- Menu:addSubMenu("KS Option", "KS")
- Menu.KS:addParam("AutoQ", "KS Q", SCRIPT_PARAM_ONOFF, true)
- Menu.KS:addParam("AutoR", "KS R", SCRIPT_PARAM_ONOFF, true)
- Menu:addSubMenu("Drawings", "Drawrange")
- Menu.Drawrange:addParam("Drawrange", "Draw Players Ranges", SCRIPT_PARAM_ONOFF, true)
- Menu.Drawrange:addParam("Drawrangecolor", "Players Ranges Color", SCRIPT_PARAM_LIST, 1, menucolors)
- Menu.Drawrange:addParam("Drawkeg", "Draw Kegs", SCRIPT_PARAM_ONOFF, true)
- Menu.Drawrange:addParam("Drawkegcolor", "Players Kegs Color", SCRIPT_PARAM_LIST, 2, menucolors)
- Menu.Drawrange:addParam("Drawkegcursor", "Draw Keg Cursor", SCRIPT_PARAM_ONOFF, true)
- Menu.Drawrange:addParam("Drawkegcursorcolor", "Keg Cursor Color", SCRIPT_PARAM_LIST, 3, menucolors)
- Menu.Drawrange:addParam("Drawpred", "Draw Predictions", SCRIPT_PARAM_ONOFF, true)
- Menu.Drawrange:addParam("Drawcalcm", "Draw Damage Calc Minions", SCRIPT_PARAM_ONOFF, true)
- Menu.Drawrange:addParam("Drawcalcc", "Draw Damage Calc Champ", SCRIPT_PARAM_ONOFF, true)
- Menu:addSubMenu("Masteries", "masteries")
- Menu.masteries:addParam("doSword", "Double-Edged Sword", SCRIPT_PARAM_ONOFF, false)
- Menu.masteries:addParam("butcher", "Butcher", SCRIPT_PARAM_ONOFF, false)
- Menu.masteries:addParam("havoc", "Havoc", SCRIPT_PARAM_ONOFF, false)
- Menu.masteries:addParam("executioner", "Executioner", SCRIPT_PARAM_ONOFF, false)
- Menu.masteries:addParam("executionerlevel", "Executioner Level", SCRIPT_PARAM_LIST, 1, menuexecutioner)
- Menu.Combo:permaShow("FarmQ")
- Menu.Combo:permaShow("HarasQ")
- Menu.Combo:permaShow("CastE")
- Menu.Combo:permaShow("DBarrel")
- Menu.Combo:permaShow("modeswitch")
- if dc > _b then
- PrintChat("<font color='#00FFFF'>>>Captain Gameplank V1." .. _b .. " by Barasia283</font>")
- PrintChat("<font color='#00FFFF'> There is a new update available: V1." .. dc .. " Please download from the thread.</font>")
- else
- PrintChat("<font color='#00FFFF'>>>Captain Gameplank V1." .. _b .. " by Barasia283</font>")
- end
- end
- function OnTick()
- updatebarrels()
- if os.clock() > lastsheenbuff + 1.5 and sheenbuffcheck == true then
- sheenbuff = true
- end
- if os.clock() > lastautoe + 2 then
- autoeflag = true
- end
- if os.clock() > lastmove + 0.2 then
- automoveflag = true
- end
- ab:update()
- bb:update()
- cb:update()
- db:update()
- if bb.target ~= nil then
- EPos, EHitChance = HPred:GetPredict(HP_E, bb.target, myHero)
- else
- EQPos = {
- x = 0,
- y = 0,
- z = 0
- }
- end
- AutoE()
- autodetonatebarrel()
- AutoW()
- AutoQ()
- AutoR()
- HarasQ()
- CastE()
- FarmQ()
- detonatebarrel()
- OrbWalk()
- end
- function CastE()
- if Menu.Combo.CastE and myHero:CanUseSpell(_E) == READY then
- local dc
- local _d = 200
- for bd, cd in ipairs(enemyTable) do
- local dd = castpredictbarrelto1enemy(cd)
- if _d > GetDistance(dd, mousePos) and dd ~= nil and cd.dead == false then
- _d = GetDistance(dd, mousePos)
- dc = dd
- end
- end
- if dc ~= nil and GetDistance(dc, player) < 1000 then
- CastSpell(_E, dc.x, dc.z)
- end
- local ad = getclosestbarreltomouse()
- if GetDistance(ad, player) < 1000 then
- myHero:MoveTo(ad.x, ad.z)
- end
- CastSpell(_E, ad.x, ad.z)
- end
- end
- function AutoE()
- if Menu.Combo.modeswitch and myHero:CanUseSpell(_E) == READY and bb.target ~= nil then
- local dc, _d, ad = getclosestbarreltotarget(bb.target)
- if dc ~= nil and _d == false and ad == true and autoeflag == true and GetDistance(dc, player) < 1000 then
- CastSpell(_E, dc.x, dc.z)
- lastautoe = os.clock()
- autoeflag = false
- end
- end
- end
- function detonatelinkedbarrel(dc, _d)
- local ad = dc
- if ad ~= nil then
- for bd, cd in ipairs(barreltable) do
- if cd == ad and #cd.link ~= 0 then
- for dd, __a in ipairs(cd.link) do
- for a_a, b_a in pairs(enemyTable) do
- if GetDistance(__a, b_a) < 345 and b_a.dead == false then
- return true
- end
- end
- end
- end
- end
- end
- end
- function autodetonatebarrel()
- if Menu.Combo.modeswitch then
- local dc = getclosest1hpbarreltome()
- for _d, ad in pairs(enemyTable) do
- if dc ~= nil and ad ~= nil and GetDistance(dc, ad) < 345 and ad.dead == false then
- if myHero:CanUseSpell(_Q) == READY then
- CastSpell(_Q, dc)
- end
- if GetDistance(dc) < 120 then
- myHero:Attack(dc)
- end
- elseif dc ~= nil and #dc.link ~= 0 and ad ~= nil and ad.dead == false then
- for bd, cd in ipairs(dc.link) do
- if GetDistance(cd, ad) < 345 or detonatelinkedbarrel(cd, dc) then
- if myHero:CanUseSpell(_Q) == READY then
- CastSpell(_Q, dc)
- end
- if GetDistance(dc) < 120 then
- myHero:Attack(dc)
- end
- end
- end
- end
- end
- end
- end
- function detonatebarrel()
- if Menu.Combo.DBarrel then
- local dc = getclosest1hpbarreltome()
- if dc ~= nil then
- if myHero:CanUseSpell(_Q) == READY then
- CastSpell(_Q, dc)
- end
- if GetDistance(dc) < 120 then
- myHero:Attack(dc)
- end
- end
- end
- end
- function AutoQ()
- if Menu.KS.AutoQ and myHero:CanUseSpell(_Q) == READY then
- for dc, _d in pairs(enemyTable) do
- local ad = getdamagemodchamps(_d)
- local bd = getDmg("Q", _d, GetMyHero()) + getDmg("AD", _d, GetMyHero()) + checkonhitdmg(_d, GetMyHero())
- bd = bd * ad
- if bd >= _d.health and ValidTarget(_d, 620) then
- CastSpell(_Q, _d)
- end
- end
- end
- end
- function AutoR()
- if Menu.KS.AutoR and TargetHaveBuff("GangplankRUpgrade2", player) == true and myHero:CanUseSpell(_R) == READY then
- for dc, _d in pairs(enemyTable) do
- if _d ~= nil then
- local ad = getdamagemodchamps(_d)
- local bd = player:GetSpellData(_R).level * 60 + 90 + player.ap * 0.3 + 2 * myHero:CalcMagicDamage(_d, player:GetSpellData(_R).level * 20 + 30 + player.ap * 0.1)
- bd = bd * ad
- if bd >= _d.health and _d.dead == false and _d.visible == true then
- local cd = castpredictrenemy(_d)
- CastSpell(_R, cd.x, cd.z)
- end
- end
- end
- end
- end
- function HarasQ()
- if Menu.Combo.HarasQ and myHero:CanUseSpell(_Q) == READY and ab.target ~= nil and ValidTarget(ab.target, 620) then
- CastSpell(_Q, ab.target)
- end
- end
- function AutoW()
- if Menu.AutoW2.AutoW and not Recalling and myHero:CanUseSpell(_W) == READY and myHero.health < myHero.maxHealth * (Menu.AutoW2.percenthp * 0.01) then
- CastSpell(_W)
- end
- end
- function FarmQ()
- if Menu.Combo.FarmQ and myHero:CanUseSpell(_Q) == READY then
- local dc = 1
- if Menu.masteries.doSword then
- dc = dc + 0.02
- end
- if Menu.masteries.havoc then
- dc = dc + 0.03
- end
- for _d, ad in pairs(minionManager(MINION_ENEMY, 620, player, MINION_SORT_HEALTH_ASC).objects) do
- local bd = getDmg("Q", ad, GetMyHero()) + getDmg("AD", ad, GetMyHero()) + 1 * checkonhitdmg(ad, GetMyHero())
- bd = math.floor(bd * dc)
- if Menu.masteries.butcher then
- bd = bd + 2
- end
- local cd = ad.health
- if bd >= cd and ad.name ~= "barrel" then
- CastSpell(_Q, ad)
- end
- end
- end
- end
- function OnCreateObj(dc)
- end
- function OnDeleteObj(dc)
- if GetDistance(GetMyHero(), dc) < 80 then
- end
- if (dc.name:find("enrage_buf.troy") or dc.name:find("bluehands_buf.troy") or dc.name:find("purplehands_buf.troy")) and GetDistance(GetMyHero(), dc) < 50 then
- sheenbuff = false
- lastsheenbuff = os.clock()
- end
- end
- function OnApplyBuff(dc, _d, ad)
- if _d == myHero and ad.name == "sheen" then
- sheenbuff = true
- sheenbuffcheck = true
- end
- if _d == myHero and ad.name == "itemfrozenfist" then
- sheenbuff = true
- sheenbuffcheck = true
- frozenfistbuffcheck = true
- end
- if _d == myHero and ad.name == "lichbane" then
- sheenbuff = true
- sheenbuffcheck = true
- lichbanebuffcheck = true
- end
- if _d == myHero and ad.name == "Muramana" then
- muramanabuffcheck = true
- end
- if _d == myHero then
- end
- if _d.name == "Barrel" and ad.name == "gangplankebarrelactive" and dc.isMe then
- local bd = _d
- bd.ctime = os.clock()
- bd.timeto1 = 0
- bd.link = {}
- bd.endtime = os.clock() + 60
- table.insert(barreltable, bd)
- end
- if _d.name == "Barrel" and ad.name == "gangplankebarrellink" then
- DelayAction(function()
- addbarrellink(dc, _d)
- end, 0.1)
- DelayAction(function()
- addbarrellink(_d, dc)
- end, 0.1)
- end
- if enemyTable[1] ~= nil and dc == enemyTable[1] and _d == myHero then
- for bd, cd in pairs(menucc) do
- if Menu.AutoW2.c1[cd] then
- if cd == "hard" and ac[ad.type] then
- CastSpell(_W)
- elseif cd == "slow" and bc[ad.type] then
- CastSpell(_W)
- elseif cd == "silence" and cc[ad.type] then
- CastSpell(_W)
- end
- end
- end
- end
- if enemyTable[2] ~= nil and dc == enemyTable[2] and _d == myHero then
- for bd, cd in pairs(menucc) do
- if Menu.AutoW2.c2[cd] then
- if cd == "hard" and ac[ad.type] then
- CastSpell(_W)
- elseif cd == "slow" and bc[ad.type] then
- CastSpell(_W)
- elseif cd == "silence" and cc[ad.type] then
- CastSpell(_W)
- end
- end
- end
- end
- if enemyTable[3] ~= nil and dc == enemyTable[3] and _d == myHero then
- for bd, cd in pairs(menucc) do
- if Menu.AutoW2.c3[cd] then
- if cd == "hard" and ac[ad.type] then
- CastSpell(_W)
- elseif cd == "slow" and bc[ad.type] then
- CastSpell(_W)
- elseif cd == "silence" and cc[ad.type] then
- CastSpell(_W)
- end
- end
- end
- end
- if enemyTable[4] ~= nil and dc == enemyTable[4] and _d == myHero then
- for bd, cd in pairs(menucc) do
- if Menu.AutoW2.c4[cd] then
- if cd == "hard" and ac[ad.type] then
- CastSpell(_W)
- elseif cd == "slow" and bc[ad.type] then
- CastSpell(_W)
- elseif cd == "silence" and cc[ad.type] then
- CastSpell(_W)
- end
- end
- end
- end
- if enemyTable[5] ~= nil and dc == enemyTable[5] and _d == myHero then
- for bd, cd in pairs(menucc) do
- if Menu.AutoW2.c5[cd] then
- if cd == "hard" and ac[ad.type] then
- CastSpell(_W)
- elseif cd == "slow" and bc[ad.type] then
- CastSpell(_W)
- elseif cd == "silence" and cc[ad.type] then
- CastSpell(_W)
- end
- end
- end
- end
- end
- function OnRemoveBuff(dc, _d)
- if dc == myHero and (_d.name == "sheen" or _d.name == "itemfrozenfist" or _d.name == "lichbane") then
- sheenbuff = false
- lastsheenbuff = os.clock()
- end
- if dc == myHero and _d.name == "Muramana" then
- muramanabuffcheck = false
- end
- end
- function addbarrellink(dc, _d)
- for ad, bd in pairs(barreltable) do
- if bd.networkID == _d.networkID then
- table.insert(bd.link, dc)
- end
- end
- end
- function updatebarrels()
- for dc, _d in ipairs(barreltable) do
- if _d.health == 0 then
- table.remove(barreltable, dc)
- dc = dc - 1
- elseif _d.health > 0 then
- local ad = 0
- if player.level < 7 then
- ad = 2
- elseif player.level < 13 and player.level >= 7 then
- ad = 1
- elseif player.level >= 13 then
- ad = 0.5
- end
- local bd = _d.ctime + 2 * ad - os.clock()
- local cd = math.max(math.ceil(bd / ad + 1), 1)
- if cd > _d.health then
- bd = bd - ad
- _d.timeto1 = bd
- else
- _d.timeto1 = bd
- end
- end
- end
- end
- function getclosestbarreltomouse()
- local dc = mousePos
- local _d = 1000
- for ad, bd in ipairs(barreltable) do
- if _d > GetDistance(bd, mousePos) and GetDistance(bd, mousePos) > 345 and bd ~= nil then
- _d = GetDistance(bd, mousePos)
- local cd = Vector(bd.x, bd.y, bd.z)
- local dd = Vector(mousePos.x, mousePos.y, mousePos.z)
- local __a = (dd - cd):normalized()
- local a_a = cd + __a * 685
- dc = a_a
- end
- end
- return dc
- end
- function getclosestbarreltotarget(dc)
- local _d = dc
- local ad, bd
- if EPos ~= nil and EHitChance >= 0 then
- ad = EPos
- else
- ad = dc
- end
- local cd = false
- local dd = false
- local __a = 1035
- for a_a, b_a in ipairs(barreltable) do
- if GetDistance(b_a, ad) < 345 then
- cd = true
- end
- if __a > GetDistance(b_a, ad) and GetDistance(b_a, ad) > 345 and b_a ~= nil and cd == false then
- if b_a.timeto1 < qlastWindUpTime + GetDistance(b_a, player) / 2500 + 0.5 and GetDistance(b_a, player) < 650 and GetDistance(b_a, player) > 125 and myHero:CanUseSpell(_Q) == READY then
- __a = GetDistance(b_a, ad)
- bd = b_a
- dd = true
- elseif b_a.timeto1 < lastWindUpTime + 0.5 and GetDistance(b_a, player) < 120 then
- __a = GetDistance(b_a, ad)
- bd = b_a
- dd = true
- end
- end
- end
- if bd ~= nil then
- local a_a = 0
- if __a > 345 and __a < 685 then
- a_a = math.max(__a, 500)
- elseif __a > 685 then
- a_a = 685
- end
- local b_a = Vector(bd.x, bd.y, bd.z)
- local c_a = Vector(ad.x, ad.y, ad.z)
- local d_a = (c_a - b_a):normalized()
- local _aa = b_a + d_a * a_a
- _d = _aa
- end
- return _d, cd, dd
- end
- function getclosest1hpbarreltome()
- local dc
- local _d = 650
- for ad, bd in ipairs(barreltable) do
- if _d > GetDistance(bd, player) and bd ~= nil then
- if bd.timeto1 < qlastWindUpTime + GetDistance(bd, player) / 2500 and _d > GetDistance(bd, player) and GetDistance(bd, player) > 125 then
- _d = GetDistance(bd, player)
- dc = bd
- elseif bd.timeto1 < lastAttackCD and GetDistance(bd, player) < 125 then
- _d = GetDistance(bd, player)
- dc = bd
- end
- end
- end
- return dc
- end
- function drawpredictbarrelto1enemy(dc)
- local _d = 0
- if player.level < 7 then
- _d = 4.3
- elseif player.level < 13 and player.level >= 7 then
- _d = 2.3
- elseif player.level >= 13 then
- _d = 1.3
- end
- local ad, bd, cd = VP:GetCircularCastPosition(dc, _d, 10, 1345)
- DrawLine3D(dc.x, dc.y, dc.z, ad.x, ad.y, ad.z, 1, COLOR_RED, true)
- DrawCircle3D(ad.x, ad.y, ad.z, 20, 1, COLOR_YELLOW)
- end
- function castpredictbarrelto1enemy(dc)
- local _d = 0
- if player.level < 7 then
- _d = 4.5
- elseif player.level < 13 and player.level >= 7 then
- _d = 2.5
- elseif player.level >= 13 then
- _d = 1.5
- end
- local ad, bd, cd = VP:GetCircularCastPosition(dc, _d, 10, 1345)
- return ad
- end
- function castpredictrenemy(dc)
- local _d, ad, bd = VP:GetCircularCastPosition(dc, 1.2, 200, 100000000)
- return _d
- end
- function drawpredictrenemy(dc)
- local _d = castpredictrenemy(dc)
- DrawLine3D(dc.x, dc.y, dc.z, _d.x, _d.y, _d.z, 1, COLOR_RED, true)
- DrawCircle3D(_d.x, _d.y, _d.z, 20, 1, COLOR_RED)
- end
- function OnProcessSpell(dc, _d)
- local ad = _d.name
- local bd = _d.startPos
- local cd = _d.endPos
- if _d.name:lower():find("gangplankqproceed") and dc.isMe then
- qlastWindUpTime = _d.windUpTime
- end
- if _d.name:lower():find("attack") and dc.isMe then
- lastAttack = os.clock()
- lastWindUpTime = _d.windUpTime
- lastAttackCD = _d.animationTime
- end
- end
- function customCalcDamage(dc, _d, ad, bd, cd)
- local dd = cd
- local __a = dc.armorPen or 0
- local a_a = dc.armorPenPercent or 0
- local b_a = 0
- local c_a = 0
- local d_a = 0
- c_a = dd - ad
- if c_a > 0 then
- d_a = c_a * (1 - bd) * (1 - a_a) - __a
- if d_a < 0 then
- d_a = 0
- end
- else
- d_a = c_a
- end
- if d_a > 0 then
- b_a = _d * (100 / (100 + d_a))
- else
- b_a = _d * (2 - 100 / (100 - d_a))
- end
- return b_a
- end
- function OnDraw()
- if Menu.Drawrange.Drawrange then
- DrawCircle3D(myHero.x, myHero.y, myHero.z, 620, 1, menucolorsval[Menu.Drawrange.Drawrangecolor])
- DrawCircle3D(myHero.x, myHero.y, myHero.z, 1000, 1, menucolorsval[Menu.Drawrange.Drawrangecolor])
- end
- if Menu.Drawrange.Drawkegcursor then
- local dc = getclosestbarreltomouse()
- if dc ~= nil then
- DrawCircle3D(dc.x, dc.y, dc.z, 345, 1, menucolorsval[Menu.Drawrange.Drawkegcursorcolor])
- end
- end
- if Menu.Drawrange.Drawpred then
- if ValidTarget(bb.target, 1345) and EPos ~= nil then
- DrawLine3D(bb.target.x, bb.target.y, bb.target.z, EPos.x, EPos.y, EPos.z, 1, COLOR_RED, true)
- end
- for dc, _d in ipairs(enemyTable) do
- if _d == nil then
- return
- end
- if _d.dead == false and _d.visible == true then
- drawpredictbarrelto1enemy(_d)
- if TargetHaveBuff("GangplankRUpgrade2", player) == true and myHero:CanUseSpell(_R) == READY then
- drawpredictrenemy(_d)
- end
- end
- end
- if bb.target ~= nil then
- local dc, _d, ad = getclosestbarreltotarget(bb.target)
- if dc ~= nil and _d == false and ad == true then
- DrawCircle3D(dc.x, dc.y, dc.z, 345, 1, COLOR_YELLOW)
- end
- end
- end
- if Menu.Drawrange.Drawcalcm then
- miniondraw()
- end
- if Menu.Drawrange.Drawcalcc then
- champdraw()
- end
- if Menu.Drawrange.Drawkeg then
- for dc, _d in ipairs(barreltable) do
- DrawCircle3D(_d.x, _d.y, _d.z, 345, 1, menucolorsval[Menu.Drawrange.Drawkegcolor])
- DrawText3D("Hp:" .. _d.health, _d.x, _d.y, _d.z + 200, 18, menucolorsval[Menu.Drawrange.Drawkegcolor], true)
- if _d.timeto1 > 0 then
- DrawText3D("T-1:" .. round(_d.timeto1, 1), _d.x, _d.y, _d.z + 260, 18, menucolorsval[Menu.Drawrange.Drawkegcolor], true)
- else
- DrawText3D("T:" .. round(_d.endtime - os.clock(), 0), _d.x, _d.y, _d.z + 260, 18, menucolorsval[Menu.Drawrange.Drawkegcolor], true)
- end
- if #_d.link ~= 0 then
- for ad, bd in ipairs(_d.link) do
- local cd = bd
- if cd.health > 0 then
- DrawLine3D(_d.x, _d.y, _d.z, cd.x, cd.y, cd.z, 1, COLOR_TRANS_WHITE)
- DrawCircle3D(cd.x, cd.y, cd.z, 20, 1, COLOR_YELLOW)
- end
- end
- end
- end
- end
- end
- function round(dc, _d)
- local ad = 10 ^ (_d or 0)
- return math.floor(dc * ad + 0.5) / ad
- end
- function checkonhitdmg(dc, _d)
- local ad = 3042
- local bd = 3057
- local cd = 3334
- local dd = 3356
- local __a = 3025
- local a_a = 0
- local b_a = 0
- local c_a = GetInventoryHaveItem(ad)
- local d_a = GetInventoryHaveItem(bd)
- local _aa = GetInventoryHaveItem(cd)
- local aaa = GetInventoryHaveItem(dd)
- local baa = GetInventoryHaveItem(__a)
- if muramanabuffcheck == true then
- a_a = a_a + getDmg("MURAMANA", dc, _d)
- end
- if sheenbuff and sheenbuffcheck then
- b_a = getDmg("SHEEN", dc, _d)
- end
- if sheenbuff and frozenfistbuffcheck then
- b_a = getDmg("ICEBORN", dc, _d)
- end
- if sheenbuff and (_aa or Menu.trinityflag) then
- b_a = getDmg("TRINITY", dc, _d)
- end
- if sheenbuff and lichbanebuffcheck then
- b_a = getDmg("LICHBANE", dc, _d)
- end
- a_a = a_a + b_a
- return a_a
- end
- function miniondraw()
- for dc, _d in pairs(minionManager(MINION_ENEMY, 2000, player, MINION_SORT_HEALTH_ASC).objects) do
- local ad = getDmg("AD", _d, GetMyHero())
- local bd = myHero:CalcDamage(_d, 25 * player:GetSpellData(_Q).level - 5 + player.totalDamage)
- local cd = checkonhitdmg(_d, player)
- DrawMobIndicators(_d, bd, cd)
- end
- end
- function champdraw()
- for dc, _d in pairs(enemyTable) do
- local ad = myHero:CalcDamage(_d, 25 * player:GetSpellData(_Q).level - 5 + player.totalDamage)
- local bd = checkonhitdmg(_d, player)
- DrawChampIndicators(_d, ad, bd)
- end
- end
- function DrawChampIndicators(dc, _d, ad)
- local bd, cd, dd = GetHpBarInfoChamp(dc)
- local __a = myHero:CalcDamage(dc, myHero.totalDamage)
- local a_a = _d
- local b_a = _d + ad
- local c_a = player:GetSpellData(_R).level * 60 + 90 + player.ap * 0.3 + 2 * myHero:CalcMagicDamage(dc, player:GetSpellData(_R).level * 20 + 30 + player.ap * 0.1)
- local d_a = getdamagemodchamps(dc)
- __a = math.floor(__a * d_a)
- a_a = math.floor(a_a * d_a)
- b_a = math.floor(b_a * d_a)
- c_a = math.floor(c_a * d_a)
- local _aa = __a / dc.maxHealth * cd
- local aaa = a_a / dc.maxHealth * cd
- local baa = b_a / dc.maxHealth * cd
- local caa = c_a / dc.maxHealth * cd
- local daa = dc.health / dc.maxHealth * cd
- local _ba = bd.x + _aa
- local aba = bd.x + aaa
- local bba = bd.x + baa
- local cba = bd.x + caa
- if dc.dead == false and dc.visible == true then
- if cba < bd.x + daa and TargetHaveBuff("GangplankRUpgrade2", player) == true and myHero:CanUseSpell(_R) == READY then
- DrawLine(cba, bd.y - 1, cba, bd.y + dd, 1, 4294967295)
- end
- if _ba < bd.x + daa then
- DrawLine(_ba, bd.y - 1, _ba, bd.y + dd, 1, 4287137928)
- end
- if aba < bd.x + daa then
- DrawLine(aba, bd.y - 1, aba, bd.y + dd, 1, 4294967040)
- end
- if bba < bd.x + daa and sheenbuffcheck == true then
- DrawLine(bba, bd.y - 1, bba, bd.y + dd, 1, 4294901760)
- end
- end
- local dba = math.ceil(dc.health / __a)
- local _ca
- if __a >= dc.health then
- _ca = 4287137928
- elseif a_a >= dc.health and __a < dc.health then
- _ca = 4294967040
- elseif b_a >= dc.health and a_a < dc.health then
- _ca = 4294901760
- elseif TargetHaveBuff("GangplankRUpgrade2", player) == true and myHero:CanUseSpell(_R) == READY and c_a > dc.health then
- _ca = 4294967295
- end
- if _ca ~= nil and dc.dead == false and dc.visible == true then
- DrawOutlineRectangle(bd.x - 1, bd.y - 1, cd + 1, dd + 1, _ca)
- end
- if dc.dead == false and dc.visible == true then
- DrawText(tostring(dba), 14, bd.x - 1, bd.y - 13, __a >= dc.health and 4278255360 or 4278255615)
- end
- end
- function DrawMobIndicators(dc, _d, ad)
- local bd, cd, dd = GetHpBarInfo(dc)
- local __a = myHero:CalcDamage(dc, myHero.totalDamage)
- local a_a = _d
- local b_a = _d + ad
- local c_a = 1
- if Menu.masteries.doSword then
- c_a = c_a + 0.02
- end
- if Menu.masteries.havoc then
- c_a = c_a + 0.03
- end
- __a = math.floor(__a * c_a)
- if Menu.masteries.butcher then
- __a = __a + 2
- end
- local d_a = __a / dc.maxHealth * cd
- local _aa = a_a / dc.maxHealth * cd
- local aaa = b_a / dc.maxHealth * cd
- local baa = dc.health / dc.maxHealth * cd
- local caa = bd.x + d_a
- local daa = bd.x + _aa
- local _ba = bd.x + aaa
- if caa < bd.x + baa then
- DrawLine(caa, bd.y - 1, caa, bd.y + dd, 1, 4287137928)
- end
- if daa < bd.x + baa then
- DrawLine(daa, bd.y - 1, daa, bd.y + dd, 1, 4294967040)
- end
- if _ba < bd.x + baa and sheenbuffcheck == true then
- DrawLine(_ba, bd.y - 1, _ba, bd.y + dd, 1, 4294901760)
- end
- local aba = math.ceil(dc.health / __a)
- local bba
- if __a >= dc.health then
- bba = 4278255360
- elseif a_a >= dc.health and __a < dc.health then
- bba = 4294967040
- elseif b_a >= dc.health and a_a < dc.health then
- bba = 4294901760
- end
- if bba ~= nil and dc.dead == false and dc.visible == true then
- DrawOutlineRectangle(bd.x - 1, bd.y - 1, cd + 1, dd + 1, bba)
- end
- if dc.dead == false and dc.visible == true then
- DrawText(tostring(aba), 14, bd.x - 1, bd.y - 13, __a >= dc.health and 4278255360 or 4278255615)
- end
- end
- function GetHpBarInfo(dc)
- local _d = GetUnitHPBarPos(dc)
- local ad = 62
- local bd = 4
- _d.x = _d.x - 31
- _d.y = _d.y - 2
- return _d, ad, bd
- end
- function GetHpBarInfoChamp(dc)
- local _d = GetUnitHPBarPos(dc)
- local ad = GetUnitHPBarOffset(dc)
- local bd = 104
- local cd = 8
- local dd = {XinZhao = 3.5}
- local __a = dd[dc.charName] or 0
- _d.x = _d.x - 66 + ad.x * 150
- _d.y = _d.y - 2 + __a + ad.y * 50
- return _d, bd, cd
- end
- function DrawOutlineRectangle(dc, _d, ad, bd, cd)
- local dd = dc - 1
- local __a = dc + ad
- local a_a = _d - 1
- local b_a = _d + bd
- DrawLine(dd, a_a, __a, a_a, 1, cd)
- DrawLine(dd, a_a, dd, b_a, 1, cd)
- DrawLine(__a, a_a, __a, b_a + 1, 1, cd)
- DrawLine(dd, b_a, __a, b_a, 1, cd)
- end
- function getdamagemodchamps(dc)
- local _d = 1
- if Menu.masteries.doSword then
- _d = _d + 0.02
- end
- if Menu.masteries.havoc then
- _d = _d + 0.03
- end
- if Menu.masteries.executioner and dc.health / dc.maxHealth < Menu.masteries.executionerlevel * 0.15 + 0.05 then
- _d = _d + 0.05
- end
- return _d
- end
- function OrbWalk()
- if Menu.Combo.modeswitch and timeToShoot() and cb.target ~= nil then
- player:Attack(cb.target)
- elseif heroCanMove() and Menu.Combo.modeswitch and automoveflag == true and GetDistance(mousePos) > 200 then
- player:MoveTo(mousePos.x, mousePos.z)
- lastmove = os.clock()
- automoveflag = false
- end
- end
- function heroCanMove()
- return os.clock() > lastAttack + lastWindUpTime + 0.05
- end
- function timeToShoot()
- return os.clock() > lastAttack + lastAttackCD
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement