naturus

blitzz

Dec 23rd, 2014
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 33.32 KB | None | 0 0
  1. --[[
  2.  
  3.     Script Name: Blitzcrank MASTER
  4.         Author: kokosik1221
  5.     Last Version: 0.66
  6.     16.12.2014
  7.    
  8. ]]--
  9.  
  10.  
  11. if myHero.charName ~= "Blitzcrank" then return end
  12.  
  13. _G.AUTOUPDATE = true
  14. _G.USESKINHACK = false
  15.  
  16.  
  17. local version = 0.66
  18. local SCRIPT_NAME = "BlitzcrankMaster"
  19. local SOURCELIB_URL = "https://raw.github.com/TheRealSource/public/master/common/SourceLib.lua"
  20. local SOURCELIB_PATH = LIB_PATH.."SourceLib.lua"
  21. local prodstatus = false
  22. local colstatus = false
  23. if FileExist(SOURCELIB_PATH) then
  24.     require("SourceLib")
  25. else
  26.     DOWNLOADING_SOURCELIB = true
  27.     DownloadFile(SOURCELIB_URL, SOURCELIB_PATH, function() PrintChat("Required libraries downloaded successfully, please reload") end)
  28. end
  29. if DOWNLOADING_SOURCELIB then PrintChat("Downloading required libraries, please wait...") return end
  30. if _G.AUTOUPDATE then
  31.      SourceUpdater(SCRIPT_NAME, version, "raw.github.com", "/kokosik1221/bol/master/"..SCRIPT_NAME..".lua", SCRIPT_PATH .. GetCurrentEnv().FILE_NAME, "/kokosik1221/bol/master/"..SCRIPT_NAME..".version"):CheckUpdate()
  32. end
  33. local RequireI = Require("SourceLib")
  34. RequireI:Add("vPrediction", "https://raw.github.com/Hellsing/BoL/master/common/VPrediction.lua")
  35. RequireI:Add("SOW", "https://raw.github.com/Hellsing/BoL/master/common/SOW.lua")
  36. if VIP_USER then
  37.     RequireI:Add("Prodiction", "https://bitbucket.org/Klokje/public-klokjes-bol-scripts/raw/ec830facccefb3b52212dba5696c08697c3c2854/Test/Prodiction/Prodiction.lua")
  38.     RequireI:Add("Collision", "https://bitbucket.org/Klokje/public-klokjes-bol-scripts/raw/b891699e739f77f77fd428e74dec00b2a692fdef/Common/Collision.lua")
  39.     prodstatus = true
  40.     colstatus = true
  41. end
  42. RequireI:Check()
  43. if RequireI.downloadNeeded == true then return end
  44.  
  45.  
  46. local Counterspells = {
  47.     ['KatarinaR'] = {charName = "Katarina", spellSlot = "R"},
  48.     ['GalioIdolOfDurand'] = {charName = "Galio", spellSlot = "R"},
  49.     ['Crowstorm'] = {charName = "FiddleSticks", spellSlot = "R"},
  50.     ['Drain'] = {charName = "FiddleSticks", spellSlot = "W"},
  51.     ['AbsoluteZero'] = {charName = "Nunu", spellSlot = "R"},
  52.     ['ShenStandUnited'] = {charName = "Shen", spellSlot = "R"},
  53.     ['UrgotSwap2'] = {charName = "Urgot", spellSlot = "R"},
  54.     ['AlZaharNetherGrasp'] = {charName = "Malzahar", spellSlot = "R"},
  55.     ['FallenOne'] = {charName = "Karthus", spellSlot = "R"},
  56.     ['Pantheon_GrandSkyfall_Jump'] = {charName = "Pantheon", spellSlot = "R"},
  57.     ['CaitlynAceintheHole'] = {charName = "Caitlyn", spellSlot = "R"},
  58.     ['MissFortuneBulletTime'] = {charName = "MissFortune", spellSlot = "R"},
  59.     ['InfiniteDuress'] = {charName = "Warwick", spellSlot = "R"},
  60.     ['Meditate'] = {},
  61.     ['Teleport'] = {},
  62. }
  63.  
  64. local Items = {
  65.     BWC = { id = 3144, range = 400, reqTarget = true, slot = nil },
  66.     DFG = { id = 3128, range = 750, reqTarget = true, slot = nil },
  67.     HGB = { id = 3146, range = 400, reqTarget = true, slot = nil },
  68.     BFT = { id = 3188, range = 750, reqTarget = true, slot = nil },
  69. }
  70.  
  71. function Vars()
  72.     Q = {name = "Rocket Grab", range = 900, speed = 1800, delay = 0.25, width = 60}
  73.     W = {name = "Overdrive"}
  74.     E = {name = "Power Fist", range = 140}
  75.     R = {name = "Static Field", range = 600}
  76.     QReady, WReady, EReady, RReady, IReady, zhonyaready, sac, mma = false, false, false, false, false, false, false, false
  77.     abilitylvl, lastskin = 0, 0
  78.     EnemyMinions = minionManager(MINION_ENEMY, Q.range, myHero, MINION_SORT_MAXHEALTH_DEC)
  79.     JungleMinions = minionManager(MINION_JUNGLE, Q.range, myHero, MINION_SORT_MAXHEALTH_DEC)
  80.     IgniteKey, SmiteKey, zhonyaslot = nil, nil, nil
  81.     killstring = {}
  82.     Spells = {_Q,_W,_E,_R}
  83.     Spells2 = {"Q","W","E","R"}
  84.     print("<b><font color=\"#6699FF\">Blitzcrank Master:</font></b> <font color=\"#FFFFFF\">Good luck and give me feedback!</font>")
  85.     if VIP_USER and prodstatus and colstatus then
  86.         Prodict = ProdictManager.GetInstance()
  87.         ProdictQ = Prodict:AddProdictionObject(_Q, Q.range, Q.speed, Q.delay, Q.width, myHero)
  88.         ProdictQCol = Collision(Q.range, Q.speed, Q.delay, Q.width)
  89.     end
  90.     if _G.MMA_Loaded then
  91.         print("<b><font color=\"#6699FF\">Blitzcrank Master:</font></b> <font color=\"#FFFFFF\">MMA Support Loaded.</font>")
  92.         mma = true
  93.     end
  94.     if _G.AutoCarry then
  95.         print("<b><font color=\"#6699FF\">Blitzcrank Master:</font></b> <font color=\"#FFFFFF\">SAC Support Loaded.</font>")
  96.         sac = true
  97.     end
  98. end
  99.  
  100. function OnLoad()
  101.     Vars()
  102.     Menu()
  103.     PriorityOnLoad()
  104. end
  105.  
  106. function PriorityOnLoad()
  107.     if heroManager.iCount < 10 then
  108.         print("<font color=\"#FFFFFF\">Too few champions to arrange priority.</font>")
  109.     elseif heroManager.iCount == 6 then
  110.         arrangePrioritysTT()
  111.     else
  112.         arrangePrioritys()
  113.     end
  114. end
  115.  
  116. function OnTick()
  117.     Check()
  118.     if MenuBlitz.comboConfig.CEnabled and ((myHero.mana/myHero.maxMana)*100) >= MenuBlitz.comboConfig.manac then
  119.         Combo()
  120.     end
  121.     if (MenuBlitz.harrasConfig.HEnabled or MenuBlitz.harrasConfig.HTEnabled) and ((myHero.mana/myHero.maxMana)*100) >= MenuBlitz.harrasConfig.manah then
  122.         Harrass()
  123.     end
  124.     if MenuBlitz.farm.LaneClear and ((myHero.mana/myHero.maxMana)*100) >= MenuBlitz.farm.manaf then
  125.         Farm()
  126.     end
  127.     if MenuBlitz.jf.JFEnabled and ((myHero.mana/myHero.maxMana)*100) >= MenuBlitz.jf.manajf then
  128.         JungleFarmm()
  129.     end
  130.     if MenuBlitz.prConfig.AZ then
  131.         autozh()
  132.     end
  133.     if MenuBlitz.prConfig.ALS then
  134.         autolvl()
  135.     end
  136.     KillSteall()
  137. end
  138.  
  139.  
  140. function Menu()
  141.     VP = VPrediction()
  142.     SOWi = SOW(VP)
  143.     MenuBlitz = scriptConfig("Blitzcrank Master "..version, "Blitzcrank Master "..version)
  144.     MenuBlitz:addSubMenu("Orbwalking", "Orbwalking")
  145.     SOWi:LoadToMenu(MenuBlitz.Orbwalking)
  146.     MenuBlitz:addSubMenu("Target selector", "STS")
  147.     TargetSelector = TargetSelector(TARGET_LESS_CAST_PRIORITY, Q.range, DAMAGE_MAGIC)
  148.     TargetSelector.name = "Blitzcrank"
  149.     MenuBlitz.STS:addTS(TargetSelector)
  150.     MenuBlitz:addSubMenu("[Blitzcrank Master]: Combo Settings", "comboConfig")
  151.     MenuBlitz.comboConfig:addParam("USEQ", "Use " .. Q.name .. "(Q)", SCRIPT_PARAM_ONOFF, true)
  152.     MenuBlitz.comboConfig:addParam("USEQS", "Use Smite If See Collision", SCRIPT_PARAM_ONOFF, true)
  153.     MenuBlitz.comboConfig:addParam("qqq", "--------------------------------------------------------", SCRIPT_PARAM_INFO,"")
  154.     MenuBlitz.comboConfig:addParam("USEW", "Use " .. W.name .. "(W)", SCRIPT_PARAM_ONOFF, true)
  155.     MenuBlitz.comboConfig:addParam("qqq", "--------------------------------------------------------", SCRIPT_PARAM_INFO,"")
  156.     MenuBlitz.comboConfig:addParam("USEE", "Use " .. E.name .. "(E)", SCRIPT_PARAM_ONOFF, true)
  157.     MenuBlitz.comboConfig:addParam("qqq", "--------------------------------------------------------", SCRIPT_PARAM_INFO,"")
  158.     MenuBlitz.comboConfig:addParam("USER", "Use " .. R.name .. "(R)", SCRIPT_PARAM_ONOFF, true)
  159.     MenuBlitz.comboConfig:addParam("Kilable", "Only Use If Target Is Killable", SCRIPT_PARAM_ONOFF, true)
  160.     MenuBlitz.comboConfig:addParam("qqq", "--------------------------------------------------------", SCRIPT_PARAM_INFO,"")
  161.     MenuBlitz.comboConfig:addParam("ST", "Focus Selected Target", SCRIPT_PARAM_ONOFF, false)
  162.     MenuBlitz.comboConfig:addParam("CEnabled", "Full Combo", SCRIPT_PARAM_ONKEYDOWN, false, 32)
  163.     MenuBlitz.comboConfig:addParam("manac", "Min. Mana To Cast Combo", SCRIPT_PARAM_SLICE, 10, 0, 100, 0)
  164.     MenuBlitz:addSubMenu("[Blitzcrank Master]: Harras Settings", "harrasConfig")
  165.     MenuBlitz.harrasConfig:addParam("HM", "Harrass Mode:", SCRIPT_PARAM_LIST, 1, {"|Q|", "|E|", "|Q|E|"})
  166.     MenuBlitz.harrasConfig:addParam("HEnabled", "Harass", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("K"))
  167.     MenuBlitz.harrasConfig:addParam("HTEnabled", "Harass Toggle", SCRIPT_PARAM_ONKEYTOGGLE, false, string.byte("L"))
  168.     MenuBlitz.harrasConfig:addParam("manah", "Min. Mana To Harrass", SCRIPT_PARAM_SLICE, 50, 0, 100, 0)
  169.     MenuBlitz.harrasConfig:addParam("MM", "Move To Mouse", SCRIPT_PARAM_ONOFF, true)
  170.     MenuBlitz:addSubMenu("[Blitzcrank Master]: KS Settings", "ksConfig")
  171.     MenuBlitz.ksConfig:addParam("IKS", "Use Ignite To KS", SCRIPT_PARAM_ONOFF, true)
  172.     MenuBlitz.ksConfig:addParam("qqq", "--------------------------------------------------------", SCRIPT_PARAM_INFO,"")
  173.     MenuBlitz.ksConfig:addParam("QKS", "Use " .. Q.name .. "(Q)", SCRIPT_PARAM_ONOFF, true)
  174.     MenuBlitz.ksConfig:addParam("qqq", "--------------------------------------------------------", SCRIPT_PARAM_INFO,"")
  175.     MenuBlitz.ksConfig:addParam("EKS", "Use " .. E.name .. "(E)", SCRIPT_PARAM_ONOFF, true)
  176.     MenuBlitz.ksConfig:addParam("qqq", "--------------------------------------------------------", SCRIPT_PARAM_INFO,"")
  177.     MenuBlitz.ksConfig:addParam("RKS", "Use " .. R.name .. "(R)", SCRIPT_PARAM_ONOFF, false)
  178.     MenuBlitz:addSubMenu("[Blitzcrank Master]: LaneClear Settings", "farm")
  179.     MenuBlitz.farm:addParam("QF", "Use " .. Q.name .. "(Q)", SCRIPT_PARAM_ONOFF, true)
  180.     MenuBlitz.farm:addParam("qqq", "--------------------------------------------------------", SCRIPT_PARAM_INFO,"")
  181.     MenuBlitz.farm:addParam("EF", "Use " .. E.name .. "(E)", SCRIPT_PARAM_ONOFF, true)
  182.     MenuBlitz.farm:addParam("qqq", "--------------------------------------------------------", SCRIPT_PARAM_INFO,"")
  183.     MenuBlitz.farm:addParam("LaneClear", "LaneClear", SCRIPT_PARAM_ONKEYDOWN, false,   string.byte("V"))
  184.     MenuBlitz.farm:addParam("manaf", "Min. Mana To Farm", SCRIPT_PARAM_SLICE, 40, 0, 100, 0)
  185.     MenuBlitz:addSubMenu("[Blitzcrank Master]: Jungle Farm Settings", "jf")
  186.     MenuBlitz.jf:addParam("QJF", "Use " .. Q.name .. "(Q)", SCRIPT_PARAM_ONOFF, true)
  187.     MenuBlitz.jf:addParam("qqq", "--------------------------------------------------------", SCRIPT_PARAM_INFO,"")
  188.     MenuBlitz.jf:addParam("EJF", "Use " .. E.name .. "(E)", SCRIPT_PARAM_ONOFF, true)
  189.     MenuBlitz.jf:addParam("qqq", "--------------------------------------------------------", SCRIPT_PARAM_INFO,"")
  190.     MenuBlitz.jf:addParam("JFEnabled", "Jungle Farm", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("V"))
  191.     MenuBlitz.jf:addParam("manajf", "Min. Mana To Jungle Farm", SCRIPT_PARAM_SLICE, 40, 0, 100, 0)
  192.     MenuBlitz:addSubMenu("[Blitzcrank Master]: Draw Settings", "drawConfig")
  193.     MenuBlitz.drawConfig:addParam("DLC", "Use Lag-Free Circles", SCRIPT_PARAM_ONOFF, true)
  194.     MenuBlitz.drawConfig:addParam("DD", "Draw DMG Text", SCRIPT_PARAM_ONOFF, true)
  195.     MenuBlitz.drawConfig:addParam("DST", "Draw Selected Target", SCRIPT_PARAM_ONOFF, true)
  196.     MenuBlitz.drawConfig:addParam("qqq", "--------------------------------------------------------", SCRIPT_PARAM_INFO,"")
  197.     MenuBlitz.drawConfig:addParam("DQL", "Draw Q Collision Line", SCRIPT_PARAM_ONOFF, true)
  198.     MenuBlitz.drawConfig:addParam("DQR", "Draw Q Range", SCRIPT_PARAM_ONOFF, true)
  199.     MenuBlitz.drawConfig:addParam("DQRC", "Draw Q Range Color", SCRIPT_PARAM_COLOR, {255,0,0,255})
  200.     MenuBlitz.drawConfig:addParam("qqq", "--------------------------------------------------------", SCRIPT_PARAM_INFO,"")
  201.     MenuBlitz.drawConfig:addParam("DRR", "Draw R Range", SCRIPT_PARAM_ONOFF, true)
  202.     MenuBlitz.drawConfig:addParam("DRRC", "Draw R Range Color", SCRIPT_PARAM_COLOR, {255, 0, 255, 0})
  203.     MenuBlitz:addSubMenu("[Blitzcrank Master]: Extra Settings", "exConfig")
  204.     Enemies = GetEnemyHeroes()
  205.     MenuBlitz.exConfig:addSubMenu("Auto-Interrupt Spells", "ES")
  206.     for i,enemy in pairs (Enemies) do
  207.         for j,spell in pairs (Spells) do
  208.             if Counterspells[enemy:GetSpellData(spell).name] then
  209.                 MenuBlitz.exConfig.ES:addParam(tostring(enemy:GetSpellData(spell).name),"Interrupt "..tostring(enemy.charName).." Spell "..tostring(Spells2[j]),SCRIPT_PARAM_ONOFF,true)
  210.             end
  211.         end
  212.     end
  213.     MenuBlitz.exConfig:addParam("UI", "Use Auto-Interrupt", SCRIPT_PARAM_ONOFF, true)
  214.     MenuBlitz:addSubMenu("[Blitzcrank Master]: Black List", "blConfig")
  215.     for i = 1, heroManager.iCount do
  216.         local hero = heroManager:GetHero(i)
  217.         if hero.team ~= myHero.team then
  218.             MenuBlitz.blConfig:addParam(hero.charName, hero.charName, SCRIPT_PARAM_ONOFF, false)
  219.         end
  220.     end
  221.     MenuBlitz.blConfig:addParam("UBL", "Use Black List Toggle", SCRIPT_PARAM_ONKEYTOGGLE, false, string.byte("T"))
  222.     MenuBlitz:addSubMenu("[Blitzcrank Master]: Misc Settings", "prConfig")
  223.     MenuBlitz.prConfig:addParam("pc", "Use Packets To Cast Spells(VIP)", SCRIPT_PARAM_ONOFF, false)
  224.     MenuBlitz.prConfig:addParam("qqq", "--------------------------------------------------------", SCRIPT_PARAM_INFO,"")
  225.     MenuBlitz.prConfig:addParam("skin", "Use change skin", SCRIPT_PARAM_ONOFF, false)
  226.     MenuBlitz.prConfig:addParam("skin1", "Skin change(VIP)", SCRIPT_PARAM_SLICE, 1, 1, 8)
  227.     MenuBlitz.prConfig:addParam("qqq", "--------------------------------------------------------", SCRIPT_PARAM_INFO,"")
  228.     MenuBlitz.prConfig:addParam("AZ", "Use Auto Zhonya", SCRIPT_PARAM_ONOFF, true)
  229.     MenuBlitz.prConfig:addParam("AZHP", "Min HP To Cast Zhonya", SCRIPT_PARAM_SLICE, 20, 0, 100, 0)
  230.     MenuBlitz.prConfig:addParam("AZMR", "Must Have 0 Enemy In Range:", SCRIPT_PARAM_SLICE, 900, 0, 1500, 0)
  231.     MenuBlitz.prConfig:addParam("qqq", "--------------------------------------------------------", SCRIPT_PARAM_INFO,"")
  232.     MenuBlitz.prConfig:addParam("ALS", "Auto lvl skills", SCRIPT_PARAM_ONOFF, false)
  233.     MenuBlitz.prConfig:addParam("AL", "Auto lvl sequence", SCRIPT_PARAM_LIST, 1, { "R>Q>W>E", "R>Q>E>W", "R>W>Q>E", "R>W>E>Q", "R>E>Q>W", "R>E>W>Q" })
  234.     MenuBlitz.prConfig:addParam("qqq", "--------------------------------------------------------", SCRIPT_PARAM_INFO,"")
  235.     MenuBlitz.prConfig:addParam("pro", "Prodiction To Use:", SCRIPT_PARAM_LIST, 1, {"VPrediction","Prodiction"})
  236.     MenuBlitz.prConfig:addParam("vphit", "VPrediction HitChance", SCRIPT_PARAM_LIST, 3, {"[0]Target Position","[1]Low Hitchance", "[2]High Hitchance", "[3]Target slowed/close", "[4]Target immobile", "[5]Target dashing" })
  237.     MenuBlitz.comboConfig:permaShow("CEnabled")
  238.     MenuBlitz.harrasConfig:permaShow("HEnabled")
  239.     MenuBlitz.harrasConfig:permaShow("HTEnabled")
  240.     MenuBlitz.prConfig:permaShow("AZ")
  241.     MenuBlitz.blConfig:permaShow("UBL")
  242.     if myHero:GetSpellData(SUMMONER_1).name:find("summonerdot") then IgniteKey = SUMMONER_1
  243.         elseif myHero:GetSpellData(SUMMONER_2).name:find("summonerdot") then IgniteKey = SUMMONER_2
  244.     end
  245.     if myHero:GetSpellData(SUMMONER_1).name:find("summonersmite") then SmiteKey = SUMMONER_1
  246.         elseif myHero:GetSpellData(SUMMONER_2).name:find("summonersmite") then SmiteKey = SUMMONER_2
  247.     end
  248.     _G.oldDrawCircle = rawget(_G, 'DrawCircle')
  249.     _G.DrawCircle = DrawCircle2
  250.     TargetTable = {
  251.     AP = {
  252.         "Annie", "Ahri", "Akali", "Anivia", "Annie", "Brand", "Cassiopeia", "Diana", "Evelynn", "FiddleSticks", "Fizz", "Gragas", "Heimerdinger", "Karthus",
  253.         "Kassadin", "Katarina", "Kayle", "Kennen", "Leblanc", "Lissandra", "Lux", "Malzahar", "Mordekaiser", "Morgana", "Nidalee", "Orianna",
  254.         "Ryze", "Sion", "Swain", "Syndra", "Teemo", "TwistedFate", "Veigar", "Viktor", "Vladimir", "Xerath", "Ziggs", "Zyra", "Velkoz"
  255.     }, 
  256.     Support = {
  257.         "Alistar", "Blitzcrank", "Janna", "Karma", "Leona", "Lulu", "Nami", "Nunu", "Sona", "Soraka", "Taric", "Thresh", "Zilean", "Braum"
  258.     }, 
  259.     Tank = {
  260.         "Amumu", "Chogath", "DrMundo", "Galio", "Hecarim", "Malphite", "Maokai", "Nasus", "Rammus", "Sejuani", "Nautilus", "Shen", "Singed", "Skarner", "Volibear",
  261.         "Warwick", "Yorick", "Zac"
  262.     },
  263.     AD_Carry = {
  264.         "Ashe", "Caitlyn", "Corki", "Draven", "Ezreal", "Graves", "Jayce", "Jinx", "KogMaw", "Lucian", "MasterYi", "MissFortune", "Pantheon", "Quinn", "Shaco", "Sivir",
  265.         "Talon","Tryndamere", "Tristana", "Twitch", "Urgot", "Varus", "Vayne", "Yasuo", "Zed"
  266.     },
  267.     Bruiser = {
  268.         "Aatrox", "Darius", "Elise", "Fiora", "Gangplank", "Garen", "Irelia", "JarvanIV", "Jax", "Khazix", "LeeSin", "Nocturne", "Olaf", "Poppy",
  269.         "Renekton", "Rengar", "Riven", "Rumble", "Shyvana", "Trundle", "Udyr", "Vi", "MonkeyKing", "XinZhao"
  270.     }
  271. }
  272. end
  273.  
  274. function EnemyCount(point, range)
  275.     local count = 0
  276.     for _, enemy in pairs(GetEnemyHeroes()) do
  277.         if enemy and not enemy.dead and GetDistance(point, enemy) <= range then
  278.             count = count + 1
  279.         end
  280.     end            
  281.     return count
  282. end
  283.  
  284. function GetCustomTarget()
  285.     TargetSelector:update()
  286.     if _G.MMA_Target and _G.MMA_Target.type == myHero.type then
  287.         return _G.MMA_Target
  288.     end
  289.     if _G.AutoCarry and _G.AutoCarry.Crosshair and _G.AutoCarry.Attack_Crosshair and _G.AutoCarry.Attack_Crosshair.target and _G.AutoCarry.Attack_Crosshair.target.type == myHero.type then
  290.         return _G.AutoCarry.Attack_Crosshair.target
  291.     end
  292.     return TargetSelector.target
  293. end
  294.  
  295. function Check()
  296.     if SelectedTarget ~= nil and ValidTarget(SelectedTarget) then
  297.         Cel = SelectedTarget
  298.     else
  299.         Cel = GetCustomTarget()
  300.     end
  301.     if sac or mma then
  302.         SOWi.Menu.Enabled = false
  303.     end
  304.     SOWi:ForceTarget(Cel)
  305.     zhonyaslot = GetInventorySlotItem(3157)
  306.     zhonyaready = (zhonyaslot ~= nil and myHero:CanUseSpell(zhonyaslot) == READY)
  307.     QReady = (myHero:CanUseSpell(_Q) == READY)
  308.     WReady = (myHero:CanUseSpell(_W) == READY)
  309.     EReady = (myHero:CanUseSpell(_E) == READY)
  310.     RReady = (myHero:CanUseSpell(_R) == READY)
  311.     IReady = (IgniteKey ~= nil and myHero:CanUseSpell(IgniteKey) == READY)
  312.     SReady = (SmiteKey ~= nil and myHero:CanUseSpell(SmiteKey) == READY)
  313.     if MenuBlitz.prConfig.skin and VIP_USER and _G.USESKINHACK then
  314.         if MenuBlitz.prConfig.skin1 ~= lastSkin then
  315.             GenModelPacket("Blitzcrank", MenuBlitz.prConfig.skin1)
  316.             lastSkin = MenuBlitz.prConfig.skin1
  317.         end
  318.     end
  319.     if MenuBlitz.drawConfig.DLC then
  320.         _G.DrawCircle = DrawCircle2
  321.     else
  322.         _G.DrawCircle = _G.oldDrawCircle
  323.     end
  324. end
  325.  
  326. function UseItems(unit)
  327.     if unit ~= nil then
  328.         for _, item in pairs(Items) do
  329.             item.slot = GetInventorySlotItem(item.id)
  330.             if item.slot ~= nil then
  331.                 if item.reqTarget and GetDistance(unit) < item.range then
  332.                     CastSpell(item.slot, unit)
  333.                 elseif not item.reqTarget then
  334.                     if (GetDistance(unit) - getHitBoxRadius(myHero) - getHitBoxRadius(unit)) < 50 then
  335.                         CastSpell(item.slot)
  336.                     end
  337.                 end
  338.             end
  339.         end
  340.     end
  341. end
  342.  
  343. function getHitBoxRadius(target)
  344.     return GetDistance(target.minBBox, target.maxBBox)/2
  345. end
  346.  
  347. function FindBL()
  348.     for i = 1, heroManager.iCount do
  349.         hero = heroManager:GetHero(i)
  350.         if MenuBlitz.blConfig.UBL and hero.team ~= myHero.team and not hero.dead and MenuBlitz.blConfig[hero.charName] then
  351.             return hero
  352.         end
  353.     end
  354. end
  355.  
  356. function Combo()
  357.     blacktarget = FindBL()
  358.     if Cel ~= nil and ValidTarget(Cel) and Cel ~= blacktarget then
  359.         UseItems(Cel)
  360.         if MenuBlitz.comboConfig.USEQ then
  361.             CastQ(Cel)
  362.         end
  363.         if MenuBlitz.comboConfig.USEW then
  364.             CastW()
  365.         end
  366.         if MenuBlitz.comboConfig.USEE then
  367.             CastE(Cel)
  368.         end
  369.         if MenuBlitz.comboConfig.USER then
  370.             if MenuBlitz.comboConfig.Kilable then
  371.                 local r = getDmg("R", Cel, myHero) + ((myHero.ap*90)/100)
  372.                 if Cel.health < r then
  373.                     CastR(Cel)
  374.                 end
  375.             elseif not MenuBlitz.comboConfig.Kilable then
  376.                 CastR(Cel)
  377.             end
  378.         end
  379.     end
  380. end
  381.  
  382. function Harrass()
  383.     blacktarget = FindBL()
  384.     if Cel ~= nil and ValidTarget(Cel) and Cel ~= blacktarget then
  385.         if MenuBlitz.harrasConfig.HM == 1 then
  386.             CastQ(Cel)
  387.         end
  388.         if MenuBlitz.harrasConfig.HM == 2 then
  389.             CastE(Cel)
  390.         end
  391.         if MenuBlitz.harrasConfig.HM == 3 then
  392.             CastQ(Cel)
  393.             CastE(Cel)
  394.         end
  395.     end
  396.     if MenuBlitz.harrasConfig.MM then
  397.         myHero:MoveTo(mousePos.x, mousePos.z)
  398.     end
  399. end
  400.  
  401. function Farm()
  402.     EnemyMinions:update()
  403.     for i, minion in pairs(EnemyMinions.objects) do
  404.         if MenuBlitz.farm.QF then
  405.             if minion ~= nil and not minion.dead then
  406.                 CastQ(minion)
  407.             end
  408.         end
  409.         if MenuBlitz.farm.EF then
  410.             if minion ~= nil and not minion.dead then
  411.                 CastE(minion)
  412.             end
  413.         end
  414.     end
  415. end
  416.  
  417. function JungleFarmm()
  418.     JungleMinions:update()
  419.     for i, minion in pairs(JungleMinions.objects) do
  420.         if MenuBlitz.jf.QJF then
  421.             if minion ~= nil and not minion.dead then
  422.                 CastQ(minion)
  423.             end
  424.         end
  425.         if MenuBlitz.jf.EJF then
  426.             if minion ~= nil and not minion.dead then
  427.                 CastE(minion)
  428.             end
  429.         end
  430.     end
  431. end
  432.  
  433. function autozh()
  434.     local count = EnemyCount(myHero, MenuBlitz.prConfig.AZMR)
  435.     if zhonyaready and ((myHero.health/myHero.maxHealth)*100) < MenuBlitz.prConfig.AZHP and count == 0 then
  436.         CastSpell(zhonyaslot)
  437.     end
  438. end
  439.  
  440. function autolvl()
  441.     if not MenuBlitz.prConfig.ALS then return end
  442.     if myHero.level > abilitylvl then
  443.         abilitylvl = abilitylvl + 1
  444.         if MenuBlitz.prConfig.AL == 1 then         
  445.             LevelSpell(_R)
  446.             LevelSpell(_Q)
  447.             LevelSpell(_W)
  448.             LevelSpell(_E)
  449.         end
  450.         if MenuBlitz.prConfig.AL == 2 then 
  451.             LevelSpell(_R)
  452.             LevelSpell(_Q)
  453.             LevelSpell(_E)
  454.             LevelSpell(_W)
  455.         end
  456.         if MenuBlitz.prConfig.AL == 3 then 
  457.             LevelSpell(_R)
  458.             LevelSpell(_W)
  459.             LevelSpell(_Q)
  460.             LevelSpell(_E)
  461.         end
  462.         if MenuBlitz.prConfig.AL == 4 then 
  463.             LevelSpell(_R)
  464.             LevelSpell(_W)
  465.             LevelSpell(_E)
  466.             LevelSpell(_Q)
  467.         end
  468.         if MenuBlitz.prConfig.AL == 5 then 
  469.             LevelSpell(_R)
  470.             LevelSpell(_E)
  471.             LevelSpell(_Q)
  472.             LevelSpell(_W)
  473.         end
  474.         if MenuBlitz.prConfig.AL == 6 then 
  475.             LevelSpell(_R)
  476.             LevelSpell(_E)
  477.             LevelSpell(_W)
  478.             LevelSpell(_Q)
  479.         end
  480.     end
  481. end
  482.  
  483. function OnDraw()
  484.     if MenuBlitz.drawConfig.DST and MenuBlitz.comboConfig.ST then
  485.         if SelectedTarget ~= nil and not SelectedTarget.dead then
  486.             DrawCircle(SelectedTarget.x, SelectedTarget.y, SelectedTarget.z, 100, RGB(MenuBlitz.drawConfig.DQRC[2], MenuBlitz.drawConfig.DQRC[3], MenuBlitz.drawConfig.DQRC[4]))
  487.         end
  488.     end
  489.     if MenuBlitz.drawConfig.DQL and ValidTarget(Cel, Q.range) and VIP_USER then
  490.         ProdictQCol:DrawCollision(myHero, Cel)
  491.     end
  492.     if MenuBlitz.drawConfig.DD then
  493.         DmgCalc()
  494.         for _,enemy in pairs(GetEnemyHeroes()) do
  495.             if ValidTarget(enemy) and killstring[enemy.networkID] ~= nil then
  496.                 local pos = WorldToScreen(D3DXVECTOR3(enemy.x, enemy.y, enemy.z))
  497.                 DrawText(killstring[enemy.networkID], 20, pos.x - 35, pos.y - 10, 0xFFFFFF00)
  498.             end
  499.         end
  500.     end
  501.     if MenuBlitz.drawConfig.DQR and QReady then        
  502.         DrawCircle(myHero.x, myHero.y, myHero.z, Q.range, RGB(MenuBlitz.drawConfig.DQRC[2], MenuBlitz.drawConfig.DQRC[3], MenuBlitz.drawConfig.DQRC[4]))
  503.     end
  504.     if MenuBlitz.drawConfig.DRR and RReady then        
  505.         DrawCircle(myHero.x, myHero.y, myHero.z, R.range, RGB(MenuBlitz.drawConfig.DRRC[2], MenuBlitz.drawConfig.DRRC[3], MenuBlitz.drawConfig.DRRC[4]))
  506.     end
  507. end
  508.  
  509. function KillSteall()
  510.     for _, Enemy in pairs(GetEnemyHeroes()) do
  511.         local health = Enemy.health
  512.         local qDmg = getDmg("Q", Enemy, myHero, 1)
  513.         local eDmg = getDmg("E", Enemy, myHero, 1)
  514.         local rDmg = getDmg("R", Enemy, myHero, 3)
  515.         local iDmg = (50 + (20 * myHero.level))
  516.         if ValidTarget(Enemy, Q.range) and Enemy ~= nil and Enemy.team ~= player.team and not Enemy.dead and Enemy.visible then
  517.             if health < qDmg and MenuBlitz.ksConfig.QKS and GetDistance(Enemy) < Q.range then
  518.                 CastQ(Enemy)
  519.             elseif health < eDmg and MenuBlitz.ksConfig.EKS and GetDistance(Enemy) < E.range then
  520.                 CastE(Enemy)
  521.             elseif health < rDmg and MenuBlitz.ksConfig.RKS and GetDistance(Enemy) < R.range then
  522.                 CastR(Enemy)
  523.             elseif health < iDmg and MenuBlitz.ksConfig.IKS and IReady and GetDistance(Enemy) <= 600 then
  524.                 CastSpell(IgniteKey, Enemy)
  525.             elseif health < (qDmg + eDmg) and MenuBlitz.ksConfig.QKS and MenuBlitz.ksConfig.EKS and GetDistance(Enemy) < Q.range then
  526.                 CastQ(Enemy)
  527.                 CastE(Enemy)
  528.             elseif health < (qDmg + rDmg) and MenuBlitz.ksConfig.QKS and MenuBlitz.ksConfig.RKS and GetDistance(Enemy) < Q.range then
  529.                 CastQ(Enemy)
  530.                 CastR(Enemy)               
  531.             elseif health < (eDmg + rDmg) and MenuBlitz.ksConfig.EKS and MenuBlitz.ksConfig.RKS and GetDistance(Enemy) < E.range then
  532.                 CastE(Enemy)
  533.                 CastR(Enemy)   
  534.             elseif health < (qDmg + eDmg + rDmg) and MenuBlitz.ksConfig.QKS and MenuBlitz.ksConfig.EKS and MenuBlitz.ksConfig.RKS and GetDistance(Enemy) < Q.range then
  535.                 CastQ(Enemy)
  536.                 CastE(Enemy)
  537.                 CastR(Enemy)   
  538.             end
  539.         end
  540.     end
  541. end
  542.  
  543. function DmgCalc()
  544.     for _, enemy in pairs(GetEnemyHeroes()) do
  545.         if not enemy.dead and enemy.visible then
  546.             local qDmg = getDmg("Q", enemy, myHero, 1)
  547.             local eDmg = getDmg("E", enemy, myHero, 1)
  548.             local rDmg = getDmg("R", enemy, myHero, 3)
  549.             local iDmg = (50 + (20 * myHero.level))
  550.             if enemy.health > (qDmg + eDmg + rDmg) then
  551.                 killstring[enemy.networkID] = "Harass Him!!!"
  552.             elseif enemy.health < qDmg then
  553.                 killstring[enemy.networkID] = "Q Kill!"
  554.             elseif enemy.health < eDmg then
  555.                 killstring[enemy.networkID] = "E Kill!"
  556.             elseif enemy.health < rDmg then
  557.                 killstring[enemy.networkID] = "R Kill!"
  558.             elseif enemy.health < (qDmg + eDmg) then
  559.                 killstring[enemy.networkID] = "Q+E Kill!"
  560.             elseif enemy.health < (qDmg + rDmg) then
  561.                 killstring[enemy.networkID] = "Q+R Kill!"  
  562.             elseif enemy.health < (rDmg + eDmg) then
  563.                 killstring[enemy.networkID] = "R+E Kill!"  
  564.             elseif enemy.health < (qDmg + eDmg + rDmg) then
  565.                 killstring[enemy.networkID] = "Q+E+R Kill!"
  566.             end
  567.         end
  568.     end
  569. end
  570.  
  571. function CastQ(unit)
  572.     if QReady and GetDistance(unit) - getHitBoxRadius(unit)/2 < Q.range then
  573.         if MenuBlitz.prConfig.pro == 1 then
  574.             if MenuBlitz.comboConfig.USEQS then
  575.                 local willCollide1, ColTable2 = GetMinionCollisionM(unit, myHero)
  576.                 if #ColTable2 == 1 and SReady and GetDistance(myHero, ColTable2[1]) < 800 then
  577.                     CastSpell(SmiteKey, ColTable2[1])
  578.                 end
  579.             end
  580.             local CastPosition,  HitChance,  Position = VP:GetLineCastPosition(unit, Q.delay, Q.width, Q.range, Q.speed, myHero, true)
  581.             if HitChance >= MenuBlitz.prConfig.vphit - 1 then
  582.                 if VIP_USER and MenuBlitz.prConfig.pc then
  583.                     Packet("S_CAST", {spellId = _Q, fromX = CastPosition.x, fromY = CastPosition.z, toX = CastPosition.x, toY = CastPosition.z}):send()
  584.                 else
  585.                     CastSpell(_Q, CastPosition.x, CastPosition.z)
  586.                 end
  587.             end
  588.         end
  589.         if MenuBlitz.prConfig.pro == 2 and VIP_USER and prodstatus then
  590.             if MenuBlitz.comboConfig.USEQS then
  591.                 local Position = ProdictQ:GetPrediction(unit)
  592.                 local willCollide, ColTable = ProdictQCol:GetMinionCollision(Position, myHero)
  593.                 if #ColTable == 1 and SReady and GetDistance(myHero, ColTable[1]) < 800 then
  594.                     CastSpell(SmiteKey, ColTable[1])
  595.                 end
  596.             end
  597.             if Position ~= nil and not willCollide then
  598.                 if VIP_USER and MenuBlitz.prConfig.pc then
  599.                     Packet("S_CAST", {spellId = _Q, fromX = Position.x, fromY = Position.z, toX = Position.x, toY = Position.z}):send()
  600.                 else
  601.                     CastSpell(_Q, Position.x, Position.z)
  602.                 end
  603.             end
  604.         end
  605.     end
  606. end
  607.  
  608. function CastW()
  609.     if WReady then
  610.         if VIP_USER and MenuBlitz.prConfig.pc then
  611.             Packet("S_CAST", {spellId = _W}):send()
  612.         else
  613.             CastSpell(_W)
  614.         end
  615.     end
  616. end
  617.  
  618. function CastE(unit)
  619.     if EReady and GetDistance(unit) < E.range then
  620.         if VIP_USER and MenuBlitz.prConfig.pc then
  621.             Packet("S_CAST", {spellId = _E}):send()
  622.             myHero:Attack(unit)
  623.         else
  624.             CastSpell(_E)
  625.             myHero:Attack(unit)
  626.         end
  627.     end
  628. end
  629.  
  630. function CastR(unit)
  631.     if RReady and GetDistance(unit) - getHitBoxRadius(unit)/2 < R.range then
  632.         if VIP_USER and MenuBlitz.prConfig.pc then
  633.             Packet("S_CAST", {spellId = _R}):send()
  634.         else
  635.             CastSpell(_R)
  636.         end
  637.     end
  638. end
  639.  
  640. function OnProcessSpell(object, spell)
  641.     if MenuBlitz.exConfig.UI then
  642.         if object and object.team ~= myHero.team and object.type == myHero.type and spell then
  643.             if Counterspells[spell.name] or spell.name == "Meditate" or spell.name == "Teleport" then
  644.                 CastR(object)
  645.             end
  646.         end
  647.     end
  648. end
  649.  
  650. function GenModelPacket(champ, skinId)
  651.     p = CLoLPacket(0x97)
  652.     p:EncodeF(myHero.networkID)
  653.     p.pos = 1
  654.     t1 = p:Decode1()
  655.     t2 = p:Decode1()
  656.     t3 = p:Decode1()
  657.     t4 = p:Decode1()
  658.     p:Encode1(t1)
  659.     p:Encode1(t2)
  660.     p:Encode1(t3)
  661.     p:Encode1(bit32.band(t4,0xB))
  662.     p:Encode1(1)--hardcode 1 bitfield
  663.     p:Encode4(skinId)
  664.     for i = 1, #champ do
  665.         p:Encode1(string.byte(champ:sub(i,i)))
  666.     end
  667.     for i = #champ + 1, 64 do
  668.         p:Encode1(0)
  669.     end
  670.     p:Hide()
  671.     RecvPacket(p)
  672. end
  673.  
  674. function OnWndMsg(Msg, Key)
  675.     if Msg == WM_LBUTTONDOWN and MenuBlitz.comboConfig.ST then
  676.         local dist = 0
  677.         local Selecttarget = nil
  678.         for i, enemy in ipairs(GetEnemyHeroes()) do
  679.             if ValidTarget(enemy) then
  680.                 if GetDistance(enemy, mousePos) <= dist or Selecttarget == nil then
  681.                     dist = GetDistance(enemy, mousePos)
  682.                     Selecttarget = enemy
  683.                 end
  684.             end
  685.         end
  686.         if Selecttarget and dist < 300 then
  687.             if SelectedTarget and Selecttarget.charName == SelectedTarget.charName then
  688.                 SelectedTarget = nil
  689.                 if MenuBlitz.comboConfig.ST then
  690.                     print("Target unselected: "..Selecttarget.charName)
  691.                 end
  692.             else
  693.                 SelectedTarget = Selecttarget
  694.                 if MenuBlitz.comboConfig.ST then
  695.                     print("New target selected: "..Selecttarget.charName)
  696.                 end
  697.             end
  698.         end
  699.     end
  700. end
  701.  
  702. function SetPriority(table, hero, priority)
  703.     for i=1, #table, 1 do
  704.         if hero.charName:find(table[i]) ~= nil then
  705.             TS_SetHeroPriority(priority, hero.charName)
  706.         end
  707.     end
  708. end
  709.  
  710. function arrangePrioritysTT()
  711.     for i, enemy in ipairs(GetEnemyHeroes()) do
  712.         SetPriority(TargetTable.AD_Carry, enemy, 1)
  713.         SetPriority(TargetTable.AP,       enemy, 1)
  714.         SetPriority(TargetTable.Support,  enemy, 2)
  715.         SetPriority(TargetTable.Bruiser,  enemy, 2)
  716.         SetPriority(TargetTable.Tank,     enemy, 3)
  717.     end
  718. end
  719.  
  720. function arrangePrioritys()
  721.     for i, enemy in ipairs(GetEnemyHeroes()) do
  722.         SetPriority(TargetTable.AD_Carry, enemy, 1)
  723.         SetPriority(TargetTable.AP, enemy, 2)
  724.         SetPriority(TargetTable.Support, enemy, 3)
  725.         SetPriority(TargetTable.Bruiser, enemy, 4)
  726.         SetPriority(TargetTable.Tank, enemy, 5)
  727.     end
  728. end
  729.  
  730. function DrawCircleNextLvl(x, y, z, radius, width, color, chordlength)
  731.   radius = radius or 300
  732.   quality = math.max(8,round(180/math.deg((math.asin((chordlength/(2*radius)))))))
  733.   quality = 2 * math.pi / quality
  734.   radius = radius*.92
  735.  
  736.   local points = {}
  737.   for theta = 0, 2 * math.pi + quality, quality do
  738.     local c = WorldToScreen(D3DXVECTOR3(x + radius * math.cos(theta), y, z - radius * math.sin(theta)))
  739.     points[#points + 1] = D3DXVECTOR2(c.x, c.y)
  740.   end
  741.  
  742.   DrawLines2(points, width or 1, color or 4294967295)
  743. end
  744.  
  745. function round(num)
  746.   if num >= 0 then return math.floor(num+.5) else return math.ceil(num-.5) end
  747. end
  748.  
  749. function DrawCircle2(x, y, z, radius, color)
  750.   local vPos1 = Vector(x, y, z)
  751.   local vPos2 = Vector(cameraPos.x, cameraPos.y, cameraPos.z)
  752.   local tPos = vPos1 - (vPos1 - vPos2):normalized() * radius
  753.   local sPos = WorldToScreen(D3DXVECTOR3(tPos.x, tPos.y, tPos.z))
  754.  
  755.   if OnScreen({ x = sPos.x, y = sPos.y }, { x = sPos.x, y = sPos.y }) then
  756.     DrawCircleNextLvl(x, y, z, radius, 1, color, 75)
  757.   end
  758. end
  759.  
  760.  
  761. -- FROM Collision 1.1.1 by Klokje Mod by Boboben1 --
  762. function GetMinionCollisionM(pStart, pEnd)
  763.     EnemyMinions:update()
  764.     local distance =  GetDistance(pStart, pEnd)
  765.     local prediction = TargetPrediction(Q.range, Q.speed/1000, Q.delay*1000, Q.width)
  766.     local mCollision = {}
  767.     if distance > Q.range then
  768.         distance = Q.range
  769.     end
  770.     local V = Vector(pEnd) - Vector(pStart)
  771.     local k = V:normalized()
  772.     local P = V:perpendicular2():normalized()
  773.     local t,i,u = k:unpack()
  774.     local x,y,z = P:unpack()
  775.     local startLeftX = pStart.x + (x *Q.width)
  776.     local startLeftY = pStart.y + (y *Q.width)
  777.     local startLeftZ = pStart.z + (z *Q.width)
  778.     local endLeftX = pStart.x + (x * Q.width) + (t * distance)
  779.     local endLeftY = pStart.y + (y * Q.width) + (i * distance)
  780.     local endLeftZ = pStart.z + (z * Q.width) + (u * distance)
  781.     local startRightX = pStart.x - (x * Q.width)
  782.     local startRightY = pStart.y - (y * Q.width)
  783.     local startRightZ = pStart.z - (z * Q.width)
  784.     local endRightX = pStart.x - (x * Q.width) + (t * distance)
  785.     local endRightY = pStart.y - (y * Q.width) + (i * distance)
  786.     local endRightZ = pStart.z - (z * Q.width)+ (u * distance)
  787.     local startLeft = WorldToScreen(D3DXVECTOR3(startLeftX, startLeftY, startLeftZ))
  788.     local endLeft = WorldToScreen(D3DXVECTOR3(endLeftX, endLeftY, endLeftZ))
  789.     local startRight = WorldToScreen(D3DXVECTOR3(startRightX, startRightY, startRightZ))
  790.     local endRight = WorldToScreen(D3DXVECTOR3(endRightX, endRightY, endRightZ))
  791.     local poly = Polygon(Point(startLeft.x, startLeft.y),  Point(endLeft.x, endLeft.y), Point(startRight.x, startRight.y),   Point(endRight.x, endRight.y))
  792.     for index, minion in pairs(EnemyMinions.objects) do
  793.         if minion ~= nil and minion.valid and not minion.dead then
  794.             if GetDistance(pStart, minion) < distance then
  795.                 local pos, t, vec = prediction:GetPrediction(minion)
  796.                 local lineSegmentLeft = LineSegment(Point(startLeftX,startLeftZ), Point(endLeftX, endLeftZ))
  797.                 local lineSegmentRight = LineSegment(Point(startRightX,startRightZ), Point(endRightX, endRightZ))
  798.                 local toScreen, toPoint
  799.                 if pos ~= nil then
  800.                     toScreen = WorldToScreen(D3DXVECTOR3(minion.x, minion.y, minion.z))
  801.                     toPoint = Point(toScreen.x, toScreen.y)
  802.                 else
  803.                     toScreen = WorldToScreen(D3DXVECTOR3(minion.x, minion.y, minion.z))
  804.                     toPoint = Point(toScreen.x, toScreen.y)
  805.                 end
  806.                 if poly:contains(toPoint) then
  807.                     table.insert(mCollision, minion)
  808.                 else
  809.                     if pos ~= nil then
  810.                         distance1 = Point(pos.x, pos.z):distance(lineSegmentLeft)
  811.                         distance2 = Point(pos.x, pos.z):distance(lineSegmentRight)
  812.                     else
  813.                         distance1 = Point(minion.x, minion.z):distance(lineSegmentLeft)
  814.                         distance2 = Point(minion.x, minion.z):distance(lineSegmentRight)
  815.                     end
  816.                     if (distance1 < (getHitBoxRadius2(minion)*2+10) or distance2 < (getHitBoxRadius2(minion) *2+10)) then
  817.                         table.insert(mCollision, minion)
  818.                     end
  819.                 end
  820.             end
  821.         end
  822.     end
  823.     if #mCollision > 0 then return true, mCollision else return false, mCollision end
  824. end
  825.  
  826. function getHitBoxRadius2(target)
  827.     return GetDistance(target, target.minBBox)/2
  828. end
Advertisement
Add Comment
Please, Sign In to add comment