Advertisement
Kevinkev

Pentarina 1.1

Jan 11th, 2013
8,496
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 19.76 KB | None | 0 0
  1.  
  2. --[[
  3.  
  4.     Version 1.1
  5.    
  6.     All in one Katarina merged+modified by Kevinkev.
  7.    
  8.     HOTKEYS:    
  9.     -wardJump (g) <-hold
  10.     -autoCS (z)         -shunpo (u)
  11.     -autoKS (x)
  12.    
  13.     -combo (spacebar)
  14.  
  15.    
  16.     Credits to:
  17.     Husky for the minion CS alternative (lag free)
  18.     eXtragoZ for Katarina Combo
  19.     TRUS for edited Katarina Combo version
  20.     Pain for (auto)KatarinaStealer V0.24
  21.     Unlimited for Katarina CS
  22.     ikita for Ward JUMP :)
  23.  
  24.  
  25. ]]
  26.  
  27. if myHero.charName ~= "Katarina" then return end
  28.  
  29.     local minionTable = {}
  30.     local objectTable = {}
  31.     local wille = false
  32.     local willeHk = 85
  33.     local f = false
  34.     local autoEQ = false
  35.     local fHk = 90
  36.     local autoEQHk = 86
  37.     local qrng = 675
  38.     local wrng = 375
  39.     local inWrange = false
  40.     local erng = 700
  41.     --[[            Code            ]]
  42.     local range = 730
  43.     local ULTK=82 --R (security method)
  44.     local tick = nil
  45.     ultcount = 0
  46.     -- Active
  47.     local ulti = false
  48.     local delayult = 300
  49.     local delayult2 = 1200
  50.     local timeulti = 0
  51.     local timeulti2 = 0
  52.     local timeq = 0
  53.     local lastqmark = 0
  54.     lastulti = 0
  55.     -- draw
  56.     local waittxt = {}
  57.     local calculationenemy = 1
  58.     local floattext = {"Skills are not available","Able to fight","Killable","Murder him!"}
  59.     local killable = {}
  60.     -- ts
  61.     local ts
  62.     --
  63.     local ignite = nil
  64.     local DFGSlot, HXGSlot, BWCSlot, SheenSlot, TrinitySlot, LichBaneSlot = nil, nil, nil, nil, nil, nil
  65.     local QREADY, WREADY, EREADY, RREADY, DFGREADY, HXGREADY, BWCREADY, IREADY = false, false, false, false, false, false, false, false
  66.     local hotkey = string.byte("X")  -- X
  67.     local scriptActive = active
  68.     --[[        Config      ]]                          
  69.     flashToggle = "0"
  70.     jumpKey = "G"
  71.     local HKF = string.byte(flashToggle) --Toggle on/off for includeFlash minus key "0"
  72.     local HK = string.byte(jumpKey) --Hold hotkey to flash to location. default at " G " (the key left to number 1)
  73.     local flashRange = 420 --Flash range is 400. Real range is larger if you flash inside a wall
  74.     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.
  75.     local jumpDelay = 50 -- a slight delay after warding before jumping
  76.  
  77.     local includeFlash = true --initial setting when going into a new game
  78.  
  79.     --Nothing
  80.     local lastJump = 0
  81.     local wardTarget
  82.     local jumpReady = false
  83.  
  84.    
  85.  
  86. function OnTick()
  87. --WardJump
  88. if jumpReady == true and GetTickCount() - lastJump > jumpDelay then
  89.         jumpNowAlready()
  90.     end
  91.     if wardScriptActive then
  92.    
  93.         local x = mousePos.x
  94.         local z = mousePos.z
  95.         local dx = x - player.x
  96.         local dz = z - player.z
  97.         local rad1 = math.atan2(dz, dx)
  98.        
  99.         --Crap code here needs cleaning up
  100.                 if GetInventorySlotItem(3154) ~= nil then
  101.             wardSlot = GetInventorySlotItem(3154)
  102.  
  103.             if player:CanUseSpell(wardSlot) ~= READY then
  104.                 if GetInventorySlotItem(2049) ~= nil then
  105.                     wardSlot = GetInventorySlotItem(2049)
  106.                     if player:CanUseSpell(wardSlot) ~= READY then
  107.                         if GetInventorySlotItem(2045) ~= nil then
  108.                             wardSlot = GetInventorySlotItem(2045)
  109.                             if player:CanUseSpell(wardSlot) ~= READY then
  110.                                 if GetInventorySlotItem(2044) ~= nil then
  111.                                     wardSlot = GetInventorySlotItem(2044)
  112.                                 elseif GetInventorySlotItem(2043) ~= nil then
  113.                                     wardSlot = GetInventorySlotItem(2043)
  114.                                 else
  115.                                     wardSlot = nil
  116.                                 end
  117.                             end
  118.                         elseif GetInventorySlotItem(2044) ~= nil then
  119.                             wardSlot = GetInventorySlotItem(2044)
  120.                         elseif GetInventorySlotItem(2043) ~= nil then
  121.                             wardSlot = GetInventorySlotItem(2043)
  122.                         else
  123.                             wardSlot = nil
  124.                         end
  125.                     end
  126.                 elseif GetInventorySlotItem(2045) ~= nil then
  127.                     wardSlot = GetInventorySlotItem(2045)
  128.                     if player:CanUseSpell(wardSlot) ~= READY then
  129.                         if GetInventorySlotItem(2044) ~= nil then
  130.                             wardSlot = GetInventorySlotItem(2044)
  131.                         elseif GetInventorySlotItem(2043) ~= nil then
  132.                             wardSlot = GetInventorySlotItem(2043)
  133.                         else
  134.                             wardSlot = nil
  135.                         end
  136.                     end
  137.                 elseif GetInventorySlotItem(2044) ~= nil then
  138.                     wardSlot = GetInventorySlotItem(2044)
  139.                 elseif GetInventorySlotItem(2043) ~= nil then
  140.                     wardSlot = GetInventorySlotItem(2043)
  141.                 else
  142.                     wardSlot = nil
  143.                 end
  144.             end
  145.         elseif GetInventorySlotItem(2049) ~= nil then
  146.             wardSlot = GetInventorySlotItem(2049)
  147.             if player:CanUseSpell(wardSlot) ~= READY then
  148.                 if GetInventorySlotItem(2045) ~= nil then
  149.                     wardSlot = GetInventorySlotItem(2045)
  150.                     if player:CanUseSpell(wardSlot) ~= READY then
  151.                         if GetInventorySlotItem(2044) ~= nil then
  152.                             wardSlot = GetInventorySlotItem(2044)
  153.                         elseif GetInventorySlotItem(2043) ~= nil then
  154.                             wardSlot = GetInventorySlotItem(2043)
  155.                         else
  156.                             wardSlot = nil
  157.                         end
  158.                     end
  159.                 elseif GetInventorySlotItem(2044) ~= nil then
  160.                     wardSlot = GetInventorySlotItem(2044)
  161.                 elseif GetInventorySlotItem(2043) ~= nil then
  162.                     wardSlot = GetInventorySlotItem(2043)
  163.                 else
  164.                     wardSlot = nil
  165.                 end
  166.             end
  167.         elseif GetInventorySlotItem(2045) ~= nil then
  168.             wardSlot = GetInventorySlotItem(2045)
  169.             if player:CanUseSpell(wardSlot) ~= READY then
  170.                 if GetInventorySlotItem(2044) ~= nil then
  171.                     wardSlot = GetInventorySlotItem(2044)
  172.                 elseif GetInventorySlotItem(2043) ~= nil then
  173.                     wardSlot = GetInventorySlotItem(2043)
  174.                 else
  175.                     wardSlot = nil
  176.                 end
  177.             end
  178.         elseif GetInventorySlotItem(2044) ~= nil then
  179.             wardSlot = GetInventorySlotItem(2044)
  180.         elseif GetInventorySlotItem(2043) ~= nil then
  181.             wardSlot = GetInventorySlotItem(2043)
  182.         else
  183.             wardSlot = nil
  184.         end
  185.  
  186.        
  187.         if wardSlot ~= nil and jumpSlot ~= nil then
  188.             --for wards
  189.             local dx1 = flashRange*math.cos(rad1)
  190.             local dz1 = flashRange*math.sin(rad1)
  191.            
  192.             local x1 = x - dx1
  193.             local z1 = z - dz1
  194.             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)
  195.                 CastSpell( wardSlot, x, z )
  196.                 jumpReady = true
  197.                 lastJump = GetTickCount()
  198.             else
  199.                 player:MoveTo(x1, z1)
  200.             end
  201.         end
  202.            
  203.        
  204.     end
  205.    
  206.     --endWardJump
  207.          
  208.    
  209.     ts:update()
  210.     local qdmg = math.floor((player:GetSpellData(_Q).level-1)*30 + 60 + player.ap * .45)
  211.    
  212.     local wdmg = math.floor((player:GetSpellData(_W).level-1)*35 + 40 + player.ap * .25 + player.addDamage * .6)
  213.  
  214.     local edmg = math.floor((player:GetSpellData(_E).level-1)*25 + 60 + player.ap * .4)
  215.  
  216.    
  217.  
  218.    
  219.  
  220.    
  221.  
  222.  
  223. if f then
  224.    for i,object in ipairs(minionTable) do
  225.         if minionIsValid(object) then
  226.                 if  GetDistance(object) < qrng and object.health <= player:CalcDamage(object,qdmg) and myHero:CanUseSpell(_Q) == READY then
  227.                     CastSpell(_Q, object)
  228.                 elseif GetDistance(object) < wrng and object.health <= player:CalcDamage(object,wdmg) and myHero:CanUseSpell(_W) == READY and  myHero:CanUseSpell(_Q) == COOLDOWN then 
  229.                     CastSpell(_W, object)
  230.                 elseif GetDistance(object) < erng and object.health <= player:CalcDamage(object,edmg) and wille and myHero:CanUseSpell(_E) == READY and myHero:CanUseSpell(_Q) == COOLDOWN and myHero:CanUseSpell(_W) == COOLDOWN then 
  231.                     CastSpell(_E, object)
  232.                 end
  233.         else table.remove(minionTable, i) i = i - 1
  234.         end
  235.     end
  236. end
  237.  
  238. --PART
  239.  
  240.  
  241.     DFGSlot, HXGSlot, BWCSlot, SheenSlot, TrinitySlot, LichBaneSlot = GetInventorySlotItem(3128), GetInventorySlotItem(3146), GetInventorySlotItem(3144), GetInventorySlotItem(3057), GetInventorySlotItem(3078), GetInventorySlotItem(3100)
  242.     QREADY = (myHero:CanUseSpell(_Q) == READY)
  243.     WREADY = (myHero:CanUseSpell(_W) == READY)
  244.     EREADY = (myHero:CanUseSpell(_E) == READY)
  245.     RREADY = (myHero:CanUseSpell(_R) == READY)
  246.     DFGREADY = (DFGSlot ~= nil and myHero:CanUseSpell(DFGSlot) == READY)
  247.     HXGREADY = (HXGSlot ~= nil and myHero:CanUseSpell(HXGSlot) == READY)
  248.     BWCREADY = (BWCSlot ~= nil and myHero:CanUseSpell(BWCSlot) == READY)
  249.     IREADY = (ignite ~= nil and myHero:CanUseSpell(ignite) == READY)
  250.     if tick == nil or GetTickCount()-tick >= 100 then
  251.         tick = GetTickCount()
  252.         KCDmgCalculation()
  253.     end
  254.     if GetTickCount() > lastulti + 250 and ulti then ulti = false end
  255.  
  256.     if KCConfig.harass and ts.target ~= nil and not ulti then
  257.         if QREADY then CastSpell(_Q, ts.target) end
  258.     end
  259.  
  260.     if KCConfig.scriptActive and ts.target ~= nil and not ulti then
  261.         if DFGREADY then CastSpell(DFGSlot, ts.target) end
  262.         if QREADY then CastSpell(_Q, ts.target) end
  263.         if EREADY then CastSpell(_E,ts.target) end
  264.         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
  265.         if HXGREADY then CastSpell(HXGSlot, ts.target) end
  266.         if BWCREADY then CastSpell(BWCSlot, ts.target) end
  267.         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
  268.             timeulti = GetTickCount()
  269.             timeulti2 = GetTickCount()
  270.             CastSpell(_R)
  271.         end
  272.     end
  273. --PART
  274.  
  275. if scriptActive then
  276.     if player:GetSpellData(_E).level > 0 then
  277.         for i=1, heroManager.iCount do
  278.             target = heroManager:GetHero(i)
  279.             local eDmg = player:CalcMagicDamage(target, 25*(player:GetSpellData(_E).level-1)+60+(.4*player.ap))
  280.             local wDmg = player:CalcMagicDamage(target, 35*(player:GetSpellData(_W).level-1) +40+ (.25*player.ap)+(.6*player.addDamage)) --375
  281.             local qDmg = player:CalcMagicDamage(target, 30*(player:GetSpellData(_Q).level-1)+60+(.45*player.ap))
  282.             if target ~= nil and target.visible == true and player.team ~= target.team and target.dead == false and GetDistance(target) < 650 then
  283.                     if target.health < wDmg + eDmg + qDmg then                             
  284.                         CastSpell(_Q, target)
  285.                             CastSpell(_E, target)
  286.                                 Sleep(100)
  287.                                     if target ~= nil and target.visible == true and player.team ~= target.team and target.dead == false and GetDistance(target) < 375 and target.health < wDmg then
  288.                     if player:CanUseSpell(_W) == READY then
  289.                             CastSpell(_W, target)
  290.                             end
  291.                         end
  292.                     end
  293.                 end
  294.                    
  295.                     if target ~= nil and target.visible == true and player.team ~= target.team and target.dead == false and GetDistance(target) < 650 then
  296.                     if target.health < wDmg + eDmg then
  297.                         CastSpell(_E, target)
  298.                             Sleep(100)
  299.                                 if target ~= nil and target.visible == true and player.team ~= target.team and target.dead == false and GetDistance(target) < 375 and target.health < wDmg then
  300.                     if player:CanUseSpell(_W) == READY then
  301.                             CastSpell(_W, target)
  302.                         end
  303.                     end
  304.                 end
  305.                    
  306.                     if target ~= nil and target.visible == true and player.team ~= target.team and target.dead == false and GetDistance(target) < 375 then
  307.                     if target.health < qDmg + wDmg then
  308.                         if player:CanUseSpell(_Q) == READY then
  309.                             if player:CanUseSpell(_W) == READY then
  310.                                 CastSpell(_W, target)
  311.                                     CastSpell(_Q, target)
  312.                                 end
  313.                             end
  314.                         end
  315.                     end
  316.                 end
  317.             end
  318.         end
  319.     end
  320.  
  321. end
  322.  
  323. function OnWndMsg(msg, key)
  324.     --PART1
  325.     if key == fHk then
  326.         if msg == KEY_DOWN then
  327.             if f then
  328.                 f = false
  329.                 PrintChat(">> Auto Farm Disabled")
  330.             else
  331.                 f = true
  332.                 PrintChat(">> Auto Farm Enabled")
  333.             end
  334.         end
  335.     end
  336.     --AutoEQ
  337.         if key == autoEQHk then
  338.         if msg == KEY_DOWN then
  339.             if autoEQ then
  340.                 autoEQ = false
  341.                 PrintChat(">> Auto EQ Disabled")
  342.             else
  343.                 autoEQ = true
  344.                 PrintChat(">> Auto EQ Enabled")
  345.             end
  346.         end
  347.     end
  348.     if key == willeHk then
  349.         if msg == KEY_DOWN then
  350.             if wille then
  351.                 wille = false
  352.                 PrintChat("Shunpo Disabled")
  353.             else
  354.                 wille = true
  355.                 PrintChat("Shunpo Enabled")
  356.             end
  357.         end
  358.     end
  359. --PART2
  360.     if key == hotkey then
  361.         if msg == KEY_DOWN then
  362.             if scriptActive then
  363.                 scriptActive = false
  364.                 PrintChat(">>!!!You're on your own now!!!!<<")
  365.             else
  366.                 scriptActive = true
  367.                 PrintChat(">>!!!You made the right choice!!!<<")
  368.             end
  369.         end
  370.     end
  371. --PART3
  372.  
  373.     if key == ULTK and msg == KEY_DOWN then
  374.         timeulti = GetTickCount()
  375.         timeulti2 = GetTickCount()
  376.     end
  377.  
  378.  
  379. --wardJump
  380.     if key == HK then
  381.         if msg == KEY_DOWN then
  382.             wardScriptActive = true
  383.         else
  384.             wardScriptActive = false
  385.         end
  386.     end
  387.    
  388.    
  389. end
  390.  
  391. function jumpNowAlready()
  392.     if wardScriptActive and jumpReady == true then
  393.         for k = 1, objManager.maxObjects do
  394.         local object = objManager:GetObject(k)
  395.             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
  396.                 CastSpell( jumpSlot, object)
  397.                 jumpReady = false
  398.             end
  399.         end
  400.     end
  401. end
  402.  
  403. function OnLoad()
  404.  
  405.     KCConfig = scriptConfig("Katarina Combo 2.7", "katarinacombo")
  406.     KCConfig:addParam("scriptActive", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 32)
  407.     KCConfig:addParam("harass", "Harass", SCRIPT_PARAM_ONKEYDOWN, false, 84)
  408.     KCConfig:addParam("drawcircles", "Draw Circles", SCRIPT_PARAM_ONOFF, true)
  409.     KCConfig:addParam("drawtext", "Draw Text", SCRIPT_PARAM_ONOFF, true)
  410.     KCConfig:addParam("useult", "Use Ult", SCRIPT_PARAM_ONOFF, true)
  411.     KCConfig:addParam("delayw", "Delay W", SCRIPT_PARAM_ONOFF, true)
  412.     KCConfig:permaShow("scriptActive")
  413.     KCConfig:permaShow("harass")
  414.     ts = TargetSelector(TARGET_LOW_HP,range,DAMAGE_MAGIC)
  415.     ts.name = "Katarina"
  416.  
  417.     KCConfig:addTS(ts)
  418.  
  419.     if myHero:GetSpellData(SUMMONER_1).name:find("SummonerDot") then ignite = SUMMONER_1
  420.     elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerDot") then ignite = SUMMONER_2 end
  421.     for i=1, heroManager.iCount do
  422.         waittxt[i] = i*3
  423.     end
  424.    
  425.     --wardJump
  426.     flashSlot = nil
  427.  
  428.     -- Champions that can ward jump
  429.     if player.charName == "Katarina" then
  430.         jumpSlot = _E
  431.         jumpRange = 700
  432.     end
  433.    
  434.    
  435.     --Minions
  436.     for i = 0, objManager.maxObjects, 1 do
  437.         local object = objManager:GetObject(i)
  438.         if minionIsValid(object) then table.insert(minionTable, object) end
  439.     end
  440.     for i = 0, objManager.maxObjects, 1 do
  441.         local object = objManager:GetObject(i)    
  442.         if objectIsValid(object) then table.insert(objectTable, object) end
  443.     end
  444.     PrintChat(">> Katarina Loaded! [Kevinkev] ")
  445. end
  446.  
  447. function CheckBuffs()
  448.     buffCount = player.buffCount
  449.     for i = 1, buffCount, 1 do
  450.         local buff = player:getBuff(i)
  451.        PrintChat(tostring(buff))
  452.        end
  453. end
  454.  
  455.  
  456. function KCDmgCalculation()
  457.     local enemy = heroManager:GetHero(calculationenemy)
  458.     if ValidTarget(enemy) then
  459.         local dfgdamage, hxgdamage, bwcdamage, ignitedamage, Sheendamage, Trinitydamage, LichBanedamage  = 0, 0, 0, 0, 0, 0, 0
  460.         local qdamage = getDmg("Q",enemy,myHero)
  461.         local qdamage2 = getDmg("Q",enemy,myHero,2)
  462.         local wdamage = getDmg("W",enemy,myHero)
  463.         local edamage = getDmg("E",enemy,myHero)
  464.         local rdamage = getDmg("R",enemy,myHero) --xdagger (champion can be hit by a maximum of 10 daggers (2 sec))
  465.         local hitdamage = getDmg("AD",enemy,myHero)
  466.         local dfgdamage = (DFGSlot and getDmg("DFG",enemy,myHero) or 0)
  467.         local hxgdamage = (HXGSlot and getDmg("HXG",enemy,myHero) or 0)
  468.         local bwcdamage = (BWCSlot and getDmg("BWC",enemy,myHero) or 0)
  469.         local ignitedamage = (ignite and getDmg("IGNITE",enemy,myHero) or 0)
  470.         local Sheendamage = (SheenSlot and hitdamage or 0)
  471.         local Trinitydamage = (TrinitySlot and hitdamage*1.5 or 0)
  472.         local LichBanedamage = (LichBaneSlot and getDmg("LICHBANE",enemy,myHero) or 0)
  473.         local combo1 = hitdamage + qdamage*2 + qdamage2*2 + wdamage*2 + edamage*2 + rdamage*10 + Sheendamage + Trinitydamage + LichBanedamage --0 cd
  474.         local combo2 = hitdamage + Sheendamage + Trinitydamage + LichBanedamage
  475.         local combo3 = hitdamage + Sheendamage + Trinitydamage + LichBanedamage
  476.         local combo4 = 0
  477.         if QREADY then
  478.             combo2 = combo2 + qdamage*2 + qdamage2*2
  479.             combo3 = combo3 + qdamage + qdamage2
  480.             combo4 = combo4 + qdamage
  481.             if EREADY then
  482.                 combo4 = combo4 + qdamage2
  483.             end
  484.         end
  485.         if WREADY then
  486.             combo2 = combo2 + wdamage*2
  487.             combo3 = combo3 + wdamage
  488.             if EREADY then
  489.                 combo4 = combo4 + wdamage
  490.             end
  491.         end
  492.         if EREADY then
  493.             combo2 = combo2 + edamage*2
  494.             combo3 = combo3 + edamage
  495.             combo4 = combo4 + edamage
  496.         end
  497.         if myHero:CanUseSpell(_R) ~= COOLDOWN and not myHero.dead then
  498.             combo2 = combo2 + rdamage*10
  499.             combo3 = combo3 + rdamage*7
  500.             if EREADY then
  501.                 combo4 = combo4 + rdamage*3
  502.             end
  503.         end
  504.         if DFGREADY then        
  505.             combo1 = combo1 + dfgdamage            
  506.             combo2 = combo2 + dfgdamage
  507.             combo3 = combo3 + dfgdamage
  508.             combo4 = combo4 + dfgdamage
  509.         end
  510.         if HXGREADY then              
  511.             combo1 = combo1 + hxgdamage    
  512.             combo2 = combo2 + hxgdamage
  513.             combo3 = combo3 + hxgdamage
  514.             combo4 = combo4 + hxgdamage
  515.         end
  516.         if BWCREADY then
  517.             combo1 = combo1 + bwcdamage
  518.             combo2 = combo2 + bwcdamage
  519.             combo3 = combo3 + bwcdamage
  520.             combo4 = combo4 + bwcdamage
  521.         end
  522.         if IREADY then
  523.             combo1 = combo1 + ignitedamage
  524.             combo2 = combo2 + ignitedamage
  525.             combo3 = combo3 + ignitedamage
  526.         end
  527.         if combo4 >= enemy.health then killable[calculationenemy] = 4
  528.         elseif combo3 >= enemy.health then killable[calculationenemy] = 3
  529.         elseif combo2 >= enemy.health then killable[calculationenemy] = 2
  530.         elseif combo1 >= enemy.health then killable[calculationenemy] = 1
  531.         else killable[calculationenemy] = 0 end  
  532.     end
  533.     if calculationenemy == 1 then calculationenemy = heroManager.iCount
  534.     else calculationenemy = calculationenemy-1 end
  535. end
  536.  
  537. function OnProcessSpell(unit, spell)
  538.     if unit.isMe and spell.name == "KatarinaE" then
  539.     inWrange = true
  540.     end
  541.    
  542.     if unit.isMe and spell.name == "KatarinaQ" then
  543.     timeq = GetTickCount()
  544.     end
  545.  
  546. end
  547.  
  548. function minionIsValid(object)
  549.    return object and object.valid and string.find(object.name,"Minion_") and object.team ~= myHero.team and object.type == "obj_AI_Minion"
  550. end
  551. function objectIsValid(object)
  552.    return object and object.valid
  553. end
  554.  
  555.  
  556. function OnCreateObj(object)
  557.     if object.name == "katarina_deathLotus_mis.troy" then ulti = true lastulti = GetTickCount() end
  558.     if object.name:find("katarina_daggered") then lastqmark = GetTickCount() end
  559.     if minionIsValid(object) then table.insert(minionTable, object) end
  560.     if objectIsValid(object) then table.insert(objectTable, object) end
  561. end
  562.  
  563.  
  564. function OnDraw()
  565.     if KCConfig.drawcircles and not myHero.dead then
  566.         DrawCircle(myHero.x, myHero.y, myHero.z, range, 0x19A712)
  567.         if ts.target ~= nil then
  568.             for j=0, 10 do
  569.                 DrawCircle(ts.target.x, ts.target.y, ts.target.z, 40 + j*1.5, 0x00FF00)
  570.             end
  571.         end
  572.     end
  573.     for i=1, heroManager.iCount do
  574.         local enemydraw = heroManager:GetHero(i)
  575.         if ValidTarget(enemydraw) then
  576.  
  577.        
  578.         if KCConfig.drawcircles then
  579.                 if killable[i] == 1 then
  580.                     for j=0, 20 do
  581.                         DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + j*1.5, 0x0000FF)
  582.                     end
  583.                 elseif killable[i] == 2 then
  584.                     for j=0, 10 do
  585.                         DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + j*1.5, 0xFF0000)
  586.                     end
  587.                 elseif killable[i] == 3 then
  588.                     for j=0, 10 do
  589.                         DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + j*1.5, 0xFF0000)
  590.                         DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 110 + j*1.5, 0xFF0000)
  591.                     end
  592.                 elseif killable[i] == 4 then
  593.                     for j=0, 10 do
  594.                         DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + j*1.5, 0xFF0000)
  595.                         DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 110 + j*1.5, 0xFF0000)
  596.                         DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 140 + j*1.5, 0xFF0000)
  597.                     end
  598.                 end
  599.             end
  600.             if KCConfig.drawtext and waittxt[i] == 1 and killable[i] ~= 0 then
  601.                 PrintFloatText(enemydraw,0,floattext[killable[i]])
  602.             end
  603.         end
  604.         if waittxt[i] == 1 then waittxt[i] = 30
  605.         else waittxt[i] = waittxt[i]-1 end
  606.     end
  607.  
  608. end
  609.  
  610.  
  611.  
  612. function Sleep(ms)  -- milliseconds
  613.         local t = GetTickCount()
  614.   if GetTickCount() - t <= ms then
  615.         end
  616. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement