Advertisement
koolkaracter

autokoolv25PreYayo

Jul 29th, 2014
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 22.14 KB | None | 0 0
  1. --[[      
  2.  ____  __.            .__   __                               __                 /\                
  3. |    |/ _|____   ____ |  | |  | ______ ____________    _____/  |_  ___________  )/______          
  4. |      < /  _ \ /  _ \|  | |  |/ |__  \\_  __ \__  \ _/ ___\   __\/ __ \_  __ \  /  ___/          
  5. |    |  (  <_> |  <_> )  |_|    < / __ \|  | \// __ \\  \___|  | \  ___/|  | \/  \___ \            
  6. |____|__ \____/ \____/|____/__|_ (____  /__|  (____  /\___  >__|  \___  >__|    /____  >          
  7.         \/                      \/    \/           \/     \/          \/             \/            
  8.    _____          __            ____  __.            .__      _________            .__        __  
  9.   /  _  \  __ ___/  |_  ____   |    |/ _|____   ____ |  |    /   _____/ ___________|__|______/  |_
  10.  /  /_\  \|  |  \   __\/  _ \  |      < /  _ \ /  _ \|  |    \_____  \_/ ___\_  __ \  \____ \   __\
  11. /    |    \  |  /|  | (  <_> ) |    |  (  <_> |  <_> )  |__  /        \  \___|  | \/  |  |_> >  |  
  12. \____|__  /____/ |__|  \____/  |____|__ \____/ \____/|____/ /_______  /\___  >__|  |__|   __/|__|  
  13.         \/                             \/                           \/     \/         |__|    
  14.  
  15. Author = Koolkaracter
  16. Version = '2.5'
  17.  
  18. This script is version 2.0+.   This script does auto items, auto pots, and auto summoner spells.  
  19. So basically it makes you Auto-Kool!
  20.  
  21. Supports the following Items:
  22. ---Bilgewater Cutlass
  23. ---Blackfire Torch
  24. ---Blackfire Torch
  25. ---Blade of the Ruined King
  26. ---Deathfire Grasp
  27. ---Entropy
  28. ---Frost Queens Claim
  29. ---Guardians Horn
  30. ---Hextech Gunblade
  31. ---Odyns Veil
  32. ---Randuins Omen
  33. ---Ravenous Hydra
  34. ---Sword of the Divine
  35. ---Tiamat
  36. ---Youmuus Ghostblade
  37. ---Locket of Solari
  38. ---Face of the Mountain
  39. ---Zhonyas/Witchcap
  40. ---Seraphs Embrace
  41.  
  42. Supports the following Potions:
  43. ---Health Potion
  44. ---Mana Potions
  45. ---Chrystalline Flask
  46. ---Elixir of Fortitude
  47. ---Biscuit
  48.  
  49. Supports the following Summoner Spells:
  50. ---Ignite (also takes into account targets health regen... not including regen from items)
  51. ---Heal
  52. ---Barrier
  53. ---Exhaust (the % option is what % of your health to cast)
  54. ---Clarity
  55.  
  56. Credit goes out to Val, LUA, Yonderboi, and Fiqt for some help. I also used a bun-cha parts from CConn81's Script, I changed a bit but still I contribute a large portion of the pots/summoners to him! Also a few others that I don't remember for a little help with the ally portion of the code.
  57.  
  58. Instructions -
  59.  
  60. Press Shift and go through menu to select only certain items, pots, summoners to use and what percentages to use them at.
  61. Press Delete to toggle on or off AutoItems instead of having to go through menu(can be changed). This can be usefull for champs like teemo that dont want to use items all the time.
  62.  
  63. ***NOTE*** You might have to go into the menu and ensure all the boxes are selected the first time you use it.
  64.  
  65. Code:
  66. Change Log:
  67. v2.5 - Added Support for guardians Horn (treats it same manor as Youmuus Ghostblade)
  68.  
  69. v2.4 - Fixed potions that would have multiple go off, if you manually popped a pot first.
  70.  
  71. v2.3 - Added option to use heal for allies (check the box under summoners menu).  Also added function to highlight target to let you know who it is going to use items on. Now will not use items, potions, or summoners while you are backing to the fountain.  (previously would use heal pots even if you were backing)
  72.  
  73. v2.2 - Added % health display (will help you know when you get close to your summoners/pots/items using)
  74.  
  75. v2.1.3 - Fixed a few typos, and repaired ignite, biscuits and elixirs.
  76.  
  77. v2.1.2 - Cleaned up menus a little more.
  78.  
  79. v2.1 - Cleaned up menus and added submenus (requires uiconfig V12 or greater, this is included in Yonderboi's installer)
  80.  
  81. v2.0 - Added Support for pots and Summoner Spells
  82.  
  83. v1.5 - Added support for Seraph's Embrace w/ checkbox and slider bar to be used as the percent of health to use the item at.
  84.  
  85. V1.4 - Added support for Zhonya's Hourglass and Wooglet's Witchcap and slider bar to be used as the percent of health to use the item at.
  86. - moved the Face of Mountain and Locket of Iron Solari code to the right location so when you toggle the script off, those turn off as well.
  87.  
  88. v1.3 - Added the Face of the Mountain w/ checkbox and slider bar to be used as the percent of health to use the item at.
  89.  
  90. v1.2 -Added the Locket of Iron Solari w/ checkbox and slider bar to be used as the Percent of health to use the item at.
  91.  
  92. V1.1 - Added checkboxes to turn off individual items.
  93.  
  94. Known issues:
  95. - (Fixed, but requires a target in range now) Would use the Locket of Iron Solari and Face of the Mountain even if the ally that is below the % health is no longer taking damage. (for example, if the target begins to run and you walk up near the target and ally).  Requires an enemy target within a range of 900 in order to use this, to help prevent accidental usage.
  96.  
  97. ]]--
  98.  
  99. require "Utils"
  100. require 'vals_lib'
  101. require 'champdb'
  102. require 'IsInvulnerable'
  103.  
  104.  
  105. --Variables for Items
  106. local target
  107. local AttackRange = 10
  108. --End of Variables for Items
  109.  
  110. --Variables for Red Elixer
  111. local hUsedAt = 0
  112. local mUsedAt = 0
  113. local eUsedAt = 0
  114. local bUsedAt = 0
  115. local fUsedAt = 0
  116. local timer = os.clock()
  117. local bluePill = nil
  118. --End of Variables for Red Elixir
  119.  
  120. --Extra variables for Summoner Spells
  121. local targetignite
  122. --End of Extra variables for Summoner Spells
  123.  
  124.  
  125. --Config Menu
  126. local uiconfig = require 'uiconfig'
  127. CfgKoolSettings, menu = uiconfig.add_menu('1. Auto Kool', 300)
  128.  
  129. local submenuItems = menu.submenu('1. Kool Items', 300)
  130. submenuItems.keytoggle('Kool_Items_ON', 'Master Auto Items', 46, true)--Delete to toggle
  131. submenuItems.checkbox('BC', '---Bilgewater Cutlass---', true)
  132. submenuItems.checkbox('BFT', '---Blackfire Torch---', true)
  133. submenuItems.checkbox('BFT', '---Blackfire Torch---', true)
  134. submenuItems.checkbox('BORK', '---Blade of the Ruined King---', true)
  135. submenuItems.checkbox('DFG', '---Deathfire Grasp---', true)
  136. submenuItems.checkbox('En', '---Entropy---', true)
  137. submenuItems.checkbox('FQC', '---Frost Queens Claim---', true)
  138. submenuItems.checkbox('GH', '---Guardians Horn---', true)
  139. submenuItems.checkbox('HG', '---Hextech Gunblade---', true)
  140. submenuItems.checkbox('OV', '---Odyns Veil---', true)
  141. submenuItems.checkbox('RO', '---Randuins Omen---', true)
  142. submenuItems.checkbox('RH', '---Ravenous Hydra---', true)
  143. submenuItems.checkbox('SOD', '---Sword of the Divine---', true)
  144. submenuItems.checkbox('T', '---Tiamat---', true)
  145. submenuItems.checkbox('YG', '---Youmuus Ghostblade---', true)
  146. submenuItems.checkbox('Locket', 'Auto Use Locket of Solari', true)
  147. submenuItems.slider('LocketValue', 'Use Locket at X% health', 0, 100, 20)
  148. submenuItems.checkbox('FOM', 'Auto Use Face of the Mountain', true)
  149. submenuItems.slider('FOMValue', 'Use Face of the Mountain at X% health', 0, 100, 20)
  150. submenuItems.checkbox('ZH', 'Auto Use Zhonyas/Witchcap', true)
  151. submenuItems.slider('ZHValue', 'Use Zhonyas/Witchcap at X% health', 0, 100, 20)
  152. submenuItems.checkbox('SE', 'Auto Use Seraphs Embrace', true)
  153. submenuItems.slider('SEValue', 'Use Seraphs Embrace at X% health', 0, 100, 20)
  154. submenuItems.permashow("Kool_Items_ON")
  155.  
  156.  
  157. local submenuPotions = menu.submenu('2. Kool Potions', 300)
  158. submenuPotions.checkbutton('Kool_Potions_ON', 'Master Auto Potions', true)
  159. submenuPotions.checkbox('Health_Potion_ON', 'Health Potions', true)
  160. submenuPotions.slider('Health_Potion_Value', 'Health Potion Value', 0, 100, 75)
  161. submenuPotions.checkbox('Biscuit_ON', 'Biscuit', true)
  162. submenuPotions.slider('Biscuit_Value', 'Biscuit Value', 0, 100, 60)
  163. submenuPotions.checkbox('Chrystalline_Flask_ON', 'Chrystalline Flask', true)
  164. submenuPotions.slider('Chrystalline_Flask_Value', 'Chrystalline Flask Value', 0, 100, 75)
  165. submenuPotions.checkbox('Elixir_of_Fortitude_ON', 'Elixir of Fortitude', true)
  166. submenuPotions.slider('Elixir_of_Fortitude_Value', 'Elixir of Fortitude Value', 0, 100, 30)
  167. submenuPotions.checkbox('Mana_Potion_ON', 'Mana Potions', true)
  168. submenuPotions.slider('Mana_Potion_Value', 'Mana Potion Value', 0, 100, 75)
  169.  
  170.  
  171. local submenuSummoners = menu.submenu('3. Kool Summoners', 300)
  172. submenuSummoners.checkbutton('Kool_Summoner_Spells_ON', 'Master Auto Summoner Spells', true)
  173. submenuSummoners.checkbox('Auto_Ignite_ON', 'Ignite', true)
  174. submenuSummoners.checkbox('Auto_Exhaust_ON', 'Exhaust', true)
  175. submenuSummoners.slider('AutoExhaustValue', 'Auto Exhaust Value', 0, 100, 30)
  176. submenuSummoners.checkbox('Auto_Barrier_ON', 'Barrier', true)
  177. submenuSummoners.slider('AutoBarrierValue', 'Auto Barrier Value', 0, 100, 15)
  178. submenuSummoners.checkbox('Auto_Clarity_ON', 'Clarity', true)
  179. submenuSummoners.slider('AutoClarityValue', 'Auto Clarity Value', 0, 100, 40)
  180. submenuSummoners.checkbox('Auto_Heal_ON', 'Heal', true)
  181. submenuSummoners.checkbox('Auto_HealAlly_ON', 'Use Heal To Protect Allies', true)
  182. submenuSummoners.slider('AutoHealValue', 'Auto Heal Value', 0, 100, 15)
  183.  
  184. menu.checkbutton('ShowPHP', 'Show % of HP', true)
  185. menu.checkbutton('CircleTarget', 'Highlight Target', true)
  186. --End of Config Menu
  187.  
  188.  
  189.  
  190. function MainRun()
  191.         if IsLolActive() and IsChatOpen() == 0 then
  192.                 if IsBuffed(myHero, 'TeleportHome') ~= true then
  193.                         if CfgKoolSettings['1. Kool Items'].Kool_Items_ON then AutoItems() end
  194.                         if CfgKoolSettings['2. Kool Potions'].Kool_Potions_ON then AutoPots() end
  195.                         if CfgKoolSettings['3. Kool Summoners'].Kool_Summoner_Spells_ON then AutoSummoners() end
  196.                         if CfgKoolSettings.ShowPHP then ShowPercentHP() end
  197.                         if CfgKoolSettings.CircleTarget then CircleTarg() end
  198.                 else
  199.                         if CfgKoolSettings.ShowPHP then ShowPercentHP() end
  200.                         if CfgKoolSettings.CircleTarget then CircleTarg() end  
  201.                 end
  202.         end
  203.  
  204. end
  205.  
  206. --Use Items Functions
  207. function AutoItems()    
  208.     target = GetWeakEnemy('PHYS', 900)
  209.        
  210.     if myHero.SpellTime1 > 1.0 then -- Checks if items are on cooldown
  211.     RDY1 = true
  212.     else RDY1 = false
  213.     end
  214.     if myHero.SpellTime2 > 1.0 then
  215.     RDY2 = true
  216.     else RDY2 = false
  217.     end
  218.     if myHero.SpellTime3 > 1.0 then
  219.     RDY3 = true
  220.     else RDY3 = false
  221.     end
  222.     if myHero.SpellTime4 > 1.0 then
  223.     RDY4 = true
  224.     else RDY4 = false
  225.     end
  226.     if myHero.SpellTime5 > 1.0 then
  227.     RDY5 = true
  228.     else RDY5 = false
  229.     end
  230.     if myHero.SpellTime6 > 1.0 then
  231.     RDY6 = true
  232.     else RDY6 = false
  233.     end
  234.     if myHero.SpellTime7 > 1.0 then
  235.     RDY7 = true
  236.     else RDY7 = false
  237.     end
  238.  
  239.         useItems()
  240.        
  241. end
  242.  
  243. function useItems()
  244.         AttackRange = myHero.range+(GetDistance(GetMinBBox(myHero)))
  245.     if target ~= nil and (RDY1 or RDY2 or RDY3 or RDY4 or RDY5 or RDY6 or RDY7) then
  246.         if CfgKoolSettings['1. Kool Items'].BC and (GetDistance(myHero, target) < 400) then -- IR
  247.             UseItemOnTarget(3144, target) -- Bilgewater Cutlass
  248.         end        
  249.         if CfgKoolSettings['1. Kool Items'].HG and (GetDistance(myHero, target) < 700) then -- IR
  250.             UseItemOnTarget(3146, target) -- Hextech Gunblade
  251.         end        
  252.         if CfgKoolSettings['1. Kool Items'].BORK and (GetDistance(myHero, target) < 500) then -- IR
  253.             UseItemOnTarget(3153, target) -- Blade of the Ruined King
  254.         end        
  255.         if CfgKoolSettings['1. Kool Items'].DFG and (GetDistance(myHero, target) < 750) then -- IR
  256.             UseItemOnTarget(3128, target) -- Deathfire Grasp
  257.         end        
  258.         if CfgKoolSettings['1. Kool Items'].FQC and (GetDistance(myHero, target) < 850) then -- IR
  259.             UseItemOnTarget(3092, target) -- Frost Queen's Claim
  260.         end
  261.         if CfgKoolSettings['1. Kool Items'].BFT and (GetDistance(myHero, target) < 750) then -- IR
  262.             UseItemOnTarget(3188, target) -- Blackfire Torch
  263.         end    
  264.         if CfgKoolSettings['1. Kool Items'].OV and (GetDistance(myHero, target) < 525) then -- IR
  265.             UseItemOnTarget(3180, target) -- Odyn's Veil
  266.         end        
  267.         if CfgKoolSettings['1. Kool Items'].RO and (GetDistance(myHero, target) < 400) then -- IR
  268.             UseItemOnTarget(3143, target) -- Randuin's Omen
  269.         end        
  270.         if CfgKoolSettings['1. Kool Items'].RH and (GetDistance(myHero, target) < 400) then -- IR
  271.             UseItemOnTarget(3074, target) -- Ravenous Hydra
  272.         end    
  273.         if CfgKoolSettings['1. Kool Items'].T and (GetDistance(myHero, target) < 400) then -- IR
  274.             UseItemOnTarget(3077, target) -- Tiamat
  275.         end    
  276.         if CfgKoolSettings['1. Kool Items'].SOD and (GetDistance(myHero, target) < AttackRange+10) then -- AR
  277.             UseItemOnTarget(3131, target) -- Sword of the Divine
  278.         end        
  279.         if CfgKoolSettings['1. Kool Items'].YG and (GetDistance(myHero, target) < AttackRange+10) then -- AR
  280.             UseItemOnTarget(3142, target) -- Youmuu's Ghostblade
  281.         end
  282.         if CfgKoolSettings['1. Kool Items'].En and (GetDistance(myHero, target) < AttackRange+10) then -- AR
  283.             UseItemOnTarget(3184, target) -- Entropy
  284.         end
  285.                 if CfgKoolSettings['1. Kool Items'].GH and (GetDistance(myHero, target) < AttackRange+10) then -- AR
  286.             UseItemOnTarget(3142, target) -- Guardians Horn
  287.         end
  288.  
  289.     end
  290.        
  291.         for i = 1, objManager:GetMaxHeroes() do
  292.                 local ally = objManager:GetHero(i)
  293.                 if (ally ~= nil and ally.team == myHero.team and ally.visible == 1 and GetDistance(myHero, ally) < 600) then
  294.                         if target ~= nil and CfgKoolSettings['1. Kool Items'].Locket and ally.health <= (ally.maxHealth*(CfgKoolSettings['1. Kool Items'].LocketValue / 100)) then --If health is below the slider % value
  295.                         UseItemOnTarget(3190,ally) -- Locket of Iron Solari
  296.                         end
  297.                         if target ~= nil and CfgKoolSettings['1. Kool Items'].FOM and ally.health <= (ally.maxHealth*(CfgKoolSettings['1. Kool Items'].FOMValue / 100)) then --If health is below the slider % value
  298.                         UseItemOnTarget(3401,ally) -- Face of the Mountain
  299.                         end
  300.                 end
  301.         end
  302.        
  303.         if CfgKoolSettings['1. Kool Items'].ZH and myHero.health <= (myHero.maxHealth*(CfgKoolSettings['1. Kool Items'].ZHValue / 100)) then --If health is below the slider % value
  304.                         UseItemOnTarget(3157,myHero) -- Zhonya's Hourglass
  305.                         UseItemOnTarget(3090,myHero) -- Wooglet's Witchap
  306.         end
  307.                
  308.                 if CfgKoolSettings['1. Kool Items'].SE and myHero.health <= (myHero.maxHealth*(CfgKoolSettings['1. Kool Items'].SEValue / 100)) then --If health is below the slider % value
  309.                         UseItemOnTarget(3040,myHero) -- Seraph's Embrace
  310.         end
  311. end
  312.  
  313.  
  314. function useItem(item)
  315.     if GetInventoryItem(1) == item then
  316.         CastSpellTarget("1", target)
  317.     elseif GetInventoryItem(2) == item then
  318.         CastSpellTarget("2", target)
  319.     elseif GetInventoryItem(3) == item then
  320.         CastSpellTarget("3", target)
  321.     elseif GetInventoryItem(4) == item then
  322.         CastSpellTarget("4", target)
  323.     elseif GetInventoryItem(5) == item then
  324.         CastSpellTarget("5", target)
  325.     elseif GetInventoryItem(6) == item then
  326.         CastSpellTarget("6", target)
  327.     elseif GetInventoryItem(7) == item then
  328.         CastSpellTarget("7", target)
  329.     end
  330. end
  331.  
  332. --End of Use Items functions
  333.  
  334.  
  335.  
  336. --Use Potions functions
  337. function AutoPots()
  338.         if IsBuffed(myHero, "FountainHeal") ~= true then
  339.                 if myHero.health < myHero.maxHealth * (CfgKoolSettings['2. Kool Potions'].Health_Potion_Value / 100) and IsBuffed(myHero, 'Global_Item_HealthPotion') ~= true and IsBuffed(myHero, 'GLOBAL_Item_HealthPotion') then
  340.                         usePotion()
  341.                 end
  342.                 if myHero.health < myHero.maxHealth * (CfgKoolSettings['2. Kool Potions'].Biscuit_Value / 100) and IsBuffed(myHero, 'Global_Item_HealthPotion')~= true and IsBuffed(myHero, 'GLOBAL_Item_HealthPotion') ~= true then
  343.                         useBiscuit()
  344.                 end    
  345.                 if myHero.health < myHero.maxHealth * (CfgKoolSettings['2. Kool Potions'].Chrystalline_Flask_Value / 100) and IsBuffed(myHero, 'Global_Item_HealthPotion') ~= true and IsBuffed(myHero, 'GLOBAL_Item_HealthPotion') ~= true then
  346.                         useFlask()
  347.                 end    
  348.                 if myHero.health < myHero.maxHealth * (CfgKoolSettings['2. Kool Potions'].Elixir_of_Fortitude_Value / 100) and IsBuffed(myHero, 'PotionofGiantStrength_itm') ~= true  then
  349.                         useElixir()
  350.                 end
  351.                 if myHero.mana < myHero.maxMana * (CfgKoolSettings['2. Kool Potions'].Mana_Potion_Value / 100) and IsBuffed(myHero, 'Global_Item_ManaPotion') ~= true and IsBuffed(myHero, 'GLOBAL_Item_ManaPotion') ~= true then
  352.                         useManaPot()
  353.                 end
  354.         end
  355. end
  356.  
  357.  
  358. function usePotion()
  359.         GetInventorySlot(2003)
  360.         UseItemOnTarget(2003,myHero)
  361. end
  362.  
  363. function useBiscuit()
  364.         GetInventorySlot(2010)
  365.         UseItemOnTarget(2010,myHero)
  366. end
  367.  
  368. function useFlask()
  369.         GetInventorySlot(2041)
  370.         UseItemOnTarget(2041,myHero)
  371. end
  372.  
  373. function useElixir()
  374.         GetInventorySlot(2037)
  375.         UseItemOnTarget(2037,myHero)
  376. end
  377.  
  378. function useManaPot()
  379.         GetInventorySlot(2004)
  380.         UseItemOnTarget(2004,myHero)
  381. end
  382.  
  383. function GetTick()
  384.         return GetClock()
  385. end
  386.  
  387. --End of Use Potions functions
  388.  
  389. ---Summoner Spell functions
  390. function AutoSummoners()
  391.         if CfgKoolSettings['3. Kool Summoners'].Auto_Ignite_ON then SummonerIgnite() end
  392.         if CfgKoolSettings['3. Kool Summoners'].Auto_Barrier_ON then SummonerBarrier() end
  393.         if CfgKoolSettings['3. Kool Summoners'].Auto_Heal_ON then SummonerHeal() end
  394.         if CfgKoolSettings['3. Kool Summoners'].Auto_Exhaust_ON then SummonerExhaust() end
  395.         if CfgKoolSettings['3. Kool Summoners'].Auto_Clarity_ON then SummonerClarity() end
  396. end
  397.  
  398. function SummonerIgnite()
  399. --[[
  400. This Ignite scripts calculates the targets health regen and
  401. determines if you can kill the target taking in account their
  402. natural health regen. This does not yet take into account health
  403. regen from items... Some day perhaps!
  404. ]]--
  405.         targetIgnite = GetWeakEnemy("TRUE",600)
  406.         if targetIgnite ~= nil then
  407.                 local targetName = champdb[targetIgnite.name]
  408.                 local damage = (myHero.selflevel*20)+50
  409.                 local targetRegenPerSec = (targetName.healthRegenBase + (targetName.healthRegenLevel * targetIgnite.selflevel))
  410.                 local ignDamageAfterRegen = (damage-((targetRegenPerSec*5)/2))  
  411.                 if targetIgnite ~= nil then
  412.                         if myHero.SummonerD == 'SummonerDot' or myHero.SummonerF == 'SummonerDot' then
  413.                                 if targetIgnite.health < ignDamageAfterRegen and GetDistance(myHero, targetIgnite) < 600 then
  414.                                         CastSummonerIgnite(targetIgnite)
  415.                                 end
  416.                         end
  417.                 end
  418.         end    
  419. end
  420.  
  421. function SummonerBarrier()
  422.                 if myHero.SummonerD == 'SummonerBarrier' or myHero.SummonerF == 'SummonerBarrier' then
  423.                         if myHero.health < myHero.maxHealth*(CfgKoolSettings['3. Kool Summoners'].AutoBarrierValue / 100) then
  424.                                 CastSummonerBarrier()
  425.                         end
  426.                 end
  427. end
  428.  
  429. function SummonerHeal()
  430.         if myHero.SummonerD == 'SummonerHeal' or myHero.SummonerF == 'SummonerHeal' then
  431.                 if CfgKoolSettings['3. Kool Summoners'].Auto_HealAlly_ON then --will activate when alley within range is below X%
  432.                         enemyInRange = GetWeakEnemy('PHYS', 900)
  433.                         for h = 1, objManager:GetMaxHeroes() do
  434.                                         local allyH = objManager:GetHero(h)
  435.                                         if (allyH ~= nil and allyH.team == myHero.team and allyH.visible == 1 and GetDistance(myHero, allyH) < 700) then
  436.                                                         if enemyInRange ~= nil and allyH.health <= (allyH.maxHealth*(CfgKoolSettings['3. Kool Summoners'].AutoHealValue / 100)) then --If health is below the slider % value
  437.                                                         CastSummonerHeal()
  438.                                                         end
  439.                                         end
  440.                         end
  441.                 else --HealAlly not on, will just activate on self
  442.                         if myHero.health < myHero.maxHealth*(CfgKoolSettings['3. Kool Summoners'].AutoHealValue / 100) then
  443.                                 CastSummonerHeal()
  444.                         end
  445.                 end
  446.         end
  447. end
  448.  
  449. function SummonerExhaust()
  450.         if target ~= nil then
  451.                 if myHero.SummonerD == 'SummonerExhaust' or myHero.SummonerF == 'SummonerExhaust' then
  452.                         if myHero.health < myHero.maxHealth*(CfgKoolSettings['3. Kool Summoners'].AutoExhaustValue / 100) and GetDistance(myHero, target) < 650 then
  453.                                 if myHero.health < target.health then
  454.                                         CastSummonerExhaust(target)
  455.                                 end
  456.                         end
  457.                 end
  458.         end
  459. end
  460.  
  461. function SummonerClarity()
  462.                 if myHero.SummonerD == 'SummonerMana' or myHero.SummonerF == 'SummonerMana' then
  463.                         if myHero.mana < myHero.maxMana*(CfgKoolSettings['3. Kool Summoners'].AutoClarityValue / 100) then
  464.                                 CastSummonerClarity()
  465.                         end
  466.                 end
  467. end
  468.  
  469. --End of Summoner Spell functions
  470.  
  471. --Show % of HP
  472. function ShowPercentHP()
  473.  
  474.         local myHP = ((myHero.health / myHero.maxHealth) * 100)
  475.         myHP = string.format('%d%%', myHP)
  476.         DrawTextObject(myHP,myHero,Color.White)
  477.        
  478. end
  479. --End of Show % of HP
  480.  
  481. --Circle Target
  482. function CircleTarg()
  483.         if target ~= nil then
  484.                 CustomCircle(100,4,1,target)
  485.         end
  486.  
  487. end
  488.  
  489. SetTimerCallback("MainRun")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement