Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Akali Combo v1.5a by burn
- updated season 3 items
- --xkjtx added Harass and UseW in combo's--
- -Full combo: DFG -> Items -> Q -> R -> E
- -Supports Deathfire Grasp, Bilgewater Cutlass, Hextech Gunblade, Sheen, Trinity, Lich Bane and Ignite (damage calculation)
- -Mark killable target with a combo
- -Target configuration, Press shift to configure
- -Auto ignite killable enemy ON/OFF option in ingame menu
- -Improved New Energy managament in skills (multiples cases)
- Explanation of the marks:
- Green circle: Marks the current target to which you will do the combo
- Blue circle: Mark a target that can be killed with a combo, if all the skills were available
- Red circle: Mark a target that can be killed using items + Passive x3 + 3 hits + Q(with mark) x2 + E x2 + R x3 + ignite
- 2 Red circles: Mark a target that can be killed using items + Passive x2 + 2 hits + Q(with mark) + Rx2 + E + ignite
- 3 Red circles: Mark a target that can be killed using items (without Sheen, Trinity and Lich Bane) + Q(with mark) + R + E + ignite
- ]]
- if myHero.charName ~= "Akali" then return end
- --[[ Code ]]
- local range = 800
- local qrange = 600
- local erange = 300
- local AArange = 550
- local tick = nil
- -- Active
- local scriptActive = false
- local QREADY, WREADY, EREADY, RREADY = false, false, false, false
- -- other
- enemyhaveQ = false -- with this we can know if our Q hit the target for proc the mark, global variable
- qInAir = true -- with this we can know if our Q is in air traveling to our target, global variable
- local QparticleDist = 70 --take valors between 10 and 100, if script dont proc the Q mark, try lowering or increasing this value, but at 70 should work fine
- -- draw
- local waittxt = {}
- local floattext = {"Skills are not available","Able to fight","Killable","Murder NOW!"}
- local killable = {}
- local WeHaveEnergy = false
- -- ts
- local ts
- --
- local ignite = nil
- local DFGSlot, HXGSlot, BWCSlot, SheenSlot, TrinitySlot, LichBaneSlot = nil, nil, nil, nil, nil, nil
- function OnLoad()
- PrintChat(">> Akali Combo v1.5a Oh Billy!")
- if myHero:GetSpellData(SUMMONER_1).name:find("SummonerDot") then ignite = SUMMONER_1
- elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerDot") then ignite = SUMMONER_2
- else ignite = nil
- end
- AkaliConfig = scriptConfig("Akali Combo v1.5a", "Akalicombo")
- AkaliConfig:addParam("scriptActive", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 32)
- AkaliConfig:addParam("harassActive", "Harass", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("S"))
- AkaliConfig:addParam("useW", "Toggle Use W in Combo's", SCRIPT_PARAM_ONKEYTOGGLE, true, string.byte("V")) -- V
- AkaliConfig:addParam("drawcircles", "Draw Killable Enemy", SCRIPT_PARAM_ONOFF, true)
- AkaliConfig:addParam("printtext", "Text on Killable Enemy", SCRIPT_PARAM_ONOFF, true)
- AkaliConfig:addParam("drawrange", "Draw Self Range", SCRIPT_PARAM_ONOFF, true)
- AkaliConfig:addParam("autoIgnite", "Auto Ignite", SCRIPT_PARAM_ONOFF, true)
- AkaliConfig:permaShow("scriptActive")
- AkaliConfig:permaShow("harassActive")
- AkaliConfig:permaShow("useW")
- ts = TargetSelector(TARGET_LOW_HP,range+50,DAMAGE_MAGIC)
- ts.name = "Akali"
- AkaliConfig:addTS(ts)
- for i=1, heroManager.iCount do
- waittxt[i] = i
- end
- end
- function OnTick()
- ts:update()
- DFGSlot, HXGSlot, BWCSlot, SheenSlot, TrinitySlot, LichBaneSlot = GetInventorySlotItem(3128), GetInventorySlotItem(3146), GetInventorySlotItem(3144), GetInventorySlotItem(3057), GetInventorySlotItem(3078), GetInventorySlotItem(3100)
- IcebornSlot, LiandrysSlot, BlackfireSlot = GetInventorySlotItem(3025), GetInventorySlotItem(3151), GetInventorySlotItem(3188)
- if tick == nil or GetTickCount() - tick >= 100 then
- tick = GetTickCount()
- DmgCalculation()
- end
- QREADY = (myHero:CanUseSpell(_Q) == READY)
- WREADY = (myHero:CanUseSpell(_W) == READY)
- EREADY = (myHero:CanUseSpell(_E) == READY)
- RREADY = (myHero:CanUseSpell(_R) == READY)
- DFGREADY = (DFGSlot ~= nil and myHero:CanUseSpell(DFGSlot) == READY)
- HXGREADY = (HXGSlot ~= nil and myHero:CanUseSpell(HXGSlot) == READY)
- BWCREADY = (BWCSlot ~= nil and myHero:CanUseSpell(BWCSlot) == READY)
- IREADY = (ignite ~= nil and myHero:CanUseSpell(ignite) == READY)
- if AkaliConfig.harassActive and ts.target ~= nil then
- if AkaliConfig.useW and WREADY and GetDistance(ts.target) < AArange then
- CastSpell(_W, ts.target.x, ts.target.z)
- end -- W first
- if QREADY and GetDistance(ts.target) <= qrange then --Q
- CastSpell(_Q, ts.target)
- qInAir = true --Q cast to enemy, until hit enemy, Q is on air
- end
- end
- if AkaliConfig.scriptActive and ts.target ~= nil then
- if AkaliConfig.useW and WREADY and GetDistance(ts.target) < AArange then
- CastSpell(_W, ts.target.x, ts.target.z)
- end -- W first
- if DFGREADY then CastSpell(DFGSlot, ts.target) end --DFG
- if HXGREADY then CastSpell(HXGSlot, ts.target) end --HXG
- if BWCREADY then CastSpell(BWCSlot, ts.target) end --BWC
- if QREADY and GetDistance(ts.target) <= qrange then --Q
- CastSpell(_Q, ts.target)
- qInAir = true --Q cast to enemy, until hit enemy, Q is on air
- end
- if (GetDistance(ts.target) <= 800 and (GetDistance(ts.target) > erange or (not QREADY and not EREADY)) and RREADY) then --R
- CastSpell(_R, ts.target)
- end
- --energy check managament:
- local SpellDataE = myHero:GetSpellData(_E)
- local totalCost = 60 + (60-5*SpellDataE.level) --totalcost of energy necessary to do a Q+E
- if myHero.mana >= totalCost then
- WeHaveEnergy = true
- else
- WeHaveEnergy = false
- end
- --energy managament on E spell:
- local edmg = getDmg("E",ts.target,myHero)
- if GetDistance(ts.target) <= erange and enemyhaveQ == true and WeHaveEnergy == true and EREADY then --case 1: we have energy to do Q+E, and enemy is marked with Q
- CastSpell(_E, ts.target)
- enemyhaveQ = false
- end
- if GetDistance(ts.target) <= erange and ts.target.health <= edmg and EREADY then --case 2: if we have/not have energy to do the Q+E and enemy have/not have q mark, BUT with a E we can kill the target, we cast E on enemy
- CastSpell(_E, ts.target)
- enemyhaveQ = false
- end
- if GetDistance(ts.target) <= erange and enemyhaveQ == true and myHero.mana <= 60 and EREADY then --case 3: we not have energy for do a Q+E, but with the mark proc we can do the Q again after 2-3 seconds (time depends on Q level restore and E level cost)
- CastSpell(_E, ts.target)
- enemyhaveQ = false
- end
- if GetDistance(ts.target) <= erange and qInAir == false and WeHaveEnergy == true and EREADY then --case 4: we not have a Q going to our target (ex: Q is in cooldown because 2 seconds ago last target was killed with our Q), and we have energy to do Q after E, we cast E
- CastSpell(_E, ts.target)
- enemyhaveQ = false
- end
- if GetDistance(ts.target) < AArange then myHero:Attack(ts.target) end --Autoatack enemy
- end
- if AkaliConfig.autoIgnite then
- local ignitedmg = 0
- if IREADY then
- for j = 1, heroManager.iCount, 1 do
- local enemyhero = heroManager:getHero(j)
- if ValidTarget(enemyhero) then
- ignitedmg = 50 + 20 * myHero.level
- if enemyhero ~= nil and enemyhero.team ~= myHero.team and not enemyhero.dead and enemyhero.visible and GetDistance(enemyhero) < 600 and enemyhero.health <= ignitedmg then
- CastSpell(ignite, enemyhero)
- end
- end
- end
- end
- end
- end
- function DmgCalculation()
- for i=1, heroManager.iCount do
- local enemy = heroManager:GetHero(i)
- if ValidTarget(enemy) then
- local dfgdamage, hxgdamage, bwcdamage, ignitedamage, Sheendamage, Trinitydamage, LichBanedamage = 0, 0, 0, 0, 0, 0, 0
- local pdamage = getDmg("P",enemy,myHero)
- local qdamage = getDmg("Q",enemy,myHero,3)
- local edamage = getDmg("E",enemy,myHero)
- local rdamage = getDmg("R",enemy,myHero)
- local hitdamage = getDmg("AD",enemy,myHero)
- local dfgdamage = (DFGSlot and getDmg("DFG",enemy,myHero) or 0)
- local hxgdamage = (HXGSlot and getDmg("HXG",enemy,myHero) or 0)
- local bwcdamage = (BWCSlot and getDmg("BWC",enemy,myHero) or 0)
- local ignitedamage = (ignite and getDmg("IGNITE",enemy,myHero) or 0)
- local onhitdmg = (SheenSlot and getDmg("SHEEN",enemy,myHero) or 0)+(TrinitySlot and getDmg("TRINITY",enemy,myHero) or 0)+(LichBaneSlot and getDmg("LICHBANE",enemy,myHero) or 0)+(IcebornSlot and getDmg("ICEBORN",enemy,myHero) or 0)
- local onspelldamage = (LiandrysSlot and getDmg("LIANDRYS",enemy,myHero) or 0)+(BlackfireSlot and getDmg("BLACKFIRE",enemy,myHero) or 0)
- local combo1 = qdamage*2 + edamage*2 + rdamage*3 + onspelldamage --0 cd
- local combo2 = onspelldamage
- local combo3 = onspelldamage
- local combo4 = onspelldamage
- if myHero:CanUseSpell(_Q) == READY then
- combo2 = combo2 + qdamage*2
- combo3 = combo3 + qdamage
- combo4 = combo4 + qdamage
- end
- if myHero:CanUseSpell(_E) == READY then
- combo2 = combo2 + edamage*2
- combo3 = combo3 + edamage
- combo4 = combo4 + edamage
- end
- if myHero:CanUseSpell(_R) ~= COOLDOWN and not myHero.dead then
- combo2 = combo2 + rdamage*3
- combo3 = combo3 + rdamage*2
- combo4 = combo4 + rdamage
- end
- if HXGSlot ~= nil and myHero:CanUseSpell(HXGSlot) == READY then
- combo1 = combo1 + hxgdamage
- combo2 = combo2 + hxgdamage
- combo3 = combo3 + hxgdamage
- combo4 = combo4 + hxgdamage
- end
- if BWCSlot ~= nil and myHero:CanUseSpell(BWCSlot) == READY then
- combo1 = combo1 + bwcdamage
- combo2 = combo2 + bwcdamage
- combo3 = combo3 + bwcdamage
- combo4 = combo4 + bwcdamage
- end
- if DFGSlot ~= nil and myHero:CanUseSpell(DFGSlot) == READY then
- combo1 = combo1*1.2 + dfgdamage
- combo2 = combo2*1.2 + dfgdamage
- combo3 = combo3*1.2 + dfgdamage
- combo4 = combo4*1.2 + dfgdamage
- end
- if ignite ~= nil and myHero:CanUseSpell(ignite) == READY then
- combo1 = combo1 + ignitedamage
- combo2 = combo2 + ignitedamage
- combo3 = combo3 + ignitedamage
- combo4 = combo4 + ignitedamage
- end
- combo1 = combo1 + onhitdmg + hitdamage*3 + pdamage*3
- combo2 = combo2 + onhitdmg + hitdamage*3 + pdamage*3
- combo3 = combo3 + onhitdmg + hitdamage*2 + pdamage*2
- combo4 = combo4 + onhitdmg
- if combo4 >= enemy.health then
- killable[i] = 4
- elseif combo3 >= enemy.health then
- killable[i] = 3
- elseif combo2 >= enemy.health then
- killable[i] = 2
- elseif combo1 >= enemy.health then
- killable[i] = 1
- else
- killable[i] = 0
- end
- end
- end
- end
- function OnDraw()
- if AkaliConfig.drawrange and not myHero.dead then
- DrawCircle(myHero.x, myHero.y, myHero.z, qrange, 0xc2743c)
- DrawCircle(myHero.x, myHero.y, myHero.z, range, 0x25de69)
- if ts.target ~= nil then
- for j=0, 15 do
- DrawCircle(ts.target.x, ts.target.y, ts.target.z, 40 + j*1.5, 0x00FF00)
- end
- end
- end
- for i=1, heroManager.iCount do
- local enemydraw = heroManager:GetHero(i)
- if ValidTarget(enemydraw) then
- if AkaliConfig.drawcircles then
- if killable[i] == 1 then
- for j=0, 25 do
- DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + j*1.5, 0x0000FF)
- end
- elseif killable[i] == 2 then
- for j=0, 15 do
- DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + j*1.5, 0xFF0000)
- end
- elseif killable[i] == 3 then
- for j=0, 15 do
- DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + j*1.5, 0xFF0000)
- DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 120 + j*1.5, 0xFF0000)
- end
- elseif killable[i] == 4 then
- for j=0, 15 do
- DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + j*1.5, 0xFF0000)
- DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 120 + j*1.5, 0xFF0000)
- DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 160 + j*1.5, 0xFF0000)
- end
- end
- end
- if AkaliConfig.printtext then
- if waittxt[i] == 1 then
- if killable[i] ~= 0 then
- PrintFloatText(enemydraw,0,floattext[killable[i]])
- end
- waittxt[i] = 20
- else
- waittxt[i] = waittxt[i]-1
- end
- end
- end
- end
- end
- function OnCreateObj(obj)
- if obj.name:find("akali_markOftheAssasin_marker_tar.troy") then --we get this particle if our Q hit something
- qInAir = false --if Q hit something, then Q is not on the air
- if obj and ts.target ~= nil and ts.target:GetDistance(obj) <= QparticleDist then
- enemyhaveQ = true --Q hit target
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement