Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if GetObjectName(GetMyHero()) ~= "Hecarim" then return end -- Only run the script if playing Hecarim
- require("Inspired") -- Requires useage of the Inspired library
- local hero = GetMyHero() -- Stores a refrence to your champion -- Stores the nearby Jungle Minion
- local HecarimMenu = MenuConfig("Hecarim", "Hec_Menu") -- Config menu for hecarim
- HecarimMenu:Menu("Auto_Q", "Auto Q Options") -- Menu for Auto Q
- local Auto_Q_Menu = HecarimMenu.Auto_Q
- Auto_Q_Menu:KeyBinding("Champion", "Champions", string.byte("Z"), false) -- Auto Q champions
- Auto_Q_Menu:KeyBinding("Jungle", "Jungle Minions", string.byte("X"), false) -- Auto Q jungle minions
- Auto_Q_Menu:KeyBinding("Lane", "Lane Minions", string.byte("C"), false) -- Auto Q lane minions
- HecarimMenu:Menu("Auto_S", "Auto Smite Options") -- Menu for Smite options
- local Auto_S_Menu = HecarimMenu.Auto_S
- Auto_S_Menu:Menu("Smite_Steal", "Steal Buff Options") -- Smite to steal buff options
- local Smite_Steal_Menu = Auto_S_Menu.Smite_Steal
- Smite_Steal_Menu:Boolean("Steal_Enabled", "Enabled", false) -- Smite to steal Enabled
- Smite_Steal_Menu:Boolean("Steal_Baron", "Baron", false) -- Smite to steal Baron
- Smite_Steal_Menu:Boolean("Steal_Dragon", "Dragon", false) -- Smite to steal Dragon
- Smite_Steal_Menu:Boolean("Steal_Red", "Red", false) -- Smite to steal Red
- Smite_Steal_Menu:Boolean("Steal_Blue", "Blue", false) -- Smite to steal Blue
- Smite_Steal_Menu:Boolean("Steal_Gromp", "Gromp", false) -- Smite to steal Gromp
- Smite_Steal_Menu:Boolean("Steal_Wolf", "Wolves", false) -- Smite to steal Wolves
- Smite_Steal_Menu:Boolean("Steal_Raptor", "Raptors", false) -- Smite to steal Raptors
- Smite_Steal_Menu:Boolean("Steal_Crug", "Krugs", false) -- Smite to steal Crugs
- Smite_Steal_Menu:Boolean("Steal_Skuttle", "Skuttle", false) -- Smite to steal Skuttle
- Auto_S_Menu:Menu("Smite_Buff", "Buff Self Options") -- Smite to buff self menu TODO: normal buffs
- local Smite_Buff_Menu = Auto_S_Menu.Smite_Buff
- Smite_Buff_Menu:Info("Smite_Heal", "Smite to heal self") -- Title for smite to heal
- Smite_Buff_Menu:Boolean("Heal_Enabled", "Enabled", false) -- Smite to heal Enabled
- Smite_Buff_Menu:Slider("Smite_Heal_Threshold", "Health %", 25, 1, 100, 1) -- Minimum HP before smiting to heal
- Smite_Buff_Menu:Empty("Smite_Buff_Sep", 0.1)
- Smite_Buff_Menu:Info("Smite_Mana", "Smite to restore mana") -- Smite to restore Mana
- Smite_Buff_Menu:Boolean("Mana_Enabled", "Enabled", false) -- Smite for Mana Enabled
- Smite_Buff_Menu:Slider("Smite_Mana_Threshold", "Mana %", 25, 1, 100, 1) -- Minimum Mana before smiting to restore
- local smiteSlot = nil -- Stores what summoner spell is smite
- if GetCastName(hero, SUMMONER_1):lower():find("summonersmite") then smiteSlot = SUMMONER_1 -- Summoner Spell 1
- else GetCastName(hero, SUMMONER_2):lower():find("summonersmite") smiteSlot = SUMMONER_2 end -- Summoner Spell 2
- local champ = {}
- local jungle = {}
- local minion = {}
- local champSize = 0
- local jungleSize = 0
- local minionSize = 0
- --OnObjectLoop(function(o) ListObj(o) end) -- works perfectly just chunks FPS
- OnObjectLoad(function(o) ListObj(o) end)
- OnCreateObj(function(o) ListObj(o) end)
- function ListObj(o)
- if(o) then
- if (GetObjectType(o) == Obj_AI_Hero) then ListChamp(o)
- elseif (GetObjectType(o) == Obj_AI_Minion) then
- if(GetObjectName(o):find("Krug") or GetObjectBaseName(o):find("Krug")) or
- (GetObjectName(o):find("Razorbeak") or GetObjectBaseName(o):find("Razorbeak")) or
- (GetObjectName(o):find("Murkwolf") or GetObjectBaseName(o):find("Murkwolf")) or
- (GetObjectName(o):find("Gromp") or GetObjectBaseName(o):find("Gromp")) or
- (GetObjectName(o):find("Red") or GetObjectBaseName(o):find("Red")) or
- (GetObjectName(o):find("Blue") or GetObjectBaseName(o):find("Blue")) or
- (GetObjectName(o):find("Crab") or GetObjectBaseName(o):find("Crab")) or
- (GetObjectName(o):find("Baron") or GetObjectBaseName(o):find("Baron")) or
- (GetObjectName(o):find("Dragon") or GetObjectBaseName(o):find("Dragon")) then
- ListJungle(o)
- else
- ListMinion(o)
- end
- end
- end
- end
- function ListChamp(o)
- local function FindSpot()
- for i = 1, champSize do
- local o = champ[i]
- if(not o or not IsObjectAlive(o)) then return i end
- end
- champSize = champSize + 1
- return champSize
- end
- champ[FindSpot()] = o
- end
- function ListJungle(o)
- local function FindSpot()
- for i = 1, jungleSize do
- local o = jungle[i]
- if(not o or not IsObjectAlive(o)) then return i end
- end
- jungleSize = jungleSize + 1
- return jungleSize
- end
- jungle[FindSpot()] = o
- end
- function ListMinion(o)
- local function FindSpot()
- for i = 1, minionSize do
- local o = minion[i]
- if(not o or not IsObjectAlive(o)) then return i end
- end
- minionSize = minionSize + 1
- return minionSize
- end
- minion[FindSpot()] = o
- end
- function anyTargetInRange(type, range)
- local npcs = nil
- if (type == "Hero") then npcs = champ
- elseif (type == "Jungle") then npcs = jungle
- elseif (type == "Minion") then npcs = minion end
- if(npcs ~= nil) then
- for i, target in pairs(npcs) do
- if(ValidTarget(target, range)) then return true end
- end
- end
- return false
- end
- OnTick(function(hero)
- if(not IsDead(hero)) then
- -- Auto Q breaks take look at how nearestminon
- if(Auto_Q_Menu.Champion:Value() and
- anyTargetInRange("Hero", GetCastRange(hero, _Q))) then CastSpell(_Q) end-- Auto Q if enabled and nearby enemy of Enabled type
- if(Auto_Q_Menu.Jungle:Value() and
- anyTargetInRange("Jungle", GetCastRange(hero, _Q))) then CastSpell(_Q) end-- Auto Q if enabled and nearby enemy of Enabled type
- if(Auto_Q_Menu.Lane:Value() and
- anyTargetInRange("Minion", GetCastRange(hero, _Q))) then CastSpell(_Q) end-- Auto Q if enabled and nearby enemy of Enabled type
- end
- end)
- PrintChat("Hecarim Loaded!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement