Advertisement
Kevinkev

Pentarina (6/1/2013)

Jan 6th, 2013
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 20.00 KB | None | 0 0
  1.  
  2.  
  3. --[[
  4.  
  5.     Version 1.0
  6.    
  7.     All in one Katarina merged+modified by Kevinkev.
  8.     with:
  9.    
  10.     -functionDescription (hotkey)
  11.    
  12.     -wardJump (g) <-hold
  13.     -autoCS (z)         -shunpo (u)
  14.     -autoKS (x)
  15.     -autoGapCloseKill with e :D (v)
  16.     -combo (spacebar)
  17.  
  18.    
  19.     I deleted the original descriptions because it was messy and I was scripting ok? >: O
  20.    
  21.     Credits to:
  22.     eXtragoZ for Katarina Combo
  23.     TRUS for edited Katarina Combo version
  24.     Pain for (auto)KatarinaStealer V0.24
  25.     Unlimited for Katarina CS
  26.     ikita for Ward JUMP :)
  27.     Kevinkev for eQ (e -> kill)
  28.    
  29.     Apologies for the code being quite messy, if anyone wants to... clean it up :P
  30.    
  31.     Note: The ratio values for QWE I'm not sure is 100% correct so please let me know.
  32.    
  33.     Any other stuff pm me or post a reply.
  34. ]]
  35.  
  36. if myHero.charName ~= "Katarina" then return end
  37.  
  38.    
  39.  
  40.     local wille = false
  41.  
  42.     local willeHk = 85
  43.  
  44.     local f = false
  45.  
  46.    
  47.    
  48.     local fHk = 90
  49.  
  50.    
  51.     local qrng = 675
  52.  
  53.     local wrng = 375
  54.     local inWrange = false
  55.     local erng = 700
  56.  
  57. --[[            Code            ]]
  58.  
  59. local range = 730
  60.  
  61. local ULTK=82 --R (security method)
  62.  
  63. local tick = nil
  64.  
  65. ultcount = 0
  66.  
  67. -- Active
  68.  
  69. local ulti = false
  70.  
  71. local delayult = 300
  72.  
  73. local delayult2 = 1200
  74.  
  75. local timeulti = 0
  76.  
  77. local timeulti2 = 0
  78.  
  79. local timeq = 0
  80.  
  81. local lastqmark = 0
  82.  
  83. lastulti = 0
  84.  
  85. -- draw
  86.  
  87. local waittxt = {}
  88.  
  89. local calculationenemy = 1
  90.  
  91. local floattext = {"Skills are not available","Able to fight","Killable","Murder him!"}
  92.  
  93. local killable = {}
  94.  
  95. -- ts
  96.  
  97. local ts
  98.  
  99. --
  100.  
  101. local ignite = nil
  102.  
  103. local DFGSlot, HXGSlot, BWCSlot, SheenSlot, TrinitySlot, LichBaneSlot = nil, nil, nil, nil, nil, nil
  104.  
  105. local QREADY, WREADY, EREADY, RREADY, DFGREADY, HXGREADY, BWCREADY, IREADY = false, false, false, false, false, false, false, false
  106.  
  107. local hotkey = string.byte("X")  -- X
  108. local scriptActive = active
  109.  
  110. --[[        Config      ]]                          
  111. flashToggle = "0"
  112. jumpKey = "G"
  113. local HKF = string.byte(flashToggle) --Toggle on/off for includeFlash minus key "0"
  114. local HK = string.byte(jumpKey) --Hold hotkey to flash to location. default at " G " (the key left to number 1)
  115. local flashRange = 420 --Flash range is 400. Real range is larger if you flash inside a wall
  116. 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.
  117. local jumpDelay = 50 -- a slight delay after warding before jumping
  118.  
  119. local includeFlash = true --initial setting when going into a new game
  120.  
  121. --Nothing
  122. local lastJump = 0
  123. local wardTarget
  124. local jumpReady = false
  125.  
  126.    
  127.  
  128. function OnTick()
  129. --WardJump
  130. if jumpReady == true and GetTickCount() - lastJump > jumpDelay then
  131.         jumpNowAlready()
  132.     end
  133.     if wardScriptActive then
  134.    
  135.         local x = mousePos.x
  136.         local z = mousePos.z
  137.         local dx = x - player.x
  138.         local dz = z - player.z
  139.         local rad1 = math.atan2(dz, dx)
  140.        
  141.         --Crap code here needs cleaning up
  142.                 if GetInventorySlotItem(3154) ~= nil then
  143.             wardSlot = GetInventorySlotItem(3154)
  144.  
  145.             if player:CanUseSpell(wardSlot) ~= READY then
  146.                 if GetInventorySlotItem(2049) ~= nil then
  147.                     wardSlot = GetInventorySlotItem(2049)
  148.                     if player:CanUseSpell(wardSlot) ~= READY then
  149.                         if GetInventorySlotItem(2045) ~= nil then
  150.                             wardSlot = GetInventorySlotItem(2045)
  151.                             if player:CanUseSpell(wardSlot) ~= READY then
  152.                                 if GetInventorySlotItem(2044) ~= nil then
  153.                                     wardSlot = GetInventorySlotItem(2044)
  154.                                 elseif GetInventorySlotItem(2043) ~= nil then
  155.                                     wardSlot = GetInventorySlotItem(2043)
  156.                                 else
  157.                                     wardSlot = nil
  158.                                 end
  159.                             end
  160.                         elseif GetInventorySlotItem(2044) ~= nil then
  161.                             wardSlot = GetInventorySlotItem(2044)
  162.                         elseif GetInventorySlotItem(2043) ~= nil then
  163.                             wardSlot = GetInventorySlotItem(2043)
  164.                         else
  165.                             wardSlot = nil
  166.                         end
  167.                     end
  168.                 elseif GetInventorySlotItem(2045) ~= nil then
  169.                     wardSlot = GetInventorySlotItem(2045)
  170.                     if player:CanUseSpell(wardSlot) ~= READY then
  171.                         if GetInventorySlotItem(2044) ~= nil then
  172.                             wardSlot = GetInventorySlotItem(2044)
  173.                         elseif GetInventorySlotItem(2043) ~= nil then
  174.                             wardSlot = GetInventorySlotItem(2043)
  175.                         else
  176.                             wardSlot = nil
  177.                         end
  178.                     end
  179.                 elseif GetInventorySlotItem(2044) ~= nil then
  180.                     wardSlot = GetInventorySlotItem(2044)
  181.                 elseif GetInventorySlotItem(2043) ~= nil then
  182.                     wardSlot = GetInventorySlotItem(2043)
  183.                 else
  184.                     wardSlot = nil
  185.                 end
  186.             end
  187.         elseif GetInventorySlotItem(2049) ~= nil then
  188.             wardSlot = GetInventorySlotItem(2049)
  189.             if player:CanUseSpell(wardSlot) ~= READY then
  190.                 if GetInventorySlotItem(2045) ~= nil then
  191.                     wardSlot = GetInventorySlotItem(2045)
  192.                     if player:CanUseSpell(wardSlot) ~= READY then
  193.                         if GetInventorySlotItem(2044) ~= nil then
  194.                             wardSlot = GetInventorySlotItem(2044)
  195.                         elseif GetInventorySlotItem(2043) ~= nil then
  196.                             wardSlot = GetInventorySlotItem(2043)
  197.                         else
  198.                             wardSlot = nil
  199.                         end
  200.                     end
  201.                 elseif GetInventorySlotItem(2044) ~= nil then
  202.                     wardSlot = GetInventorySlotItem(2044)
  203.                 elseif GetInventorySlotItem(2043) ~= nil then
  204.                     wardSlot = GetInventorySlotItem(2043)
  205.                 else
  206.                     wardSlot = nil
  207.                 end
  208.             end
  209.         elseif GetInventorySlotItem(2045) ~= nil then
  210.             wardSlot = GetInventorySlotItem(2045)
  211.             if player:CanUseSpell(wardSlot) ~= READY then
  212.                 if GetInventorySlotItem(2044) ~= nil then
  213.                     wardSlot = GetInventorySlotItem(2044)
  214.                 elseif GetInventorySlotItem(2043) ~= nil then
  215.                     wardSlot = GetInventorySlotItem(2043)
  216.                 else
  217.                     wardSlot = nil
  218.                 end
  219.             end
  220.         elseif GetInventorySlotItem(2044) ~= nil then
  221.             wardSlot = GetInventorySlotItem(2044)
  222.         elseif GetInventorySlotItem(2043) ~= nil then
  223.             wardSlot = GetInventorySlotItem(2043)
  224.         else
  225.             wardSlot = nil
  226.         end
  227.  
  228.        
  229.         if wardSlot ~= nil and jumpSlot ~= nil then
  230.             --for wards
  231.             local dx1 = flashRange*math.cos(rad1)
  232.             local dz1 = flashRange*math.sin(rad1)
  233.            
  234.             local x1 = x - dx1
  235.             local z1 = z - dz1
  236.             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)
  237.                 CastSpell( wardSlot, x, z )
  238.                 jumpReady = true
  239.                 lastJump = GetTickCount()
  240.             else
  241.                 player:MoveTo(x1, z1)
  242.             end
  243.         end
  244.            
  245.        
  246.     end
  247.    
  248.     --endWardJump
  249.  
  250.  
  251.     ts:update()
  252.     local qdmg = math.floor((player:GetSpellData(_Q).level-1)*30 + 60 + player.ap * .45)
  253.    
  254.     local wdmg = math.floor((player:GetSpellData(_W).level-1)*35 + 40 + player.ap * .25 + player.addDamage * .6)
  255.  
  256.     local edmg = math.floor((player:GetSpellData(_E).level-1)*25 + 60 + player.ap * .4)
  257.  
  258.    
  259.  
  260.  
  261.  
  262. if f then
  263.  
  264.         for k = 1, objManager.maxObjects do
  265.  
  266.             local minionObjectI = objManager:GetObject(k)
  267.  
  268.             if minionObjectI ~= nil and string.find(minionObjectI.name,"Minion_") == 1 and minionObjectI.team ~= player.team and minionObjectI.dead == false then
  269.  
  270.                 if  player:GetDistance(minionObjectI) < qrng and minionObjectI.health <= player:CalcDamage(minionObjectI,qdmg) and myHero:CanUseSpell(_Q) == READY then
  271.  
  272.                 CastSpell(_Q, minionObjectI)
  273.  
  274.                         elseif player:GetDistance(minionObjectI) < wrng and minionObjectI.health <= player:CalcDamage(minionObjectI,wdmg) and myHero:CanUseSpell(_W) == READY and  myHero:CanUseSpell(_Q) == COOLDOWN then 
  275.  
  276.                 CastSpell(_W, minionObjectI)
  277.  
  278.                         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 
  279.  
  280.                 CastSpell(_E, minionObjectI)
  281.  
  282.                         end
  283.  
  284.                     end
  285.  
  286.             end
  287.  
  288. end
  289.  
  290. --PART
  291.  
  292.  
  293.  
  294.  
  295.  
  296.     DFGSlot, HXGSlot, BWCSlot, SheenSlot, TrinitySlot, LichBaneSlot = GetInventorySlotItem(3128), GetInventorySlotItem(3146), GetInventorySlotItem(3144), GetInventorySlotItem(3057), GetInventorySlotItem(3078), GetInventorySlotItem(3100)
  297.  
  298.     QREADY = (myHero:CanUseSpell(_Q) == READY)
  299.  
  300.     WREADY = (myHero:CanUseSpell(_W) == READY)
  301.  
  302.     EREADY = (myHero:CanUseSpell(_E) == READY)
  303.  
  304.     RREADY = (myHero:CanUseSpell(_R) == READY)
  305.  
  306.     DFGREADY = (DFGSlot ~= nil and myHero:CanUseSpell(DFGSlot) == READY)
  307.  
  308.     HXGREADY = (HXGSlot ~= nil and myHero:CanUseSpell(HXGSlot) == READY)
  309.  
  310.     BWCREADY = (BWCSlot ~= nil and myHero:CanUseSpell(BWCSlot) == READY)
  311.  
  312.     IREADY = (ignite ~= nil and myHero:CanUseSpell(ignite) == READY)
  313.  
  314.     if tick == nil or GetTickCount()-tick >= 100 then
  315.  
  316.         tick = GetTickCount()
  317.  
  318.         KCDmgCalculation()
  319.  
  320.     end
  321.  
  322.     if GetTickCount() > lastulti + 250 and ulti then ulti = false end
  323.  
  324.    
  325.  
  326.     if KCConfig.harass and ts.target ~= nil and not ulti then
  327.  
  328.         if QREADY then CastSpell(_Q, ts.target) end
  329.  
  330.     end
  331.  
  332.     if KCConfig.scriptActive and ts.target ~= nil and not ulti then
  333.  
  334.         if DFGREADY then CastSpell(DFGSlot, ts.target) end
  335.  
  336.         if QREADY then CastSpell(_Q, ts.target) end
  337.  
  338.         if EREADY then CastSpell(_E,ts.target) end
  339.  
  340.         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
  341.  
  342.         if HXGREADY then CastSpell(HXGSlot, ts.target) end
  343.  
  344.         if BWCREADY then CastSpell(BWCSlot, ts.target) end
  345.  
  346.         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
  347.  
  348.             timeulti = GetTickCount()
  349.  
  350.             timeulti2 = GetTickCount()
  351.  
  352.             CastSpell(_R)
  353.  
  354.         end
  355.  
  356.     end
  357.  
  358. --PART
  359.  
  360. if scriptActive then
  361. if player:GetSpellData(_E).level > 0 then
  362.             for i=1, heroManager.iCount do
  363.                 target = heroManager:GetHero(i)
  364.         local eDmg = player:CalcMagicDamage(target, 25*(player:GetSpellData(_E).level-1)+60+(.4*player.ap))
  365.         local wDmg = player:CalcMagicDamage(target, 35*(player:GetSpellData(_W).level-1) +40+ (.25*player.ap)+(.6*player.addDamage)) --375
  366.         local qDmg = player:CalcMagicDamage(target, 30*(player:GetSpellData(_Q).level-1)+60+(.45*player.ap))
  367.                
  368.                
  369.                 if target ~= nil and target.visible == true and player.team ~= target.team and target.dead == false and player:GetDistance(target) < 650 then
  370.                         if target.health < wDmg + eDmg + qDmg then                             
  371.                             CastSpell(_Q, target)
  372.                                 CastSpell(_E, target)
  373.                                     Sleep(100)
  374.                                         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
  375.                         if player:CanUseSpell(_W) == READY then
  376.                                 CastSpell(_W, target)
  377.                                 end
  378.                             end
  379.                         end
  380.                     end
  381.                        
  382.                         if target ~= nil and target.visible == true and player.team ~= target.team and target.dead == false and player:GetDistance(target) < 650 then
  383.                         if target.health < wDmg + eDmg then
  384.                             CastSpell(_E, target)
  385.                                 Sleep(100)
  386.                                     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
  387.                         if player:CanUseSpell(_W) == READY then
  388.                                 CastSpell(_W, target)
  389.                             end
  390.                         end
  391.                     end
  392.                        
  393.                         if target ~= nil and target.visible == true and player.team ~= target.team and target.dead == false and player:GetDistance(target) < 375 then
  394.                         if target.health < qDmg + wDmg then
  395.                             if player:CanUseSpell(_Q) == READY then
  396.                                 if player:CanUseSpell(_W) == READY then
  397.                                     CastSpell(_W, target)
  398.                                         CastSpell(_Q, target)
  399.                                     end
  400.                                 end
  401.                             end
  402.                         end
  403.                     end
  404.                 end
  405.             end
  406.     end
  407.  
  408. end
  409.  
  410. function OnWndMsg(msg, key)
  411. --PART1
  412.     if key == fHk then
  413.  
  414.         if msg == KEY_DOWN then
  415.  
  416.             if f then
  417.  
  418.                 f = false
  419.  
  420.                 PrintChat(">> Auto Farm Disabled")
  421.  
  422.             else
  423.  
  424.                 f = true
  425.  
  426.                 PrintChat(">> Auto Farm Enabled")
  427.  
  428.             end
  429.  
  430.         end
  431.  
  432.     end
  433.  
  434.  
  435.     if key == willeHk then
  436.  
  437.         if msg == KEY_DOWN then
  438.  
  439.             if wille then
  440.  
  441.                 wille = false
  442.  
  443.                 PrintChat("Shunpo Disabled")
  444.  
  445.             else
  446.  
  447.                 wille = true
  448.  
  449.                 PrintChat("Shunpo Enabled")
  450.  
  451.             end
  452.  
  453.         end
  454.  
  455.     end
  456. --PART2
  457. if key == hotkey then
  458. if msg == KEY_DOWN then
  459. if scriptActive then
  460. scriptActive = false
  461. PrintChat(">>!!!You're on your own now!!!!<<")
  462. else
  463. scriptActive = true
  464. PrintChat(">>!!!You made the right choice!!!<<")
  465. end
  466. end
  467. end
  468. --PART3
  469.  
  470.     if key == ULTK and msg == KEY_DOWN then
  471.  
  472.         timeulti = GetTickCount()
  473.  
  474.         timeulti2 = GetTickCount()
  475.  
  476.     end
  477.  
  478.     SC__OnWndMsg(msg,key)
  479.  
  480. --wardJump
  481.     if key == HK then
  482.         if msg == KEY_DOWN then
  483.             wardScriptActive = true
  484.         else
  485.             wardScriptActive = false
  486.         end
  487.     end
  488.    
  489.    
  490. end
  491.  
  492. function jumpNowAlready()
  493.     if wardScriptActive and jumpReady == true then
  494.         for k = 1, objManager.maxObjects do
  495.         local object = objManager:GetObject(k)
  496.             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
  497.                 CastSpell( jumpSlot, object)
  498.                 jumpReady = false
  499.             end
  500.         end
  501.     end
  502. end
  503.  
  504. function OnLoad()
  505.  
  506.     KCConfig = scriptConfig("Katarina Combo 2.7", "katarinacombo")
  507.  
  508.     KCConfig:addParam("scriptActive", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 32)
  509.  
  510.     KCConfig:addParam("harass", "Harass", SCRIPT_PARAM_ONKEYDOWN, false, 84)
  511.  
  512.     KCConfig:addParam("drawcircles", "Draw Circles", SCRIPT_PARAM_ONOFF, true)
  513.  
  514.     KCConfig:addParam("drawtext", "Draw Text", SCRIPT_PARAM_ONOFF, true)
  515.  
  516.     KCConfig:addParam("useult", "Use Ult", SCRIPT_PARAM_ONOFF, true)
  517.  
  518.     KCConfig:addParam("delayw", "Delay W", SCRIPT_PARAM_ONOFF, true)
  519.  
  520.     KCConfig:permaShow("scriptActive")
  521.  
  522.     KCConfig:permaShow("harass")
  523.  
  524.     ts = TargetSelector(TARGET_LOW_HP,range,DAMAGE_MAGIC)
  525.    
  526.    
  527.     ts.name = "Katarina"
  528.  
  529.     KCConfig:addTS(ts)
  530.  
  531.     if myHero:GetSpellData(SUMMONER_1).name:find("SummonerDot") then ignite = SUMMONER_1
  532.  
  533.     elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerDot") then ignite = SUMMONER_2 end
  534.  
  535.     for i=1, heroManager.iCount do
  536.  
  537.         waittxt[i] = i*3
  538.  
  539.     end
  540.    
  541.     --wardJump
  542.             flashSlot = nil
  543.  
  544.     -- Champions that can ward jump
  545.     if player.charName == "Katarina" then
  546.         jumpSlot = _E
  547.         jumpRange = 700
  548.     end
  549.  
  550. end
  551.  
  552.  
  553.  
  554. function CheckBuffs()
  555.  
  556.     buffCount = player.buffCount
  557.  
  558.     for i = 1, buffCount, 1 do
  559.  
  560.         local buff = player:getBuff(i)
  561.  
  562.        PrintChat(tostring(buff))
  563.  
  564.        end
  565.  
  566. end
  567.  
  568.  
  569.  
  570.  
  571. function KCDmgCalculation()
  572.  
  573.     local enemy = heroManager:GetHero(calculationenemy)
  574.  
  575.     if ValidTarget(enemy) then
  576.  
  577.         local dfgdamage, hxgdamage, bwcdamage, ignitedamage, Sheendamage, Trinitydamage, LichBanedamage  = 0, 0, 0, 0, 0, 0, 0
  578.  
  579.         local qdamage = getDmg("Q",enemy,myHero)
  580.  
  581.         local qdamage2 = getDmg("Q",enemy,myHero,2)
  582.  
  583.         local wdamage = getDmg("W",enemy,myHero)
  584.  
  585.         local edamage = getDmg("E",enemy,myHero)
  586.  
  587.         local rdamage = getDmg("R",enemy,myHero) --xdagger (champion can be hit by a maximum of 10 daggers (2 sec))
  588.  
  589.         local hitdamage = getDmg("AD",enemy,myHero)
  590.  
  591.         local dfgdamage = (DFGSlot and getDmg("DFG",enemy,myHero) or 0)
  592.  
  593.         local hxgdamage = (HXGSlot and getDmg("HXG",enemy,myHero) or 0)
  594.  
  595.         local bwcdamage = (BWCSlot and getDmg("BWC",enemy,myHero) or 0)
  596.  
  597.         local ignitedamage = (ignite and getDmg("IGNITE",enemy,myHero) or 0)
  598.  
  599.         local Sheendamage = (SheenSlot and hitdamage or 0)
  600.  
  601.         local Trinitydamage = (TrinitySlot and hitdamage*1.5 or 0)
  602.  
  603.         local LichBanedamage = (LichBaneSlot and getDmg("LICHBANE",enemy,myHero) or 0)
  604.  
  605.         local combo1 = hitdamage + qdamage*2 + qdamage2*2 + wdamage*2 + edamage*2 + rdamage*10 + Sheendamage + Trinitydamage + LichBanedamage --0 cd
  606.  
  607.         local combo2 = hitdamage + Sheendamage + Trinitydamage + LichBanedamage
  608.  
  609.         local combo3 = hitdamage + Sheendamage + Trinitydamage + LichBanedamage
  610.  
  611.         local combo4 = 0
  612.  
  613.         if QREADY then
  614.  
  615.             combo2 = combo2 + qdamage*2 + qdamage2*2
  616.  
  617.             combo3 = combo3 + qdamage + qdamage2
  618.  
  619.             combo4 = combo4 + qdamage
  620.  
  621.             if EREADY then
  622.  
  623.                 combo4 = combo4 + qdamage2
  624.  
  625.             end
  626.  
  627.         end
  628.  
  629.         if WREADY then
  630.  
  631.             combo2 = combo2 + wdamage*2
  632.  
  633.             combo3 = combo3 + wdamage
  634.  
  635.             if EREADY then
  636.  
  637.                 combo4 = combo4 + wdamage
  638.  
  639.             end
  640.  
  641.         end
  642.  
  643.         if EREADY then
  644.  
  645.             combo2 = combo2 + edamage*2
  646.  
  647.             combo3 = combo3 + edamage
  648.  
  649.             combo4 = combo4 + edamage
  650.  
  651.         end
  652.  
  653.         if myHero:CanUseSpell(_R) ~= COOLDOWN and not myHero.dead then
  654.  
  655.             combo2 = combo2 + rdamage*10
  656.  
  657.             combo3 = combo3 + rdamage*7
  658.  
  659.             if EREADY then
  660.  
  661.                 combo4 = combo4 + rdamage*3
  662.  
  663.             end
  664.  
  665.         end
  666.  
  667.         if DFGREADY then        
  668.  
  669.             combo1 = combo1 + dfgdamage            
  670.  
  671.             combo2 = combo2 + dfgdamage
  672.  
  673.             combo3 = combo3 + dfgdamage
  674.  
  675.             combo4 = combo4 + dfgdamage
  676.  
  677.         end
  678.  
  679.         if HXGREADY then              
  680.  
  681.             combo1 = combo1 + hxgdamage    
  682.  
  683.             combo2 = combo2 + hxgdamage
  684.  
  685.             combo3 = combo3 + hxgdamage
  686.  
  687.             combo4 = combo4 + hxgdamage
  688.  
  689.         end
  690.  
  691.         if BWCREADY then
  692.  
  693.             combo1 = combo1 + bwcdamage
  694.  
  695.             combo2 = combo2 + bwcdamage
  696.  
  697.             combo3 = combo3 + bwcdamage
  698.  
  699.             combo4 = combo4 + bwcdamage
  700.  
  701.         end
  702.  
  703.         if IREADY then
  704.  
  705.             combo1 = combo1 + ignitedamage
  706.  
  707.             combo2 = combo2 + ignitedamage
  708.  
  709.             combo3 = combo3 + ignitedamage
  710.  
  711.         end
  712.  
  713.         if combo4 >= enemy.health then killable[calculationenemy] = 4
  714.  
  715.         elseif combo3 >= enemy.health then killable[calculationenemy] = 3
  716.  
  717.         elseif combo2 >= enemy.health then killable[calculationenemy] = 2
  718.  
  719.         elseif combo1 >= enemy.health then killable[calculationenemy] = 1
  720.  
  721.         else killable[calculationenemy] = 0 end  
  722.  
  723.     end
  724.  
  725.     if calculationenemy == 1 then calculationenemy = heroManager.iCount
  726.  
  727.     else calculationenemy = calculationenemy-1 end
  728.  
  729. end
  730.  
  731. function OnProcessSpell(unit, spell)
  732.     if unit.isMe and spell.name == "KatarinaE" then
  733.     inWrange = true
  734.     end
  735.    
  736.     if unit.isMe and spell.name == "KatarinaQ" then
  737.     timeq = GetTickCount()
  738.     end
  739.  
  740. end
  741.  
  742.  
  743.  
  744. function OnCreateObj(object)
  745.  
  746. if object.name == "katarina_deathLotus_mis.troy" then ulti = true lastulti = GetTickCount() end
  747.  
  748.     if object.name:find("katarina_daggered") then lastqmark = GetTickCount() end
  749.  
  750. end
  751.  
  752.  
  753.  
  754.  
  755.  
  756. function OnDraw()
  757.  
  758.     if KCConfig.drawcircles and not myHero.dead then
  759.  
  760.         DrawCircle(myHero.x, myHero.y, myHero.z, range, 0x19A712)
  761.  
  762.         if ts.target ~= nil then
  763.  
  764.             for j=0, 10 do
  765.  
  766.                 DrawCircle(ts.target.x, ts.target.y, ts.target.z, 40 + j*1.5, 0x00FF00)
  767.  
  768.             end
  769.  
  770.         end
  771.  
  772.     end
  773.  
  774.     for i=1, heroManager.iCount do
  775.  
  776.         local enemydraw = heroManager:GetHero(i)
  777.  
  778.         if ValidTarget(enemydraw) then
  779.  
  780.  
  781.        
  782.             if KCConfig.drawcircles then
  783.  
  784.                 if killable[i] == 1 then
  785.  
  786.                     for j=0, 20 do
  787.  
  788.                         DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + j*1.5, 0x0000FF)
  789.  
  790.                     end
  791.  
  792.                 elseif killable[i] == 2 then
  793.  
  794.                     for j=0, 10 do
  795.  
  796.                         DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + j*1.5, 0xFF0000)
  797.  
  798.                     end
  799.  
  800.                 elseif killable[i] == 3 then
  801.  
  802.                     for j=0, 10 do
  803.  
  804.                         DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + j*1.5, 0xFF0000)
  805.  
  806.                         DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 110 + j*1.5, 0xFF0000)
  807.  
  808.                     end
  809.  
  810.                 elseif killable[i] == 4 then
  811.  
  812.                     for j=0, 10 do
  813.  
  814.                         DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + j*1.5, 0xFF0000)
  815.  
  816.                         DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 110 + j*1.5, 0xFF0000)
  817.  
  818.                         DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 140 + j*1.5, 0xFF0000)
  819.  
  820.                     end
  821.  
  822.                 end
  823.  
  824.             end
  825.  
  826.             if KCConfig.drawtext and waittxt[i] == 1 and killable[i] ~= 0 then
  827.  
  828.                 PrintFloatText(enemydraw,0,floattext[killable[i]])
  829.  
  830.             end
  831.  
  832.         end
  833.  
  834.         if waittxt[i] == 1 then waittxt[i] = 30
  835.  
  836.         else waittxt[i] = waittxt[i]-1 end
  837.  
  838.     end
  839.  
  840.     SC__OnDraw()
  841.  
  842. end
  843.  
  844.  
  845.  
  846.  
  847.  
  848. function OnSendChat(msg)
  849.  
  850.     TargetSelector__OnSendChat(msg)
  851.  
  852.     ts:OnSendChat(msg, "pri")
  853.  
  854. end
  855.  
  856.  
  857.  
  858.  
  859.  
  860. PrintChat(">> Katarina Loaded! [Kevinkev] ")
  861.  
  862.  
  863. function Sleep(ms)  -- milliseconds
  864.         local t = GetTickCount()
  865.   if GetTickCount() - t <= ms then
  866.         end
  867. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement