Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- ____ __. .__ __ __ /\
- | |/ _|____ ____ | | | | ______ ____________ _____/ |_ ___________ )/______
- | < / _ \ / _ \| | | |/ |__ \\_ __ \__ \ _/ ___\ __\/ __ \_ __ \ / ___/
- | | ( <_> | <_> ) |_| < / __ \| | \// __ \\ \___| | \ ___/| | \/ \___ \
- |____|__ \____/ \____/|____/__|_ (____ /__| (____ /\___ >__| \___ >__| /____ >
- \/ \/ \/ \/ \/ \/ \/
- _____ __ ____ __. .__ _________ .__ __
- / _ \ __ ___/ |_ ____ | |/ _|____ ____ | | / _____/ ___________|__|______/ |_
- / /_\ \| | \ __\/ _ \ | < / _ \ / _ \| | \_____ \_/ ___\_ __ \ \____ \ __\
- / | \ | /| | ( <_> ) | | ( <_> | <_> ) |__ / \ \___| | \/ | |_> > |
- \____|__ /____/ |__| \____/ |____|__ \____/ \____/|____/ /_______ /\___ >__| |__| __/|__|
- \/ \/ \/ \/ |__|
- Author = Koolkaracter
- Version = '2.5'
- This script is version 2.0+. This script does auto items, auto pots, and auto summoner spells.
- So basically it makes you Auto-Kool!
- Supports the following Items:
- ---Bilgewater Cutlass
- ---Blackfire Torch
- ---Blackfire Torch
- ---Blade of the Ruined King
- ---Deathfire Grasp
- ---Entropy
- ---Frost Queens Claim
- ---Guardians Horn
- ---Hextech Gunblade
- ---Odyns Veil
- ---Randuins Omen
- ---Ravenous Hydra
- ---Sword of the Divine
- ---Tiamat
- ---Youmuus Ghostblade
- ---Locket of Solari
- ---Face of the Mountain
- ---Zhonyas/Witchcap
- ---Seraphs Embrace
- Supports the following Potions:
- ---Health Potion
- ---Mana Potions
- ---Chrystalline Flask
- ---Elixir of Fortitude
- ---Biscuit
- Supports the following Summoner Spells:
- ---Ignite (also takes into account targets health regen... not including regen from items)
- ---Heal
- ---Barrier
- ---Exhaust (the % option is what % of your health to cast)
- ---Clarity
- 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.
- Instructions -
- Press Shift and go through menu to select only certain items, pots, summoners to use and what percentages to use them at.
- 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.
- ***NOTE*** You might have to go into the menu and ensure all the boxes are selected the first time you use it.
- Code:
- Change Log:
- v2.5 - Added Support for guardians Horn (treats it same manor as Youmuus Ghostblade)
- v2.4 - Fixed potions that would have multiple go off, if you manually popped a pot first.
- 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)
- v2.2 - Added % health display (will help you know when you get close to your summoners/pots/items using)
- v2.1.3 - Fixed a few typos, and repaired ignite, biscuits and elixirs.
- v2.1.2 - Cleaned up menus a little more.
- v2.1 - Cleaned up menus and added submenus (requires uiconfig V12 or greater, this is included in Yonderboi's installer)
- v2.0 - Added Support for pots and Summoner Spells
- 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.
- 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.
- - 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.
- 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.
- 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.
- V1.1 - Added checkboxes to turn off individual items.
- Known issues:
- - (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.
- ]]--
- require "Utils"
- require 'vals_lib'
- require 'champdb'
- require 'IsInvulnerable'
- --Variables for Items
- local target
- local AttackRange = 10
- --End of Variables for Items
- --Variables for Red Elixer
- local hUsedAt = 0
- local mUsedAt = 0
- local eUsedAt = 0
- local bUsedAt = 0
- local fUsedAt = 0
- local timer = os.clock()
- local bluePill = nil
- --End of Variables for Red Elixir
- --Extra variables for Summoner Spells
- local targetignite
- --End of Extra variables for Summoner Spells
- --Config Menu
- local uiconfig = require 'uiconfig'
- CfgKoolSettings, menu = uiconfig.add_menu('1. Auto Kool', 300)
- local submenuItems = menu.submenu('1. Kool Items', 300)
- submenuItems.keytoggle('Kool_Items_ON', 'Master Auto Items', 46, true)--Delete to toggle
- submenuItems.checkbox('BC', '---Bilgewater Cutlass---', true)
- submenuItems.checkbox('BFT', '---Blackfire Torch---', true)
- submenuItems.checkbox('BFT', '---Blackfire Torch---', true)
- submenuItems.checkbox('BORK', '---Blade of the Ruined King---', true)
- submenuItems.checkbox('DFG', '---Deathfire Grasp---', true)
- submenuItems.checkbox('En', '---Entropy---', true)
- submenuItems.checkbox('FQC', '---Frost Queens Claim---', true)
- submenuItems.checkbox('GH', '---Guardians Horn---', true)
- submenuItems.checkbox('HG', '---Hextech Gunblade---', true)
- submenuItems.checkbox('OV', '---Odyns Veil---', true)
- submenuItems.checkbox('RO', '---Randuins Omen---', true)
- submenuItems.checkbox('RH', '---Ravenous Hydra---', true)
- submenuItems.checkbox('SOD', '---Sword of the Divine---', true)
- submenuItems.checkbox('T', '---Tiamat---', true)
- submenuItems.checkbox('YG', '---Youmuus Ghostblade---', true)
- submenuItems.checkbox('Locket', 'Auto Use Locket of Solari', true)
- submenuItems.slider('LocketValue', 'Use Locket at X% health', 0, 100, 20)
- submenuItems.checkbox('FOM', 'Auto Use Face of the Mountain', true)
- submenuItems.slider('FOMValue', 'Use Face of the Mountain at X% health', 0, 100, 20)
- submenuItems.checkbox('ZH', 'Auto Use Zhonyas/Witchcap', true)
- submenuItems.slider('ZHValue', 'Use Zhonyas/Witchcap at X% health', 0, 100, 20)
- submenuItems.checkbox('SE', 'Auto Use Seraphs Embrace', true)
- submenuItems.slider('SEValue', 'Use Seraphs Embrace at X% health', 0, 100, 20)
- submenuItems.permashow("Kool_Items_ON")
- local submenuPotions = menu.submenu('2. Kool Potions', 300)
- submenuPotions.checkbutton('Kool_Potions_ON', 'Master Auto Potions', true)
- submenuPotions.checkbox('Health_Potion_ON', 'Health Potions', true)
- submenuPotions.slider('Health_Potion_Value', 'Health Potion Value', 0, 100, 75)
- submenuPotions.checkbox('Biscuit_ON', 'Biscuit', true)
- submenuPotions.slider('Biscuit_Value', 'Biscuit Value', 0, 100, 60)
- submenuPotions.checkbox('Chrystalline_Flask_ON', 'Chrystalline Flask', true)
- submenuPotions.slider('Chrystalline_Flask_Value', 'Chrystalline Flask Value', 0, 100, 75)
- submenuPotions.checkbox('Elixir_of_Fortitude_ON', 'Elixir of Fortitude', true)
- submenuPotions.slider('Elixir_of_Fortitude_Value', 'Elixir of Fortitude Value', 0, 100, 30)
- submenuPotions.checkbox('Mana_Potion_ON', 'Mana Potions', true)
- submenuPotions.slider('Mana_Potion_Value', 'Mana Potion Value', 0, 100, 75)
- local submenuSummoners = menu.submenu('3. Kool Summoners', 300)
- submenuSummoners.checkbutton('Kool_Summoner_Spells_ON', 'Master Auto Summoner Spells', true)
- submenuSummoners.checkbox('Auto_Ignite_ON', 'Ignite', true)
- submenuSummoners.checkbox('Auto_Exhaust_ON', 'Exhaust', true)
- submenuSummoners.slider('AutoExhaustValue', 'Auto Exhaust Value', 0, 100, 30)
- submenuSummoners.checkbox('Auto_Barrier_ON', 'Barrier', true)
- submenuSummoners.slider('AutoBarrierValue', 'Auto Barrier Value', 0, 100, 15)
- submenuSummoners.checkbox('Auto_Clarity_ON', 'Clarity', true)
- submenuSummoners.slider('AutoClarityValue', 'Auto Clarity Value', 0, 100, 40)
- submenuSummoners.checkbox('Auto_Heal_ON', 'Heal', true)
- submenuSummoners.checkbox('Auto_HealAlly_ON', 'Use Heal To Protect Allies', true)
- submenuSummoners.slider('AutoHealValue', 'Auto Heal Value', 0, 100, 15)
- menu.checkbutton('ShowPHP', 'Show % of HP', true)
- menu.checkbutton('CircleTarget', 'Highlight Target', true)
- --End of Config Menu
- function MainRun()
- if IsLolActive() and IsChatOpen() == 0 then
- if IsBuffed(myHero, 'TeleportHome') ~= true then
- if CfgKoolSettings['1. Kool Items'].Kool_Items_ON then AutoItems() end
- if CfgKoolSettings['2. Kool Potions'].Kool_Potions_ON then AutoPots() end
- if CfgKoolSettings['3. Kool Summoners'].Kool_Summoner_Spells_ON then AutoSummoners() end
- if CfgKoolSettings.ShowPHP then ShowPercentHP() end
- if CfgKoolSettings.CircleTarget then CircleTarg() end
- else
- if CfgKoolSettings.ShowPHP then ShowPercentHP() end
- if CfgKoolSettings.CircleTarget then CircleTarg() end
- end
- end
- end
- --Use Items Functions
- function AutoItems()
- target = GetWeakEnemy('PHYS', 900)
- if myHero.SpellTime1 > 1.0 then -- Checks if items are on cooldown
- RDY1 = true
- else RDY1 = false
- end
- if myHero.SpellTime2 > 1.0 then
- RDY2 = true
- else RDY2 = false
- end
- if myHero.SpellTime3 > 1.0 then
- RDY3 = true
- else RDY3 = false
- end
- if myHero.SpellTime4 > 1.0 then
- RDY4 = true
- else RDY4 = false
- end
- if myHero.SpellTime5 > 1.0 then
- RDY5 = true
- else RDY5 = false
- end
- if myHero.SpellTime6 > 1.0 then
- RDY6 = true
- else RDY6 = false
- end
- if myHero.SpellTime7 > 1.0 then
- RDY7 = true
- else RDY7 = false
- end
- useItems()
- end
- function useItems()
- AttackRange = myHero.range+(GetDistance(GetMinBBox(myHero)))
- if target ~= nil and (RDY1 or RDY2 or RDY3 or RDY4 or RDY5 or RDY6 or RDY7) then
- if CfgKoolSettings['1. Kool Items'].BC and (GetDistance(myHero, target) < 400) then -- IR
- UseItemOnTarget(3144, target) -- Bilgewater Cutlass
- end
- if CfgKoolSettings['1. Kool Items'].HG and (GetDistance(myHero, target) < 700) then -- IR
- UseItemOnTarget(3146, target) -- Hextech Gunblade
- end
- if CfgKoolSettings['1. Kool Items'].BORK and (GetDistance(myHero, target) < 500) then -- IR
- UseItemOnTarget(3153, target) -- Blade of the Ruined King
- end
- if CfgKoolSettings['1. Kool Items'].DFG and (GetDistance(myHero, target) < 750) then -- IR
- UseItemOnTarget(3128, target) -- Deathfire Grasp
- end
- if CfgKoolSettings['1. Kool Items'].FQC and (GetDistance(myHero, target) < 850) then -- IR
- UseItemOnTarget(3092, target) -- Frost Queen's Claim
- end
- if CfgKoolSettings['1. Kool Items'].BFT and (GetDistance(myHero, target) < 750) then -- IR
- UseItemOnTarget(3188, target) -- Blackfire Torch
- end
- if CfgKoolSettings['1. Kool Items'].OV and (GetDistance(myHero, target) < 525) then -- IR
- UseItemOnTarget(3180, target) -- Odyn's Veil
- end
- if CfgKoolSettings['1. Kool Items'].RO and (GetDistance(myHero, target) < 400) then -- IR
- UseItemOnTarget(3143, target) -- Randuin's Omen
- end
- if CfgKoolSettings['1. Kool Items'].RH and (GetDistance(myHero, target) < 400) then -- IR
- UseItemOnTarget(3074, target) -- Ravenous Hydra
- end
- if CfgKoolSettings['1. Kool Items'].T and (GetDistance(myHero, target) < 400) then -- IR
- UseItemOnTarget(3077, target) -- Tiamat
- end
- if CfgKoolSettings['1. Kool Items'].SOD and (GetDistance(myHero, target) < AttackRange+10) then -- AR
- UseItemOnTarget(3131, target) -- Sword of the Divine
- end
- if CfgKoolSettings['1. Kool Items'].YG and (GetDistance(myHero, target) < AttackRange+10) then -- AR
- UseItemOnTarget(3142, target) -- Youmuu's Ghostblade
- end
- if CfgKoolSettings['1. Kool Items'].En and (GetDistance(myHero, target) < AttackRange+10) then -- AR
- UseItemOnTarget(3184, target) -- Entropy
- end
- if CfgKoolSettings['1. Kool Items'].GH and (GetDistance(myHero, target) < AttackRange+10) then -- AR
- UseItemOnTarget(3142, target) -- Guardians Horn
- end
- end
- for i = 1, objManager:GetMaxHeroes() do
- local ally = objManager:GetHero(i)
- if (ally ~= nil and ally.team == myHero.team and ally.visible == 1 and GetDistance(myHero, ally) < 600) then
- 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
- UseItemOnTarget(3190,ally) -- Locket of Iron Solari
- end
- 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
- UseItemOnTarget(3401,ally) -- Face of the Mountain
- end
- end
- end
- 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
- UseItemOnTarget(3157,myHero) -- Zhonya's Hourglass
- UseItemOnTarget(3090,myHero) -- Wooglet's Witchap
- end
- 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
- UseItemOnTarget(3040,myHero) -- Seraph's Embrace
- end
- end
- function useItem(item)
- if GetInventoryItem(1) == item then
- CastSpellTarget("1", target)
- elseif GetInventoryItem(2) == item then
- CastSpellTarget("2", target)
- elseif GetInventoryItem(3) == item then
- CastSpellTarget("3", target)
- elseif GetInventoryItem(4) == item then
- CastSpellTarget("4", target)
- elseif GetInventoryItem(5) == item then
- CastSpellTarget("5", target)
- elseif GetInventoryItem(6) == item then
- CastSpellTarget("6", target)
- elseif GetInventoryItem(7) == item then
- CastSpellTarget("7", target)
- end
- end
- --End of Use Items functions
- --Use Potions functions
- function AutoPots()
- if IsBuffed(myHero, "FountainHeal") ~= true then
- 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
- usePotion()
- end
- 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
- useBiscuit()
- end
- 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
- useFlask()
- end
- if myHero.health < myHero.maxHealth * (CfgKoolSettings['2. Kool Potions'].Elixir_of_Fortitude_Value / 100) and IsBuffed(myHero, 'PotionofGiantStrength_itm') ~= true then
- useElixir()
- end
- 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
- useManaPot()
- end
- end
- end
- function usePotion()
- GetInventorySlot(2003)
- UseItemOnTarget(2003,myHero)
- end
- function useBiscuit()
- GetInventorySlot(2010)
- UseItemOnTarget(2010,myHero)
- end
- function useFlask()
- GetInventorySlot(2041)
- UseItemOnTarget(2041,myHero)
- end
- function useElixir()
- GetInventorySlot(2037)
- UseItemOnTarget(2037,myHero)
- end
- function useManaPot()
- GetInventorySlot(2004)
- UseItemOnTarget(2004,myHero)
- end
- function GetTick()
- return GetClock()
- end
- --End of Use Potions functions
- ---Summoner Spell functions
- function AutoSummoners()
- if CfgKoolSettings['3. Kool Summoners'].Auto_Ignite_ON then SummonerIgnite() end
- if CfgKoolSettings['3. Kool Summoners'].Auto_Barrier_ON then SummonerBarrier() end
- if CfgKoolSettings['3. Kool Summoners'].Auto_Heal_ON then SummonerHeal() end
- if CfgKoolSettings['3. Kool Summoners'].Auto_Exhaust_ON then SummonerExhaust() end
- if CfgKoolSettings['3. Kool Summoners'].Auto_Clarity_ON then SummonerClarity() end
- end
- function SummonerIgnite()
- --[[
- This Ignite scripts calculates the targets health regen and
- determines if you can kill the target taking in account their
- natural health regen. This does not yet take into account health
- regen from items... Some day perhaps!
- ]]--
- targetIgnite = GetWeakEnemy("TRUE",600)
- if targetIgnite ~= nil then
- local targetName = champdb[targetIgnite.name]
- local damage = (myHero.selflevel*20)+50
- local targetRegenPerSec = (targetName.healthRegenBase + (targetName.healthRegenLevel * targetIgnite.selflevel))
- local ignDamageAfterRegen = (damage-((targetRegenPerSec*5)/2))
- if targetIgnite ~= nil then
- if myHero.SummonerD == 'SummonerDot' or myHero.SummonerF == 'SummonerDot' then
- if targetIgnite.health < ignDamageAfterRegen and GetDistance(myHero, targetIgnite) < 600 then
- CastSummonerIgnite(targetIgnite)
- end
- end
- end
- end
- end
- function SummonerBarrier()
- if myHero.SummonerD == 'SummonerBarrier' or myHero.SummonerF == 'SummonerBarrier' then
- if myHero.health < myHero.maxHealth*(CfgKoolSettings['3. Kool Summoners'].AutoBarrierValue / 100) then
- CastSummonerBarrier()
- end
- end
- end
- function SummonerHeal()
- if myHero.SummonerD == 'SummonerHeal' or myHero.SummonerF == 'SummonerHeal' then
- if CfgKoolSettings['3. Kool Summoners'].Auto_HealAlly_ON then --will activate when alley within range is below X%
- enemyInRange = GetWeakEnemy('PHYS', 900)
- for h = 1, objManager:GetMaxHeroes() do
- local allyH = objManager:GetHero(h)
- if (allyH ~= nil and allyH.team == myHero.team and allyH.visible == 1 and GetDistance(myHero, allyH) < 700) then
- if enemyInRange ~= nil and allyH.health <= (allyH.maxHealth*(CfgKoolSettings['3. Kool Summoners'].AutoHealValue / 100)) then --If health is below the slider % value
- CastSummonerHeal()
- end
- end
- end
- else --HealAlly not on, will just activate on self
- if myHero.health < myHero.maxHealth*(CfgKoolSettings['3. Kool Summoners'].AutoHealValue / 100) then
- CastSummonerHeal()
- end
- end
- end
- end
- function SummonerExhaust()
- if target ~= nil then
- if myHero.SummonerD == 'SummonerExhaust' or myHero.SummonerF == 'SummonerExhaust' then
- if myHero.health < myHero.maxHealth*(CfgKoolSettings['3. Kool Summoners'].AutoExhaustValue / 100) and GetDistance(myHero, target) < 650 then
- if myHero.health < target.health then
- CastSummonerExhaust(target)
- end
- end
- end
- end
- end
- function SummonerClarity()
- if myHero.SummonerD == 'SummonerMana' or myHero.SummonerF == 'SummonerMana' then
- if myHero.mana < myHero.maxMana*(CfgKoolSettings['3. Kool Summoners'].AutoClarityValue / 100) then
- CastSummonerClarity()
- end
- end
- end
- --End of Summoner Spell functions
- --Show % of HP
- function ShowPercentHP()
- local myHP = ((myHero.health / myHero.maxHealth) * 100)
- myHP = string.format('%d%%', myHP)
- DrawTextObject(myHP,myHero,Color.White)
- end
- --End of Show % of HP
- --Circle Target
- function CircleTarg()
- if target ~= nil then
- CustomCircle(100,4,1,target)
- end
- end
- SetTimerCallback("MainRun")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement