Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Version 1.01 Added New Wards
- All in one Katarina merged+modified by Kevinkev.
- with:
- -functionDescription (hotkey)
- -wardJump (g) <-hold
- -autoCS (z) -shunpo (u)
- -autoKS (x)
- -autoGapCloseKill with e :D (v)
- -combo (spacebar)
- I deleted the original descriptions because it was messy and I was scripting ok? >: O
- Credits to:
- eXtragoZ for Katarina Combo
- TRUS for edited Katarina Combo version
- Pain for (auto)KatarinaStealer V0.24
- Unlimited for Katarina CS
- ikita for Ward JUMP :)
- Apologies for the code being quite messy, if anyone wants to... clean it up :P
- Note: The ratio values for QWE I'm not sure is 100% correct so please let me know.
- Any other stuff pm me or post a reply.
- ]]
- if myHero.charName ~= "Katarina" then return end
- require "AllClass"
- require "spellDmg"
- local wille = false
- local willeHk = 85
- local f = false
- local autoEQ = false
- local fHk = 90
- local autoEQHk = 86
- local qrng = 675
- local wrng = 375
- local erng = 700
- --[[ Code ]]
- local range = 730
- local ULTK=82 --R (security method)
- local tick = nil
- ultcount = 0
- -- Active
- local ulti = false
- local delayult = 300
- local delayult2 = 1200
- local timeulti = 0
- local timeulti2 = 0
- local timeq = 0
- local lastqmark = 0
- lastulti = 0
- -- draw
- local waittxt = {}
- local calculationenemy = 1
- local floattext = {"Skills are not available","Able to fight","Killable","Murder him!"}
- local killable = {}
- -- ts
- local ts
- --
- local ignite = nil
- local DFGSlot, HXGSlot, BWCSlot, SheenSlot, TrinitySlot, LichBaneSlot = nil, nil, nil, nil, nil, nil
- local QREADY, WREADY, EREADY, RREADY, DFGREADY, HXGREADY, BWCREADY, IREADY = false, false, false, false, false, false, false, false
- local hotkey = string.byte("X") -- X
- local scriptActive = active
- --[[ Config ]]
- flashToggle = "0"
- jumpKey = "G"
- local HKF = string.byte(flashToggle) --Toggle on/off for includeFlash minus key "0"
- local HK = string.byte(jumpKey) --Hold hotkey to flash to location. default at " G " (the key left to number 1)
- local flashRange = 420 --Flash range is 400. Real range is larger if you flash inside a wall
- local wardRange = 600 --Ward range is 600. I set it smaller so the ward won't pop too far to the other side of the wall, rendering your jump out of reach.
- local jumpDelay = 50 -- a slight delay after warding before jumping
- local includeFlash = true --initial setting when going into a new game
- --Nothing
- local lastJump = 0
- local wardTarget
- local jumpReady = false
- function OnTick()
- --WardJump
- if jumpReady == true and GetTickCount() - lastJump > jumpDelay then
- jumpNowAlready()
- end
- if wardScriptActive then
- local x = mousePos.x
- local z = mousePos.z
- local dx = x - player.x
- local dz = z - player.z
- local rad1 = math.atan2(dz, dx)
- --Crap code here needs cleaning up
- if GetInventorySlotItem(3154) ~= nil then
- wardSlot = GetInventorySlotItem(3154)
- if player:CanUseSpell(wardSlot) ~= READY then
- if GetInventorySlotItem(2049) ~= nil then
- wardSlot = GetInventorySlotItem(2049)
- if player:CanUseSpell(wardSlot) ~= READY then
- if GetInventorySlotItem(2045) ~= nil then
- wardSlot = GetInventorySlotItem(2045)
- if player:CanUseSpell(wardSlot) ~= READY then
- if GetInventorySlotItem(2044) ~= nil then
- wardSlot = GetInventorySlotItem(2044)
- elseif GetInventorySlotItem(2043) ~= nil then
- wardSlot = GetInventorySlotItem(2043)
- else
- wardSlot = nil
- end
- end
- elseif GetInventorySlotItem(2044) ~= nil then
- wardSlot = GetInventorySlotItem(2044)
- elseif GetInventorySlotItem(2043) ~= nil then
- wardSlot = GetInventorySlotItem(2043)
- else
- wardSlot = nil
- end
- end
- elseif GetInventorySlotItem(2045) ~= nil then
- wardSlot = GetInventorySlotItem(2045)
- if player:CanUseSpell(wardSlot) ~= READY then
- if GetInventorySlotItem(2044) ~= nil then
- wardSlot = GetInventorySlotItem(2044)
- elseif GetInventorySlotItem(2043) ~= nil then
- wardSlot = GetInventorySlotItem(2043)
- else
- wardSlot = nil
- end
- end
- elseif GetInventorySlotItem(2044) ~= nil then
- wardSlot = GetInventorySlotItem(2044)
- elseif GetInventorySlotItem(2043) ~= nil then
- wardSlot = GetInventorySlotItem(2043)
- else
- wardSlot = nil
- end
- end
- elseif GetInventorySlotItem(2049) ~= nil then
- wardSlot = GetInventorySlotItem(2049)
- if player:CanUseSpell(wardSlot) ~= READY then
- if GetInventorySlotItem(2045) ~= nil then
- wardSlot = GetInventorySlotItem(2045)
- if player:CanUseSpell(wardSlot) ~= READY then
- if GetInventorySlotItem(2044) ~= nil then
- wardSlot = GetInventorySlotItem(2044)
- elseif GetInventorySlotItem(2043) ~= nil then
- wardSlot = GetInventorySlotItem(2043)
- else
- wardSlot = nil
- end
- end
- elseif GetInventorySlotItem(2044) ~= nil then
- wardSlot = GetInventorySlotItem(2044)
- elseif GetInventorySlotItem(2043) ~= nil then
- wardSlot = GetInventorySlotItem(2043)
- else
- wardSlot = nil
- end
- end
- elseif GetInventorySlotItem(2045) ~= nil then
- wardSlot = GetInventorySlotItem(2045)
- if player:CanUseSpell(wardSlot) ~= READY then
- if GetInventorySlotItem(2044) ~= nil then
- wardSlot = GetInventorySlotItem(2044)
- elseif GetInventorySlotItem(2043) ~= nil then
- wardSlot = GetInventorySlotItem(2043)
- else
- wardSlot = nil
- end
- end
- elseif GetInventorySlotItem(2044) ~= nil then
- wardSlot = GetInventorySlotItem(2044)
- elseif GetInventorySlotItem(2043) ~= nil then
- wardSlot = GetInventorySlotItem(2043)
- else
- wardSlot = nil
- end
- if wardSlot ~= nil and jumpSlot ~= nil then
- --for wards
- local dx1 = flashRange*math.cos(rad1)
- local dz1 = flashRange*math.sin(rad1)
- local x1 = x - dx1
- local z1 = z - dz1
- if player:CanUseSpell(jumpSlot) == READY and GetTickCount() - lastJump > 2000 and math.sqrt(dx*dx + dz*dz) < 600 then --Increase this number for smoother flash. (might fail if too large)
- CastSpell( wardSlot, x, z )
- jumpReady = true
- lastJump = GetTickCount()
- else
- player:MoveTo(x1, z1)
- end
- end
- end
- --endWardJump
- local qdmg = math.floor((player:GetSpellData(_Q).level-1)*30 + 60 + player.ap * .45)
- local wdmg = math.floor((player:GetSpellData(_W).level-1)*35 + 40 + player.ap * .25 + player.addDamage * .6)
- local edmg = math.floor((player:GetSpellData(_E).level-1)*25 + 60 + player.ap * .4)
- if f then
- for k = 1, objManager.maxObjects do
- local minionObjectI = objManager:GetObject(k)
- if minionObjectI ~= nil and string.find(minionObjectI.name,"Minion_") == 1 and minionObjectI.team ~= player.team and minionObjectI.dead == false then
- if player:GetDistance(minionObjectI) < qrng and minionObjectI.health <= player:CalcDamage(minionObjectI,qdmg) and myHero:CanUseSpell(_Q) == READY then
- CastSpell(_Q, minionObjectI)
- elseif player:GetDistance(minionObjectI) < wrng and minionObjectI.health <= player:CalcDamage(minionObjectI,wdmg) and myHero:CanUseSpell(_W) == READY and myHero:CanUseSpell(_Q) == COOLDOWN then
- CastSpell(_W, minionObjectI)
- elseif player:GetDistance(minionObjectI) < erng and minionObjectI.health <= player:CalcDamage(minionObjectI,edmg) and wille and myHero:CanUseSpell(_E) == READY and myHero:CanUseSpell(_Q) == COOLDOWN and myHero:CanUseSpell(_W) == COOLDOWN then
- CastSpell(_E, minionObjectI)
- end
- end
- end
- end
- --PART
- ts:update()
- DFGSlot, HXGSlot, BWCSlot, SheenSlot, TrinitySlot, LichBaneSlot = GetInventorySlotItem(3128), GetInventorySlotItem(3146), GetInventorySlotItem(3144), GetInventorySlotItem(3057), GetInventorySlotItem(3078), GetInventorySlotItem(3100)
- 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 tick == nil or GetTickCount()-tick >= 100 then
- tick = GetTickCount()
- KCDmgCalculation()
- end
- if GetTickCount() > lastulti + 250 and ulti then ulti = false end
- if KCConfig.harass and ts.target ~= nil and not ulti then
- if QREADY then CastSpell(_Q, ts.target) end
- end
- if KCConfig.scriptActive and ts.target ~= nil and not ulti then
- if DFGREADY then CastSpell(DFGSlot, ts.target) end
- if QREADY then CastSpell(_Q, ts.target) end
- if EREADY then CastSpell(_E,ts.target) end
- if WREADY and GetDistance(ts.target)<375 and (((GetTickCount()-timeq>650 or GetTickCount()-lastqmark<650) and not QREADY) or not KCConfig.delayw) then CastSpell(_W) end
- if HXGREADY then CastSpell(HXGSlot, ts.target) end
- if BWCREADY then CastSpell(BWCSlot, ts.target) end
- if RREADY and KCConfig.useult and myHero:CanUseSpell(_Q) == COOLDOWN and myHero:CanUseSpell(_W) == COOLDOWN and myHero:CanUseSpell(_E) == COOLDOWN and not DFGREADY and not HXGREADY and not BWCREADY and GetDistance(ts.target)<275 then
- timeulti = GetTickCount()
- timeulti2 = GetTickCount()
- CastSpell(_R)
- end
- end
- --PART
- if scriptActive then
- if player:GetSpellData(_E).level > 0 then
- for i=1, heroManager.iCount do
- target = heroManager:GetHero(i)
- local eDmg = player:CalcMagicDamage(target, 25*(player:GetSpellData(_E).level-1)+60+(.4*player.ap))
- local wDmg = player:CalcMagicDamage(target, 35*(player:GetSpellData(_W).level-1)+40+(.25*player.ap)+(.6*player.addDamage)) --375
- local qDmg = player:CalcMagicDamage(target, 30*(player:GetSpellData(_Q).level-1)+60+(.45*player.ap))
- if target ~= nil and target.visible == true and player.team ~= target.team and target.dead == false and player:GetDistance(target) < 650 then
- if target.health < wDmg + eDmg + qDmg then
- CastSpell(_Q, target)
- CastSpell(_E, target)
- Sleep(100)
- if target ~= nil and target.visible == true and player.team ~= target.team and target.dead == false and player:GetDistance(target) < 375 and target.health < wDmg then
- if player:CanUseSpell(_W) == READY then
- CastSpell(_W, target)
- end
- end
- end
- end
- if target ~= nil and target.visible == true and player.team ~= target.team and target.dead == false and player:GetDistance(target) < 650 then
- if target.health < wDmg + eDmg then
- CastSpell(_E, target)
- Sleep(100)
- if target ~= nil and target.visible == true and player.team ~= target.team and target.dead == false and player:GetDistance(target) < 375 and target.health < wDmg then
- if player:CanUseSpell(_W) == READY then
- CastSpell(_W, target)
- end
- end
- end
- if target ~= nil and target.visible == true and player.team ~= target.team and target.dead == false and player:GetDistance(target) < 375 then
- if target.health < qDmg + wDmg then
- if player:CanUseSpell(_Q) == READY then
- if player:CanUseSpell(_W) == READY then
- CastSpell(_W, target)
- CastSpell(_Q, target)
- end
- end
- end
- end
- end
- end
- end
- end
- end
- function OnWndMsg(msg, key)
- --PART1
- if key == fHk then
- if msg == KEY_DOWN then
- if f then
- f = false
- PrintChat(">> Auto Farm Disabled")
- else
- f = true
- PrintChat(">> Auto Farm Enabled")
- end
- end
- end
- --AutoEQ
- if key == autoEQHk then
- if msg == KEY_DOWN then
- if autoEQ then
- autoEQ = false
- PrintChat(">> Auto EQ Disabled")
- else
- autoEQ = true
- PrintChat(">> Auto EQ Enabled")
- end
- end
- end
- if key == willeHk then
- if msg == KEY_DOWN then
- if wille then
- wille = false
- PrintChat("Shunpo Disabled")
- else
- wille = true
- PrintChat("Shunpo Enabled")
- end
- end
- end
- --PART2
- if key == hotkey then
- if msg == KEY_DOWN then
- if scriptActive then
- scriptActive = false
- PrintChat(">>!!!You're on your own now!!!!<<")
- else
- scriptActive = true
- PrintChat(">>!!!You made the right choice!!!<<")
- end
- end
- end
- --PART3
- if key == ULTK and msg == KEY_DOWN then
- timeulti = GetTickCount()
- timeulti2 = GetTickCount()
- end
- SC__OnWndMsg(msg,key)
- --wardJump
- if key == HK then
- if msg == KEY_DOWN then
- wardScriptActive = true
- else
- wardScriptActive = false
- end
- end
- end
- function jumpNowAlready()
- if wardScriptActive and jumpReady == true then
- for k = 1, objManager.maxObjects do
- local object = objManager:GetObject(k)
- if object ~= nil and (string.find(object.name, "Ward") ~= nil or string.find(object.name, "Wriggle") ~= nil) and math.sqrt((mousePos.x - object.x)*(mousePos.x - object.x) + (mousePos.z - object.z)*(mousePos.z - object.z)) < 300 then
- CastSpell( jumpSlot, object)
- jumpReady = false
- end
- end
- end
- end
- function OnLoad()
- KCConfig = scriptConfig("Katarina Combo 2.7", "katarinacombo")
- KCConfig:addParam("scriptActive", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 32)
- KCConfig:addParam("harass", "Harass", SCRIPT_PARAM_ONKEYDOWN, false, 84)
- KCConfig:addParam("drawcircles", "Draw Circles", SCRIPT_PARAM_ONOFF, true)
- KCConfig:addParam("drawtext", "Draw Text", SCRIPT_PARAM_ONOFF, true)
- KCConfig:addParam("useult", "Use Ult", SCRIPT_PARAM_ONOFF, true)
- KCConfig:addParam("delayw", "Delay W", SCRIPT_PARAM_ONOFF, true)
- KCConfig:permaShow("scriptActive")
- KCConfig:permaShow("harass")
- ts = TargetSelector(TARGET_LOW_HP,range,DAMAGE_MAGIC)
- ts.name = "Katarina"
- KCConfig:addTS(ts)
- 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
- for i=1, heroManager.iCount do
- waittxt[i] = i*3
- end
- --wardJump
- flashSlot = nil
- -- Champions that can ward jump
- if player.charName == "Katarina" then
- jumpSlot = _E
- jumpRange = 700
- end
- end
- function CheckBuffs()
- buffCount = player.buffCount
- for i = 1, buffCount, 1 do
- local buff = player:getBuff(i)
- PrintChat(tostring(buff))
- end
- end
- function KCDmgCalculation()
- local enemy = heroManager:GetHero(calculationenemy)
- if ValidTarget(enemy) then
- local dfgdamage, hxgdamage, bwcdamage, ignitedamage, Sheendamage, Trinitydamage, LichBanedamage = 0, 0, 0, 0, 0, 0, 0
- local qdamage = getDmg("Q",enemy,myHero)
- local qdamage2 = getDmg("Q",enemy,myHero,2)
- local wdamage = getDmg("W",enemy,myHero)
- local edamage = getDmg("E",enemy,myHero)
- local rdamage = getDmg("R",enemy,myHero) --xdagger (champion can be hit by a maximum of 10 daggers (2 sec))
- 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 Sheendamage = (SheenSlot and hitdamage or 0)
- local Trinitydamage = (TrinitySlot and hitdamage*1.5 or 0)
- local LichBanedamage = (LichBaneSlot and getDmg("LICHBANE",enemy,myHero) or 0)
- local combo1 = hitdamage + qdamage*2 + qdamage2*2 + wdamage*2 + edamage*2 + rdamage*10 + Sheendamage + Trinitydamage + LichBanedamage --0 cd
- local combo2 = hitdamage + Sheendamage + Trinitydamage + LichBanedamage
- local combo3 = hitdamage + Sheendamage + Trinitydamage + LichBanedamage
- local combo4 = 0
- if QREADY then
- combo2 = combo2 + qdamage*2 + qdamage2*2
- combo3 = combo3 + qdamage + qdamage2
- combo4 = combo4 + qdamage
- if EREADY then
- combo4 = combo4 + qdamage2
- end
- end
- if WREADY then
- combo2 = combo2 + wdamage*2
- combo3 = combo3 + wdamage
- if EREADY then
- combo4 = combo4 + wdamage
- end
- end
- if EREADY 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*10
- combo3 = combo3 + rdamage*7
- if EREADY then
- combo4 = combo4 + rdamage*3
- end
- end
- if DFGREADY then
- combo1 = combo1 + dfgdamage
- combo2 = combo2 + dfgdamage
- combo3 = combo3 + dfgdamage
- combo4 = combo4 + dfgdamage
- end
- if HXGREADY then
- combo1 = combo1 + hxgdamage
- combo2 = combo2 + hxgdamage
- combo3 = combo3 + hxgdamage
- combo4 = combo4 + hxgdamage
- end
- if BWCREADY then
- combo1 = combo1 + bwcdamage
- combo2 = combo2 + bwcdamage
- combo3 = combo3 + bwcdamage
- combo4 = combo4 + bwcdamage
- end
- if IREADY then
- combo1 = combo1 + ignitedamage
- combo2 = combo2 + ignitedamage
- combo3 = combo3 + ignitedamage
- end
- if combo4 >= enemy.health then killable[calculationenemy] = 4
- elseif combo3 >= enemy.health then killable[calculationenemy] = 3
- elseif combo2 >= enemy.health then killable[calculationenemy] = 2
- elseif combo1 >= enemy.health then killable[calculationenemy] = 1
- else killable[calculationenemy] = 0 end
- end
- if calculationenemy == 1 then calculationenemy = heroManager.iCount
- else calculationenemy = calculationenemy-1 end
- end
- function OnProcessSpell(unit, spell)
- if unit.isMe and spell.name == "KatarinaQ" then timeq = GetTickCount() end
- end
- function OnCreateObj(object)
- if object.name == "katarina_deathLotus_mis.troy" then ulti = true lastulti = GetTickCount() end
- if object.name:find("katarina_daggered") then lastqmark = GetTickCount() end
- end
- function OnDraw()
- if KCConfig.drawcircles and not myHero.dead then
- DrawCircle(myHero.x, myHero.y, myHero.z, range, 0x19A712)
- if ts.target ~= nil then
- for j=0, 10 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 KCConfig.drawcircles then
- if killable[i] == 1 then
- for j=0, 20 do
- DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + j*1.5, 0x0000FF)
- end
- elseif killable[i] == 2 then
- for j=0, 10 do
- DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + j*1.5, 0xFF0000)
- end
- elseif killable[i] == 3 then
- for j=0, 10 do
- DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + j*1.5, 0xFF0000)
- DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 110 + j*1.5, 0xFF0000)
- end
- elseif killable[i] == 4 then
- for j=0, 10 do
- DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + j*1.5, 0xFF0000)
- DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 110 + j*1.5, 0xFF0000)
- DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 140 + j*1.5, 0xFF0000)
- end
- end
- end
- if KCConfig.drawtext and waittxt[i] == 1 and killable[i] ~= 0 then
- PrintFloatText(enemydraw,0,floattext[killable[i]])
- end
- end
- if waittxt[i] == 1 then waittxt[i] = 30
- else waittxt[i] = waittxt[i]-1 end
- end
- SC__OnDraw()
- end
- function OnSendChat(msg)
- TargetSelector__OnSendChat(msg)
- ts:OnSendChat(msg, "pri")
- end
- PrintChat(">> Katarina Loaded! [Kevinkev] ")
- function Sleep(ms) -- milliseconds
- local t = GetTickCount()
- if GetTickCount() - t <= ms then
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement