roach_

[1.0b] SidasAutoCarryPlugin - Blitzcrank

Nov 27th, 2013
3,995
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[
  2.  
  3.         Auto Carry Plugin - Blitzcrank Edition
  4.         Author: Roach_
  5.         Version: 1.0b
  6.         Copyright 2013
  7.  
  8.         Dependency: Sida's Auto Carry: Revamped
  9.  
  10.         How to install:
  11.             Make sure you already have AutoCarry installed.
  12.             Name the script EXACTLY "SidasAutoCarryPlugin - Blitzcrank.lua" without the quotes.
  13.             Place the plugin in BoL/Scripts/Common folder.
  14.  
  15.         Features:
  16.             Combo with Autocarry
  17.             Fully supports Q with movement/attack disable
  18.             Killsteal with R
  19.             Stop enemy ultimates with R
  20.             Draw Q and R Range
  21.             Escape Artist(with Flash)
  22.  
  23.         History:
  24.             Version: 1.0b
  25.                 Fixed Errors
  26.                 Fixed Prediction
  27.                 No more grabing minions
  28.        
  29.             Version: 1.0a
  30.                 First release
  31. --]]
  32. if myHero.charName ~= "Blitzcrank" then return end
  33.  
  34. local Target
  35. local bEscapeHotkey = string.byte("T")
  36.  
  37. -- Prediction
  38. local aRange, qRange, rRange = 125, 1050, 600
  39.  
  40. local FlashSlot = nil
  41.  
  42. local bPred = nil
  43.  
  44. local SkillQ = {spellKey = _Q, range = qRange, speed = 1.8, delay = 0, width = 120, configName = "rocketGrab", displayName = "Q (Rocket Grab)", enabled = true, skillShot = true, minions = true, reset = false, reqTarget = true }
  45. local SkillW = {spellKey = _W, range = 0, speed = 2, delay = 0, width = 75, configName = "overdrive", displayName = "W (Overdrive)", enabled = true, skillShot = false, minions = false, reset = false, reqTarget = false }
  46. local SkillE = {spellKey = _E, range = eRange, speed = 2, delay = 0, width = 25, configName = "powerFist", displayName = "E (Power Fist)", enabled = true, skillShot = false, minions = false, reset = false, reqTarget = true }
  47.  
  48. local QReady, WReady, EReady, RReady, FlashReady = false, false, false, false, false
  49.  
  50. function PluginOnLoad()
  51.     -- Params
  52.     AutoCarry.PluginMenu:addParam("bCombo", "Use Combo With Auto Carry", SCRIPT_PARAM_ONOFF, true)
  53.     AutoCarry.PluginMenu:addParam("bWC", "Use W in Combo", SCRIPT_PARAM_ONOFF, false)
  54.     AutoCarry.PluginMenu:addParam("bUltSilence", "Silence Enemy Ultimates", SCRIPT_PARAM_ONOFF, false)
  55.     AutoCarry.PluginMenu:addParam("bKillsteal", "Killsteal with Ultimate", SCRIPT_PARAM_ONOFF, true)
  56.     AutoCarry.PluginMenu:addParam("bDQR", "Draw Q Range", SCRIPT_PARAM_ONOFF, true)
  57.     AutoCarry.PluginMenu:addParam("bDRR", "Draw Ultimate Range", SCRIPT_PARAM_ONOFF, false)
  58.     AutoCarry.PluginMenu:addParam("bEscape", "Escape Artist", SCRIPT_PARAM_ONKEYDOWN, false, bEscapeHotkey)
  59.     AutoCarry.PluginMenu:addParam("bEscapeFlash", "Escape: Flash to Mouse", SCRIPT_PARAM_ONOFF, false)
  60.    
  61.     -- Range
  62.     AutoCarry.SkillsCrosshair.range = qRange
  63.    
  64.     lastAnimation = nil
  65. end
  66.  
  67.  
  68. function PluginOnTick()
  69.     -- Get Attack Target
  70.     Target = AutoCarry.GetAttackTarget()
  71.  
  72.     -- Check Spells
  73.     bSpellCheck()
  74.  
  75.     -- Check if myHero is using _Q
  76.     if isChanneling("Spell1") then
  77.         AutoCarry.CanAttack = false
  78.         AutoCarry.CanMove = false
  79.     else
  80.         AutoCarry.CanAttack = true
  81.         AutoCarry.CanMove = true
  82.     end
  83.  
  84.     -- Combo, Ultimate Silence, Killsteal, Escape Combo - Checks
  85.     if AutoCarry.PluginMenu.bCombo and AutoCarry.MainMenu.AutoCarry then bCombo() end
  86.     if AutoCarry.PluginMenu.bUltSilence then bUltCombo() end
  87.     if AutoCarry.PluginMenu.bKillsteal then bKillsteal() end
  88.     if AutoCarry.PluginMenu.bEscape then bEscapeCombo() end
  89. end
  90.  
  91. function PluginOnDraw()
  92.     -- Draw Blitzcrank's Ranges = 1050, 600
  93.     if not myHero.dead and AutoCarry.PluginMenu.bDQR then
  94.         DrawCircle(myHero.x, myHero.y, myHero.z, qRange, 0x00FF00)
  95.     end
  96.     if not myHero.dead and AutoCarry.PluginMenu.bDRR then
  97.         DrawCircle(myHero.x, myHero.y, myHero.z, rRange, 0xFF0000)
  98.     end
  99. end
  100.  
  101. function PluginOnAnimation(unit, animationName)
  102.     -- Set lastAnimation = Last Animation used
  103.     if unit.isMe and lastAnimation ~= animationName then lastAnimation = animationName end
  104.    
  105.     if AutoCarry.PluginMenu.bUltSilence and ValidTarget(unit) and unit.team == TEAM_ENEMY and RReady and GetDistance(unit) <= (rRange-10) then
  106.         if spell.name == "KatarinaR"                or  spell.name == "GalioIdolOfDurand"           or  spell.name == "Crowstorm"           or  spell.name == "DrainChannel"
  107.         or spell.name == "AbsoluteZero"             or  spell.name == "ShenStandUnited"             or  spell.name == "UrgotSwap2"          or  spell.name =="AlZaharNetherGrasp"
  108.         or spell.name == "FallenOne"                or  spell.name == "Pantheon_GrandSkyfall_Jump"  or  spell.name == "CaitlynAceintheHole" or  spell.name == "MissFortuneBulletTime"
  109.         or spell.name == "InfiniteDuress"           or  spell.name == "Teleport"                    or  spell.name == "Meditate" then
  110.             CastSpell(_R, unit)
  111.         end
  112.     end
  113. end
  114.  
  115. -- Custom Functions
  116. function bCombo()
  117.     if ValidTarget(Target) then
  118.         if QReady and GetDistance(Target) < (qRange-25) then
  119.             bSkillshot(SkillQ, Target)
  120.         end
  121.        
  122.         if WReady and AutoCarry.PluginMenu.bWC then
  123.             CastSpell(SkillW.spellKey)
  124.         end
  125.        
  126.         if EReady then
  127.             CastSpell(SkillE.spellKey)
  128.         end
  129.     end
  130. end
  131.  
  132. function bKillsteal()
  133.     for _, enemy in pairs(AutoCarry.EnemyTable) do
  134.         if ValidTarget(enemy) and GetDistance(enemy) < rRange and enemy.health < (getDmg("R", enemy, myHero)) then
  135.             CastSpell(_R)
  136.         end
  137.     end
  138. end
  139.  
  140. function bEscapeCombo()
  141.     if QReady and GetDistance(Target) < (qRange-25) then
  142.         bSkillshot(SkillQ, Target)
  143.         CastSpell(SkillE.spellKey)
  144.         if AutoCarry.PluginMenu.bEscapeFlash and FlashReady and GetDistance(mousePos) > 300 and isChanneling("Attack") then
  145.             CastSpell(FlashSlot, mousePos.x, mousePos.z)
  146.         end
  147.     end
  148.    
  149.     if AutoCarry.PluginMenu.bEscapeFlash then
  150.         CastSpell(SkillW.spellKey)
  151.         myHero:MoveTo(mousePos.x, mousePos.z)
  152.     end
  153. end
  154.  
  155. function isChanneling(animationName)
  156.     if lastAnimation == animationName then
  157.         return true
  158.     else
  159.         return false
  160.     end
  161. end
  162.  
  163. function bSpellCheck()
  164.     if myHero:GetSpellData(SUMMONER_1).name:find("SummonerFlash") then
  165.         FlashSlot = SUMMONER_1
  166.     elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerFlash") then
  167.         FlashSlot = SUMMONER_2
  168.     end
  169.  
  170.     QReady = (myHero:CanUseSpell(SkillQ.spellKey) == READY)
  171.     WReady = (myHero:CanUseSpell(SkillW.spellKey) == READY)
  172.     EReady = (myHero:CanUseSpell(SkillE.spellKey) == READY)
  173.     RReady = (myHero:CanUseSpell(_R) == READY)
  174.  
  175.     FlashReady = (FlashSlot ~= nil and myHero:CanUseSpell(FlashSlot) == READY)
  176. end
  177.  
  178. function bSkillshot(spell, target)
  179.     if not AutoCarry.GetCollision(spell, myHero, target) then
  180.         AutoCarry.CastSkillshot(spell, target)
  181.     end
  182. end
  183.  
  184. --UPDATEURL=https://raw.github.com/RoachxD/BoL_Scripts/master/Common/SidasAutoCarryPlugin%20-%20Blitzcrank.lua
  185. --HASH=70B1EBC9449E4FA774112516F4BD2DB3
Advertisement
Add Comment
Please, Sign In to add comment