Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if myHero.charName ~= "Morgana" then return end
- require 'VPrediction'
- function Menu()
- AutoCarry.PluginMenu:addParam("co", "-- Combo Options --", SCRIPT_PARAM_INFO, "")
- AutoCarry.PluginMenu:addParam("USEQ", "Use Q in Combo", SCRIPT_PARAM_ONOFF, true)
- AutoCarry.PluginMenu:addParam("USEW", "Use W in Combo", SCRIPT_PARAM_ONOFF, true)
- AutoCarry.PluginMenu:addParam("USEE", "Use E in Combo", SCRIPT_PARAM_ONOFF, true)
- AutoCarry.PluginMenu:addParam("USER", "Use R in Combo", SCRIPT_PARAM_ONOFF, true)
- AutoCarry.PluginMenu:addParam("ENEMYTOR", "Min Enemies to Cast R: ", SCRIPT_PARAM_SLICE, 2, 1, 5, 0)
- AutoCarry.PluginMenu:addParam("co", "-- End Combo Options --", SCRIPT_PARAM_INFO, "")
- AutoCarry.PluginMenu:addParam("aa", "", SCRIPT_PARAM_INFO, "")
- AutoCarry.PluginMenu:addParam("ko", "-- KS Options --", SCRIPT_PARAM_INFO, "")
- AutoCarry.PluginMenu:addParam("IGN", "KS Ignite", SCRIPT_PARAM_ONOFF, true)
- AutoCarry.PluginMenu:addParam("KSQ", "KS Q", SCRIPT_PARAM_ONOFF, true)
- AutoCarry.PluginMenu:addParam("KSW", "KS W", SCRIPT_PARAM_ONOFF, true)
- AutoCarry.PluginMenu:addParam("KSULT", "KS R", SCRIPT_PARAM_ONOFF, true)
- AutoCarry.PluginMenu:addParam("ko", "-- End KS Options --", SCRIPT_PARAM_INFO, "")
- AutoCarry.PluginMenu:addParam("aa", "", SCRIPT_PARAM_INFO, "")
- AutoCarry.PluginMenu:addParam("ho", "-- Harras Options --", SCRIPT_PARAM_INFO, "")
- AutoCarry.PluginMenu:addParam("HQ", "Harras enemy Q", SCRIPT_PARAM_ONOFF, true)
- AutoCarry.PluginMenu:addParam("MINMPTOQ", "Min % MP To Harras Q", SCRIPT_PARAM_SLICE, 70, 0, 100, 2)
- AutoCarry.PluginMenu:addParam("HW", "Harras enemy W", SCRIPT_PARAM_ONOFF, true)
- AutoCarry.PluginMenu:addParam("MINMPTOW", "Min % MP To Harras W", SCRIPT_PARAM_SLICE, 70, 0, 100, 2)
- AutoCarry.PluginMenu:addParam("ho", "-- End Harras Options --", SCRIPT_PARAM_INFO, "")
- end
- function PluginOnLoad()
- Menu()
- VP = VPrediction()
- IgniteKey = nil;
- if myHero:GetSpellData(SUMMONER_1).name:find("SummonerDot") then
- IgniteKey = SUMMONER_1
- elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerDot") then
- IgniteKey = SUMMONER_2
- else
- IgniteKey = nil
- end
- end
- function PluginOnTick()
- Target = AutoCarry.GetAttackTarget()
- QReady = (myHero:CanUseSpell(_Q) == READY)
- WReady = (myHero:CanUseSpell(_W) == READY)
- EReady = (myHero:CanUseSpell(_E) == READY)
- RReady = ((myHero:CanUseSpell(_R) ~= NOTLEARNED) and (myHero:CanUseSpell(_R) ~= COOLDOWN))
- IReady = (ignite ~= nil and myHero:CanUseSpell(ignite) == READY)
- if AutoCarry.MainMenu.AutoCarry and Target ~= nil then
- if AutoCarry.PluginMenu.USEQ then
- CastQ()
- end
- if AutoCarry.PluginMenu.USEW then
- CastW()
- end
- if AutoCarry.PluginMenu.USEE then
- CastE()
- end
- if AutoCarry.PluginMenu.USER then
- CastR()
- end
- end
- if AutoCarry.PluginMenu.KSQ and QReady then
- players = heroManager.iCount
- for i = 1, players, 1 do
- target = heroManager:getHero(i)
- qDmg = getDmg("Q", myHero, target)
- if target ~= nil and target.team ~= player.team and not target.dead then
- if QReady and qDmg > target.health then
- qRange, qDelay, qSpeed, qWidth = 1300, 150, 1200, 70
- local CastPosition, HitChance, Position = VP:GetLineCastPosition(target, qDelay, qWidth, qRange, qSpeed, myHero, true)
- if HitChance >= 2 then
- CastSpell(_Q, CastPosition.x, CastPosition.z)
- return
- end
- end
- end
- end
- end
- if AutoCarry.PluginMenu.KSW and WReady then
- players = heroManager.iCount
- for i = 1, players, 1 do
- target = heroManager:getHero(i)
- wDmg = getDmg("W", myHero, target)
- if target ~= nil and target.team ~= player.team and not target.dead then
- if WReady and wDmg > target.health then
- wRange, wDelay, wSpeed, wWidth = 900, 150, 1200, 105
- local CastPosition, HitChance, Position = VP:GetCircularCastPosition(target, wDelay, wWidth, wRange, wSpeed, myHero, false)
- if CastPosition and not target.canMove and HitChance >= 2 then
- CastSpell(_W, CastPosition.x, CastPosition.z)
- return
- end
- end
- end
- end
- end
- if AutoCarry.PluginMenu.KSULT and RReady then
- players = heroManager.iCount
- for i = 1, players, 1 do
- target = heroManager:getHero(i)
- rDmg = getDmg("R", myHero, target)
- if target ~= nil and target.team ~= player.team and not target.dead then
- if RReady and rDmg > target.health then
- CastSpell(_R)
- end
- end
- end
- end
- if AutoCarry.PluginMenu.KSIGNITE and IgniteKey ~= nil then
- players = heroManager.iCount
- for i = 1, players, 1 do
- target = heroManager:getHero(i)
- iDmg = getDmg("IGNITE", myHero, Target)
- if target ~= nil and target.team ~= player.team and not target.dead then
- if IReady and iDmg > target.health then
- CastSpell(IgniteKey, target)
- end
- end
- end
- end
- if AutoCarry.PluginMenu.HQ and QReady and ((myHero.mana/myHero.maxMana)*100) > AutoCarry.PluginMenu.MINMPTOQ then
- players = heroManager.iCount
- for i = 1, players, 1 do
- target = heroManager:getHero(i)
- if target ~= nil and target.team ~= player.team and not target.dead then
- qRange, qDelay, qSpeed, qWidth = 1300, 150, 1200, 70
- local CastPosition, HitChance, Position = VP:GetLineCastPosition(target, qDelay, qWidth, qRange, qSpeed, myHero, true)
- if HitChance >= 2 then
- CastSpell(_Q, CastPosition.x, CastPosition.z)
- return
- end
- end
- end
- end
- if AutoCarry.PluginMenu.HW and WReady and ((myHero.mana/myHero.maxMana)*100) > AutoCarry.PluginMenu.MINMPTOW then
- players = heroManager.iCount
- for i = 1, players, 1 do
- target = heroManager:getHero(i)
- if target ~= nil and target.team ~= player.team and not target.dead then
- wRange, wDelay, wSpeed, wWidth = 900, 150, 1200, 105
- local CastPosition, HitChance, Position = VP:GetCircularCastPosition(target, wDelay, wWidth, wRange, wSpeed, myHero, false)
- if CastPosition and HitChance >= 2 then
- CastSpell(_W, CastPosition.x, CastPosition.z)
- return
- end
- end
- end
- end
- end
- function CastQ()
- if QReady and AutoCarry.PluginMenu.USEQ and Target.canMove then
- qRange, qDelay, qSpeed, qWidth = 1300, 150, 1200, 70
- local CastPosition, HitChance, Position = VP:GetLineCastPosition(Target, qDelay, qWidth, qRange, qSpeed, myHero, true)
- if HitChance >= 2 then
- CastSpell(_Q, CastPosition.x, CastPosition.z)
- return
- end
- end
- end
- function CastW()
- if WReady and AutoCarry.PluginMenu.USEW then
- wRange, wDelay, wSpeed, wWidth = 900, 150, 1200, 105
- local CastPosition, HitChance, Position = VP:GetCircularCastPosition(Target, wDelay, wWidth, wRange, wSpeed, myHero, false)
- if CastPosition and not Target.canMove and HitChance >= 2 then
- CastSpell(_W, CastPosition.x, CastPosition.z)
- return
- end
- end
- end
- function CastE()
- if EReady and AutoCarry.PluginMenu.USEE then
- CastSpell(_E)
- end
- end
- function CastR()
- local enemyCount = EnemyCount(myHero, 1300)
- if RReady and AutoCarry.PluginMenu.USER and enemyCount >= AutoCarry.PluginMenu.ENEMYTOR then
- CastSpell(_R)
- end
- end
- function EnemyCount(point, range)
- local count = 0
- for _, enemy in pairs(GetEnemyHeroes()) do
- if enemy and not enemy.dead and GetDistance(point, enemy) <= range then
- count = count + 1
- end
- end
- return count
- end
Advertisement
Add Comment
Please, Sign In to add comment