Advertisement
16HeX16

Ultimate Lee Sin 1.5.2

Mar 30th, 2013
8,518
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 20.97 KB | None | 0 0
  1. --[[ Ultimate Lee Sin 1.5.2 by HeX
  2.  
  3. Hot Keys:
  4.     -Basic Combo: Space
  5.     -Use ultimate in combo: C
  6.     -Ward Jump: G
  7.     -Jump Shield Combo: T
  8.     -Ult Closest Enemy: X
  9.  
  10. Features:
  11.     -Basic Combo: Items-> Q-> Q-> AA-> E-> AA-> E
  12.     -Full Combo(With Use Ulti in combo activated): Items-> Q-> R-> Q-> AA-> E-> AA-> E
  13.     -Jump Shield Combo: Q-> Q-> W(To nearby minion or champion, champions should be priority)
  14.     -Ultimate Closest Enemy.
  15.     -Use ulti in combo ON/OFF option in ingame menu
  16.     -Can now toggle Minion Collision
  17.     -Mark killable target with a combo
  18.     -Target configuration, Press shift to configure
  19.     -Auto ignite and/or Ulti killable enemy ON/OFF option in ingame menu
  20.     -Ward Jump (Ruby Sight Stone, Sight Stone, Green Wards, Pink Wards, Wriggles)
  21.   -Ward Jump more responsive
  22.     -Item Support: Blade of the Ruined King, Bligewater Cutlass, Tiamat, Ravenous Hydra, Randuin's Omen.
  23.  
  24. Explanation of the marks:
  25.     -Green circle: Your current target.
  26.     -Blue circle: Killed with a combo, if all the skills were available.
  27.     -Red circle: Killed using Items + 2 Attacks + Q + E + R + Ignite(if available).
  28.     -2 Red circles: Killed using Items + 1 Attack + Q + Ignite(if available).
  29.     -3 Red circles: Killed using R.
  30.    
  31. To-Do:
  32.     -Auto Ultimate on champions with GA, Zilean ult, Tryndamere ult, Kayle Ult, Spell Shields.
  33. ]]
  34.    
  35. --[[=====================================Settings==========================================]]--
  36. if myHero.charName ~= "LeeSin" then return end
  37.  
  38. --[[Locals]]--
  39. local attackrange = 130
  40. local qrange = 975
  41. local qwidth = 75 -- Increase if Q is hitting creep with collision ON.
  42. local ultirange = 375
  43. local wrange = 700
  44. local waittxt = {}
  45. local floattext = {"Skills on cooldown.","Killable","Easy kill","Ultimate him!"}
  46. local killable = {}
  47. local calculationenemy = 1
  48. local ignite = nil
  49. local BRKid, BWCid, TMTid, RAHid, RNDid = 3153, 3144, 3077, 3074, 3143
  50. local BRKSlot, DFGSlot, HXGSlot, BWCSlot, TMTSlot, RAHSlot, RNDSlot = nil, nil, nil, nil, nil, nil, nil
  51. local QREADY, WREADY, EREADY, RREADY, IREADY = false, false, false, false, false
  52. --[[Q Prediction]]--
  53. local delay = 250
  54. local qspeed = 1.5
  55. local travelDuration = 0
  56. local enemyMinions = {}
  57. local rCast = false
  58. --[[Auto Attacks]]--
  59. local lastBasicAttack = 0
  60. local swingDelay = 0.25
  61. local swing = 0
  62. --[[Q Dodge]]--
  63. local dodgeMinions = {}
  64. local qDelay = nil
  65. local qCast = false
  66. local dodgeMinion = nil
  67. local dodgeHero = nil
  68. local wDelay = 0
  69. local qMultiplier = 1.1 --Increase if Q-Shield combo is too fast
  70. --[[Ward Jump]]--
  71. local myObjectsTable = {}
  72. local wardRange = 600
  73. local jumpDelay = 0
  74. local lastJump = 0
  75. local SWard, VWard, SStone, RSStone, Wriggles = 2044, 2043, 2049, 2045, 3154
  76. local SWardSlot, VWardSlot, SStoneSlot, RSStoneSlot, WrigglesSlot = nil, nil, nil, nil, nil
  77. local jumpReady = false
  78. local jumpSlot = _W
  79. local jumpRange = 700
  80. local flashRange = 540
  81.  
  82. local player = GetMyHero()
  83.  
  84. --[[=====================================Script Config=====================================]]--
  85. function OnLoad()
  86.     PrintChat("<font color='#CCCCCC'> >> Ultimate Lee Sin 1.5.2 loaded! <<</font>")
  87.     LeeSinConfig = scriptConfig("LeeSin Config", "LeeSincombo")
  88.     LeeSinConfig:addParam("scriptActive", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 32)
  89.     LeeSinConfig:addParam("wardjump", "Ward Jump", SCRIPT_PARAM_ONKEYDOWN, false, 71)
  90.     LeeSinConfig:addParam("qDodge", "Jump Shield Combo", SCRIPT_PARAM_ONKEYDOWN, false, 84)
  91.     LeeSinConfig:addParam("rClose", "Ult Closest Enemy", SCRIPT_PARAM_ONKEYDOWN, false, 88)
  92.     LeeSinConfig:addParam("drawcirclesEnemy", "DrawCircles - Enemies", SCRIPT_PARAM_ONOFF, false)
  93.     LeeSinConfig:addParam("drawcirclesSelf", "DrawCircles - Self", SCRIPT_PARAM_ONOFF, false)
  94.     LeeSinConfig:addParam("drawtext", "DrawText - Enemies", SCRIPT_PARAM_ONOFF, true)
  95.     LeeSinConfig:addParam("useUlti", "Use Ult in combo", SCRIPT_PARAM_ONKEYTOGGLE, false, 67)
  96.     LeeSinConfig:addParam("autoult", "Ult when killable", SCRIPT_PARAM_ONOFF, false)
  97.     LeeSinConfig:addParam("autoignite", "Auto Ignite", SCRIPT_PARAM_ONOFF, true)
  98.     LeeSinConfig:addParam("checkCollision", "Use minion collision", SCRIPT_PARAM_ONOFF, true)
  99.     LeeSinConfig:permaShow("scriptActive")
  100.     LeeSinConfig:permaShow("wardjump")
  101.     LeeSinConfig:permaShow("qDodge")
  102.     LeeSinConfig:permaShow("useUlti")
  103.     LeeSinConfig:permaShow("autoult")
  104.    
  105.     for i = 0, objManager.maxObjects, 1 do
  106.         local object = objManager:GetObject(i)
  107.             if objectIsValid(object) then table.insert(myObjectsTable, object) end
  108.   end  
  109.    
  110.     for k = 1, objManager.maxObjects, 1 do
  111.         local dMinion = objManager:getObject(k)
  112.         if dMinion ~= nil and dMinion.dead ~= true and dMinion.name:find("Minion_") and dMinion.team == myHero.team then
  113.             table.insert(dodgeMinions, dMinion)
  114.         end
  115.     end
  116.    
  117.     for i = 0, objManager.maxObjects, 1 do
  118.         local object = objManager:GetObject(i)
  119.         if CollisionCheck(object) then table.insert(enemyMinions, object) end
  120.     end
  121.  
  122.     if myHero:GetSpellData(SUMMONER_1).name:find("SummonerDot") then ignite = SUMMONER_1
  123.         elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerDot") then ignite = SUMMONER_2
  124.     end
  125.     for i=1, heroManager.iCount do waittxt[i] = i*3 end
  126.         ts = TargetSelector(TARGET_LOW_HP,1250,DAMAGE_PHYSICAL)
  127.         ts.name = "LeeSin"
  128.         LeeSinConfig:addTS(ts)
  129. end
  130.  
  131. --[[Basic Functions]]--
  132. --[[======================================Debug Functions==================================]]--
  133. function OnProcessSpell(unit, spell)
  134.     if unit.isMe and (spell.name:find("Attack") ~= nil) then
  135.         swing = 1
  136.         lastBasicAttack = os.clock()
  137.     end
  138. end
  139.  
  140. --[[====================================Closest Enemy Check================================]]--
  141. --[[---------------------------------------Close Check-------------------------------------]]--
  142. function findClosestEnemy()
  143.     local closestEnemy = nil
  144.     local currentEnemy = nil
  145.     for i=1, heroManager.iCount do
  146.         currentEnemy = heroManager:GetHero(i)
  147.         if currentEnemy.team ~= myHero.team and not currentEnemy.dead and currentEnemy.visible then
  148.             if closestEnemy == nil then
  149.                 closestEnemy = currentEnemy
  150.                 elseif GetDistance(currentEnemy) < GetDistance(closestEnemy) then
  151.                     closestEnemy = currentEnemy
  152.             end
  153.         end
  154.     end
  155. return closestEnemy
  156. end
  157.  
  158. --[[=====================================Ward Jump Checks==================================]]--
  159. --[[-------------------------------------Ward Check----------------------------------------]]--
  160. function objectIsValid(object)
  161.     return object and object.valid and (string.find(object.name, "Ward") ~= nil or string.find(object.name, "Wriggle") ~= nil)
  162. end
  163.  
  164. --[[-------------------------------------Jump Function-------------------------------------]]--
  165. function jumpNowAlready()
  166.     if jumpReady == true then
  167.         for i,object in ipairs(myObjectsTable) do
  168.             if object ~= nil and object.valid and math.sqrt((object.x-mousePos.x)^2+(object.z-mousePos.z)^2) < 150 then
  169.                 CastSpell(jumpSlot, object)
  170.                 jumpReady = false
  171.             end
  172.    end
  173.     end
  174. end
  175.  
  176. --[[====================================Collision Detection================================]]--
  177. --[[-------------------------------------Collision Check-----------------------------------]]--
  178. function CollisionCheck(object)
  179.    return object and object.valid and object.name:find("Minion_") and object.team ~= myHero.team and object.dead == false
  180. end
  181.  
  182. --[[------------------------------------Collision Function---------------------------------]]--
  183. function minionCollision(predic, width, enemyMinions, range)
  184.     for _, minionObjectE in pairs(enemyMinions) do
  185.         if minionObjectE ~= nil and string.find(minionObjectE.name,"Minion_") == 1 and minionObjectE.team ~= player.team and minionObjectE.dead == false and minionObjectE.valid then
  186.             if predic ~= nil and player:GetDistance(minionObjectE) < range then
  187.          ex = player.x
  188.          ez = player.z
  189.          tx = predic.x
  190.          tz = predic.z
  191.          dx = ex - tx
  192.          dz = ez - tz
  193.          if dx ~= 0 then
  194.          m = dz/dx
  195.          c = ez - m*ex
  196.          end
  197.          mx = minionObjectE.x
  198.          mz = minionObjectE.z
  199.          distanc = (math.abs(mz - m*mx - c))/(math.sqrt(m*m+1))
  200.          if distanc < width and math.sqrt((tx - ex)*(tx - ex) + (tz - ez)*(tz - ez)) > math.sqrt((tx - mx)*(tx - mx) + (tz - mz)*(tz - mz)) then
  201.          return true
  202.         end
  203.             end
  204.         end
  205.     end
  206. return false
  207. end
  208.  
  209. --[[======================================Tick/Combo======================================]]--
  210. function OnTick()
  211.     ts:update()
  212.     if ts.target ~= nil and not myHero.dead then
  213.         travelDuration = (delay + (GetDistance(myHero, ts.target)/qspeed))
  214.     end
  215.    
  216.     ts:SetPrediction(travelDuration)
  217.    
  218.     if ts.target ~= nil and myHero:CanUseSpell(_Q) == READY then predic = ts.nextPosition end
  219.  
  220.     BWCSlot = GetInventorySlotItem(BWCid)
  221.     BRKSlot = GetInventorySlotItem(BRKid)
  222.     TMTSlot = GetInventorySlotItem(TMTid)
  223.     RAHSlot = GetInventorySlotItem(RAHid)
  224.     RNDSlot = GetInventorySlotItem(RNDid)
  225.     QREADY = (myHero:CanUseSpell(_Q) == READY)
  226.     WREADY = (myHero:CanUseSpell(_W) == READY)
  227.     EREADY = (myHero:CanUseSpell(_E) == READY)
  228.     RREADY = (myHero:CanUseSpell(_R) == READY)
  229.     IREADY = (ignite ~= nil and myHero:CanUseSpell(ignite) == READY)
  230.  
  231.     if tick == nil or GetTickCount()-tick>=200 then
  232.         tick = GetTickCount()
  233.         SCDmgCalculation()
  234.     end
  235.    
  236.     if swing == 1 and os.clock() > lastBasicAttack + 0.5 then
  237.         swing = 0
  238.     end
  239.    
  240.     --[[Combo Functions]]--
  241.     for i, minion in pairs(enemyMinions) do
  242.         if (minion ~= nil and not minion.valid) or (minion ~= nil and minion.valid and minion.dead) then
  243.             table.remove(enemyMinions, i)
  244.             i = i-1
  245.         end
  246.     end
  247. --[[-------------------------------------Ultimate Close------------------------------------]]--
  248.     if LeeSinConfig.rClose then
  249.         findClosestEnemy()
  250.         if RREADY and findClosestEnemy() ~= nil and GetDistance(findClosestEnemy()) <= (ultirange+50) then
  251.             CastSpell(_R, findClosestEnemy())
  252.         end
  253.     end
  254. --[[-------------------------------------Auto Ultimate-------------------------------------]]--
  255.     local players = heroManager.iCount
  256.         for i = 1, players, 1 do
  257.             local target = heroManager:getHero(i)
  258.             local rDmg = getDmg("R",target,myHero,1)
  259.             if target ~= nil and target.visible == true and target.team ~= player.team and target.dead == false and target.health < rDmg and player:GetDistance(target) < ultirange and player:CanUseSpell(_R) == READY and LeeSinConfig.autoult then
  260.                 CastSpell(_R, target)
  261.             end
  262.         end
  263.  
  264. --[[----------------------------------------Q Dodge----------------------------------------]]--
  265. --[[Remove Dead]]--
  266.     for i, minion in pairs(dodgeMinions) do
  267.         if (minion ~= nil and not minion.valid) or (minion ~= nil and minion.valid and minion.dead) then
  268.             table.remove(dodgeMinions, i)
  269.             dodgeMinion = nil
  270.         end
  271.     end
  272.  
  273.     if LeeSinConfig.qDodge and ts.target ~= nil then
  274.         --[[Target Set]]--
  275.         for i=1, heroManager.iCount do
  276.             local allytarget = heroManager:GetHero(i)
  277.             if allytarget.team == myHero.team and not allytarget.dead and GetDistance(allytarget, targetPosition) < 750 and allytarget.charName ~= myHero.charName then
  278.                 dodgeHero = allytarget
  279.             end
  280.         end
  281.  
  282.         for i,dMinion in pairs(dodgeMinions) do
  283.             if dMinion ~= nil and dMinion.team == myHero.team and GetDistance(dMinion, ts.target) < 750 and dMinion ~= dead then
  284.                 dodgeMinion = dMinion
  285.             end
  286.         end
  287.        
  288. --[[Ball Handling]]--  
  289.         if predic ~= nil and QREADY and GetDistance(ts.nextPosition) <= qrange and myHero:GetSpellData(_Q).name == "BlindMonkQOne" then
  290.             if LeeSinConfig.checkCollision and not minionCollision(ts.nextPosition, qwidth, enemyMinions, qrange) then
  291.                 CastSpell(_Q, predic.x, predic.z)
  292.                 else if not LeeSinConfig.checkCollision then
  293.                     CastSpell(_Q, predic.x, predic.z)
  294.                 end
  295.             end
  296.         end
  297.         if (dodgeMinion ~= nil and dodgeMinion ~= dead) or (dodgeHero ~= nil and dodgeHero ~= dead) then
  298.             if GetDistance(ts.target) <= 1100 and myHero:GetSpellData(_Q).name == "blindmonkqtwo" and WREADY then
  299.             CastSpell(_Q)
  300.             qCast = true
  301.             qDelay = os.clock()
  302.             wDelay = ((GetDistance(ts.nextPosition)/1500) * qMultiplier)
  303.             end
  304.         end
  305.  
  306.         --[[Cast Shield]]--
  307.         if qCast == true and not QREADY and dodgeMinion ~= nil then
  308.             if os.clock() - qDelay > wDelay then
  309.                 CastSpell(_W, dodgeMinion)
  310.                 qCast = false
  311.             end
  312.         elseif qCast == true and not QREADY and dodgeHero ~= nil then
  313.             if os.clock() - qDelay > wDelay then
  314.                 CastSpell(_W, dodgeHero)
  315.                 qCast = false
  316.             end
  317.         end
  318.     end
  319.  
  320. --[[-----------------------------------------Ball------------------------------------------]]--
  321. if LeeSinConfig.scriptActive and ts.target ~= nil then
  322.     if predic ~= nil and QREADY and GetDistance(ts.nextPosition) <= qrange and myHero:GetSpellData(_Q).name == "BlindMonkQOne" then
  323.         if LeeSinConfig.checkCollision and not minionCollision(ts.nextPosition, qwidth, enemyMinions, qrange) then
  324.             CastSpell(_Q, predic.x, predic.z)
  325.             rCast = true
  326.             else
  327.             if not LeeSinConfig.checkCollision then
  328.                 CastSpell(_Q, predic.x, predic.z)
  329.                 rCast = true
  330.             end
  331.         end
  332.     end
  333.     if myHero:GetDistance(ts.target) <= 1100 and LeeSinConfig.useUlti == false and QREADY then
  334.         rCast = false
  335.         CastSpell(_Q)
  336.         elseif LeeSinConfig.useUlti and rCast == false and QREADY then
  337.             rCast = false
  338.             CastSpell(_Q)
  339.     end
  340.    
  341. --[[--------------------------------------Cripple------------------------------------------]]--
  342.     if swing == 0 and GetDistance(ts.target) <= 425 then
  343.         myHero:Attack(ts.target)
  344.             if EREADY and GetDistance(ts.target) <= 250 and myHero:GetSpellData(_E).name == "blindmonketwo" then
  345.                 CastSpell(_E)
  346.             end
  347.         elseif swing == 1 then
  348.             if EREADY and GetDistance(ts.target) <= 275 and myHero:GetSpellData(_E).name == "BlindMonkEOne" then
  349.                 CastSpell(_E)
  350.             end
  351.     end
  352.     if EREADY and GetDistance(ts.target) >= 425 and myHero:GetSpellData(_E).name == "blindmonketwo" then
  353.         CastSpell(_E)
  354.     end
  355.  
  356. --[[--------------------------------------Ultimate-----------------------------------------]]--
  357.     if RREADY and GetDistance(ts.target) <= ultirange and LeeSinConfig.useUlti and QREADY and rCast == true then
  358.         CastSpell(_R, ts.target)
  359.         rCast = false
  360.         if myHero:GetDistance(ts.target) > 600 and LeeSinConfig.useUlti and not RREADY then
  361.             CastSpell(_Q)
  362.             rCast = false
  363.         end
  364.     else rCast = false
  365.     end
  366.  
  367. --[[---------------------------------------Items-------------------------------------------]]--
  368.     if BRKSlot ~= nil and CanUseSpell(BRKSlot) == READY then CastSpell(BRKSlot, ts.target) end
  369.     if BWCSlot ~= nil and CanUseSpell(BWCSlot) == READY then CastSpell(BWCSlot, ts.target) end
  370.     if TMTSlot ~= nil and CanUseSpell(TMTSlot) == READY and GetDistance(ts.target) <= 275 then CastSpell(TMTSlot) end
  371.     if RAHSlot ~= nil and CanUseSpell(RAHSlot) == READY and GetDistance(ts.target) <= 275 then CastSpell(RAHSlot) end
  372.     if RNDSlot ~= nil and CanUseSpell(RNDSlot) == READY and GetDistance(ts.target) <= 500 then CastSpell(RNDSlot) end
  373. end
  374.  
  375. --[[---------------------------------------Ignite------------------------------------------]]--
  376. if LeeSinConfig.autoignite then    
  377.     if IREADY then
  378.         local ignitedmg = 0    
  379.         for i = 1, heroManager.iCount, 1 do
  380.             local enemyhero = heroManager:getHero(i)
  381.             if ValidTarget(enemyhero,600) then
  382.                 ignitedmg = 50 + 20 * myHero.level
  383.                 if enemyhero.health <= ignitedmg then
  384.                     CastSpell(ignite, enemyhero)
  385.                 end
  386.             end
  387.         end
  388.     end
  389. end
  390.  
  391. --[[Ward Jump Functions]]--
  392. --[[--------------------------------------Ward Jump----------------------------------------]]--
  393. if jumpReady == true and GetTickCount() - lastJump > jumpDelay then
  394.     jumpNowAlready()
  395. end
  396.  
  397. if LeeSinConfig.wardjump then
  398.     local x = mousePos.x
  399.     local z = mousePos.z
  400.     local dx = x - player.x
  401.     local dz = z - player.z
  402.     local rad1 = math.atan2(dz, dx)
  403.    
  404.     SWardSlot = GetInventorySlotItem(SWard)
  405.     VWardSlot = GetInventorySlotItem(VWard)
  406.     SStoneSlot = GetInventorySlotItem(SStone)
  407.     RSStoneSlot = GetInventorySlotItem(RSStone)
  408.     WrigglesSlot = GetInventorySlotItem(Wriggles)
  409.  
  410.     if RSStoneSlot ~= nil and CanUseSpell(RSStoneSlot) == READY then
  411.         wardSlot = RSStoneSlot else
  412.         if SStoneSlot ~= nil and CanUseSpell(SStoneSlot) == READY then
  413.             wardSlot = SStoneSlot else
  414.             if SWardSlot ~= nil then
  415.                 wardSlot = SWardSlot else
  416.                 if VWardSlot ~= nil then
  417.                     wardSlot = VWardSlot else  
  418.                     if WrigglesSlot ~= nil then
  419.                         wardSlot = WrigglesSlot else
  420.                             wardSlot = nil
  421.                     end
  422.                 end
  423.             end
  424.         end
  425.     end
  426.  
  427.     if wardSlot ~= nil and jumpSlot ~= nil then
  428.         local dx1 = flashRange*math.cos(rad1)
  429.         local dz1 = flashRange*math.sin(rad1)
  430.         local x1 = x - dx1
  431.         local z1 = z - dz1
  432.         if player:CanUseSpell(jumpSlot) == READY and GetTickCount() - lastJump > 2000 and math.sqrt(dx*dx + dz*dz) <= 600 then
  433.             CastSpell( wardSlot, x, z )
  434.             jumpReady = true
  435.             lastJump = GetTickCount()
  436.             elseif player:CanUseSpell(jumpSlot) == READY then
  437.                 player:MoveTo(x1, z1)
  438.                 else myHero:StopPosition()
  439.         end
  440.     end
  441. end
  442. end    
  443. --[[=====================================Damage Calulation=================================]]--
  444. --[[
  445. Explanation of the marks:
  446.     -Green circle: Marks the current target to which you will do the combo
  447.     -Blue circle: Killed with a combo, if all the skills were available
  448.     -Red circle: Killed using items + 2 Hits + Q + E + R + Ignite(if available)
  449.     -2 Red circles: Killed using items + 1 Hits + Q + Ignite(if available)
  450.     -3 Red circles: Killed using R
  451. ]]
  452.  
  453. function SCDmgCalculation()
  454.     local enemy = heroManager:GetHero(calculationenemy)
  455.     if ValidTarget(enemy) then
  456.         local ignitedamage, bwcdamage, brkdamage = 0, 0, 0
  457.         local qdamage = getDmg("Q",enemy,myHero)
  458.         local edamage = getDmg("E",enemy,myHero)
  459.         local rdamage = getDmg("R",enemy,myHero,1)
  460.         local hitdamage = getDmg("AD",enemy,myHero)
  461.         local ignitedamage = (ignite and getDmg("IGNITE",enemy,myHero) or 0)
  462.         local bwcdamage = (BWCSlot and getDmg("BWC",enemy,myHero) or 0)
  463.         local brkdamage = (BRKSlot and getDmg("RUINEDKING",enemy,myHero) or 0)
  464.         local combo1 = hitdamage*2 + qdamage + edamage + rdamage
  465.         local combo2 = hitdamage*2
  466.         local combo3 = hitdamage*1
  467.         local combo4 = 0
  468.     if QREADY then
  469.         combo2 = combo2 + qdamage
  470.         combo3 = combo3 + qdamage
  471.         end
  472.     if EREADY then
  473.         combo2 = combo2 + edamage
  474.     end
  475.     if RREADY then
  476.         combo2 = combo2 + rdamage
  477.         combo4 = combo4 + rdamage
  478.     end
  479.     if BWCREADY then
  480.         combo1 = combo1 + bwcdamage
  481.         combo2 = combo2 + bwcdamage
  482.         combo3 = combo3 + bwcdamage
  483.     end
  484.     if BRKREADY then
  485.         combo1 = combo1 + brkdamage
  486.         combo2 = combo2 + brkdamage
  487.         combo3 = combo3 + brkdamage
  488.     end
  489.     if IREADY then
  490.         combo1 = combo1 + ignitedamage
  491.         combo2 = combo2 + ignitedamage
  492.         combo3 = combo3 + ignitedamage
  493.     end
  494.     if combo4 >= enemy.health then killable[calculationenemy] = 4
  495.         elseif combo3 >= enemy.health then killable[calculationenemy] = 3
  496.         elseif combo2 >= enemy.health then killable[calculationenemy] = 2
  497.         elseif combo1 >= enemy.health then killable[calculationenemy] = 1
  498.         else killable[calculationenemy] = 0 end
  499.     end
  500.         if calculationenemy == 1 then calculationenemy = heroManager.iCount
  501.             else calculationenemy = calculationenemy-1
  502.         end
  503. end
  504.  
  505. --[[=====================================On Create=========================================]]--
  506. function OnCreateObj(object)
  507.   if objectIsValid(object) then table.insert(myObjectsTable, object) end
  508.     if object ~= nil and object.dead ~= true and object.name:find("Minion_") then
  509.         table.insert(dodgeMinions, object)
  510.     end
  511.     if CollisionCheck(object) then table.insert(enemyMinions, object) end
  512. end
  513.  
  514. --[[======================================Circles==========================================]]--
  515. function OnDraw()
  516.     if LeeSinConfig.wardjump and not myHero.dead then
  517.         DrawCircle(myHero.x, myHero.y, myHero.z, wrange, 0x0000FF)
  518.     end
  519.     if LeeSinConfig.drawcirclesSelf and not myHero.dead then
  520.         DrawCircle(myHero.x, myHero.y, myHero.z, qrange, 0xCCFF33)
  521.         DrawCircle(myHero.x, myHero.y, myHero.z, ultirange, 0xFF0000)
  522.         DrawCircle(myHero.x, myHero.y, myHero.z, wrange, 0x0000FF)
  523.     end
  524.     if ts.target ~= nil and LeeSinConfig.drawcirclesEnemy then
  525.         for e=0, 10 do
  526.             DrawCircle(ts.target.x, ts.target.y, ts.target.z, 40 + e*1.5, 0x00FF00)
  527.         end
  528.     end
  529.     for i=1, heroManager.iCount do
  530.         local enemydraw = heroManager:GetHero(i)
  531.         if ValidTarget(enemydraw) then
  532.             if LeeSinConfig.drawcirclesEnemy then
  533.                 if killable[i] == 1 then
  534.                     for e=0, 15 do
  535.                         DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + e*1.5, 0x0000FF)
  536.                     end
  537.                     elseif killable[i] == 2 then
  538.                     for e=0, 10 do
  539.                         DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + e*1.5, 0xFF0000)
  540.                     end
  541.                     elseif killable[i] == 3 then
  542.                     for e=0, 10 do
  543.                         DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + e*1.5, 0xFF0000)
  544.                         DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 110 + e*1.5, 0xFF0000)
  545.                     end
  546.                     elseif killable[i] == 4 then
  547.                     for e=0, 10 do
  548.                         DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + e*1.5, 0xFF0000)
  549.                         DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 110 + e*1.5, 0xFF0000)
  550.                         DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 140 + e*1.5, 0xFF0000)
  551.                     end
  552.                 end
  553.             end
  554.             if LeeSinConfig.drawtext and waittxt[i] == 1 and killable[i] ~= 0 then
  555.                 PrintFloatText(enemydraw,0,floattext[killable[i]])
  556.             end
  557.         end
  558.         if waittxt[i] == 1 then waittxt[i] = 30
  559.             else waittxt[i] = waittxt[i]-1
  560.         end
  561.     end
  562. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement