Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Auto Carry Plugin - Lucian Edition
- Author: Kain
- Version: 1.0 Alpha
- Copyright 2013
- Dependency: Sida's Auto Carry: Revamped
- How to install:
- Make sure you already have AutoCarry installed.
- Name the script EXACTLY "SidasAutoCarryPlugin - Lucian.lua" without the quotes.
- Place the plugin in BoL/Scripts/Common folder.
- --]]
- if myHero.charName ~= "Lucian" then return end
- local Target
- -- Prediction
- local QRange = 550
- local QMaxRange = 1100
- local WRange = 900
- local ERange = 425
- local RRange = 1400
- -- Speeds and widths need refining.
- local QSpeed = 1.3
- local WSpeed = 1.3
- local ESpeed = 1.3
- local RSpeed = 1.3
- local QWidth = 250
- local WWidth = 250
- local EWidth = 0
- local RWidth = 250
- local SkillQ = {spellKey = _Q, range = QRange, speed = QSpeed, delay = 0, width = QWidth, configName = "piercinglight", displayName = "Q (Piercing Light)", enabled = true, skillShot = true, minions = false, reset = false, reqTarget = true }
- local SkillW = {spellKey = _W, range = WRange, speed = WSpeed, delay = 0, width = WWidth, configName = "ardentblaze", displayName = "W (Ardent Blaze)", enabled = true, skillShot = true, minions = false, reset = false, reqTarget = false }
- local SkillE = {spellKey = _E, range = ERange, speed = ESpeed, delay = 0, width = EWidth, configName = "relentlesspursuit", displayName = "E (Relentless Pursuit)", enabled = true, skillShot = true, minions = false, reset = false, reqTarget = false }
- local SkillR = {spellKey = _R, range = RRange, speed = RSpeed, delay = 0, width = RWidth, configName = "theculling", displayName = "R (The Culling)", enabled = true, skillShot = true, minions = false, reset = false, reqTarget = true }
- function PluginOnLoad()
- Menu()
- end
- function Menu()
- -- AutoCarry.PluginMenu:addParam("fullcombo", "Full Combo", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("Z"))
- AutoCarry.PluginMenu:addParam("harass", "Harass", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("A"))
- AutoCarry.PluginMenu:addParam("ultimate", "Use Ultimate with Combo", SCRIPT_PARAM_ONOFF, true)
- AutoCarry.PluginMenu:addParam("killsteal", "Killsteal", SCRIPT_PARAM_ONOFF, true)
- AutoCarry.PluginMenu:addParam("draw", "Draw range circles", SCRIPT_PARAM_ONOFF, true)
- end
- function PluginOnTick()
- Target = AutoCarry.GetAttackTarget(true)
- SpellCheck()
- if (AutoCarry.MainMenu.AutoCarry or AutoCarry.MainMenu.MixedMode) then
- Combo()
- end
- if AutoCarry.PluginMenu.fullcombo then
- FullCombo()
- end
- if AutoCarry.PluginMenu.harass then
- Harass()
- end
- if AutoCarry.PluginMenu.killsteal then
- KillSteal()
- end
- end
- function PluginOnCreateObj(obj)
- -- Nothing to do here.
- end
- function PluginOnDeleteObj(obj)
- -- Nothing to do here.
- end
- function OnAttacked()
- -- AA > Q > AA
- CastQ()
- end
- function CustomAttackEnemy(enemy)
- if enemy.dead or not enemy.valid then return end
- if axesActive() and GetDistance(mousePos) <= DravenConfig.CatchRange then
- if qStacks < 2 then CastSpell(_Q) end
- end
- myHero:Attack(enemy)
- AutoCarry.shotFired = true
- end
- function SpellCheck()
- DFGSlot, HXGSlot, BWCSlot, BRKSlot, SheenSlot, TrinitySlot, LichBaneSlot = GetInventorySlotItem(3128),
- GetInventorySlotItem(3146), GetInventorySlotItem(3144), GetInventorySlotItem(3153), GetInventorySlotItem(3057),
- GetInventorySlotItem(3078), GetInventorySlotItem(3100)
- QReady = (myHero:CanUseSpell(SkillQ.spellKey) == READY)
- WReady = (myHero:CanUseSpell(SkillW.spellKey) == READY)
- EReady = (myHero:CanUseSpell(SkillE.spellKey) == READY)
- RReady = (myHero:CanUseSpell(SkillR.spellKey) == READY)
- DFGReady = (DFGSlot ~= nil and myHero:CanUseSpell(DFGSlot) == READY)
- HXGReady = (HXGSlot ~= nil and myHero:CanUseSpell(HXGSlot) == READY)
- BWCReady = (BWCSlot ~= nil and myHero:CanUseSpell(BWCSlot) == READY)
- BRKReady = (BRKSlot ~= nil and myHero:CanUseSpell(BRKSlot) == READY)
- IReady = (ignite ~= nil and myHero:CanUseSpell(ignite) == READY)
- end
- -- Handle SBTW Skill Shots
- function Combo()
- CastSlots()
- CastE()
- CastQ()
- CastW()
- if AutoCarry.PluginMenu.ultimate then
- CastR()
- end
- end
- --[[
- function FullCombo()
- CastSlots()
- CastE()
- CastQ()
- CastW()
- if AutoCarry.PluginMenu.ultimate then
- CastR()
- end
- end
- ]]--
- function CastSlots()
- if Target ~= nil then
- if GetDistance(Target) <= QRange then
- if DFGReady then CastSpell(DFGSlot, Target) end
- if HXGReady then CastSpell(HXGSlot, Target) end
- if BWCReady then CastSpell(BWCSlot, Target) end
- if BRKReady then CastSpell(BRKSlot, Target) end
- end
- end
- end
- function Harass()
- CastQ()
- end
- function CastQ()
- -- Q (Piercing Light)
- if Target ~= nil and QReady and ValidTarget(Target, QRange) then
- CastSpell(SpellQ.spellKey, Target)
- end
- end
- function CastW()
- -- W (Ardent Blaze)
- if Target ~= nil and WReady and ValidTarget(Target, WRange) then
- AutoCarry.CastSkillshot(SkillW, Target)
- end
- end
- function CastE()
- -- E (Relentless Pursuit)
- if EReady then
- CastSpell(SkillE.spellKey, mousePos.x, mousePos.z)
- end
- end
- function CastR()
- -- R (The Culling)
- if Target ~= nil and RReady and ValidTarget(Target, RRange) then
- AutoCarry.CastSkillshot(SkillR, Target)
- end
- end
- function KillSteal()
- -- Will try to perform a killsteam using any spell.
- for _, enemy in pairs(AutoCarry.EnemyTable) do
- if ValidTarget(enemy, RRange) then
- if QReady and enemy.health < getDmg("Q", enemy, myHero) then
- CastSpell(SpellQ.spellKey, enemy)
- elseif WReady and enemy.health < getDmg("W", enemy, myHero) then
- AutoCarry.CastSkillshot(SkillW, enemy)
- elseif RReady and enemy.health < getDmg("R", enemy, myHero) then
- AutoCarry.CastSkillshot(SkillR, enemy)
- end
- end
- end
- end
- function PluginOnWndMsg(msg,key)
- Target = AutoCarry.GetAttackTarget()
- if Target ~= nil then
- -- if msg == KEY_DOWN and key == KeyQ then CastQ() end
- if msg == KEY_DOWN and key == KeyW then CastW() end
- if msg == KEY_DOWN and key == KeyE then CastE() end
- if msg == KEY_DOWN and key == KeyR then CastR() end
- end
- end
- -- Drawing
- function PluginOnDraw()
- if AutoCarry.PluginMenu.draw then
- DrawCircle(myHero.x, myHero.y, myHero.z, AutoCarry.SkillsCrosshair.range, 0x808080) -- Gray
- if myHero:CanUseSpell(SkillQ.spellKey) then
- DrawCircle(myHero.x, myHero.y, myHero.z, QRange, 0x0099CC) -- Blue
- end
- if myHero:CanUseSpell(SkillW.spellKey) then
- DrawCircle(myHero.x, myHero.y, myHero.z, WRange, 0xFFFF00) -- Yellow
- end
- if myHero:CanUseSpell(SkillE.spellKey) then
- DrawCircle(myHero.x, myHero.y, myHero.z, ERange, 0x00FF00) -- Green
- end
- if myHero:CanUseSpell(SkillR.spellKey) then
- DrawCircle(myHero.x, myHero.y, myHero.z, RRange, 0xFF0000) -- Red
- end
- Target = AutoCarry.GetAttackTarget()
- if Target ~= nil then
- for j=0, 10 do
- DrawCircle(Target.x, Target.y, Target.z, 40 + j*1.5, 0x00FF00) -- Green
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment