Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if myHero.charName ~= "Morgana" then return end
- require 'VPrediction'
- function Menu()
- MenuMorg = AutoCarry.PluginMenu
- MenuMorg:addSubMenu("Combo Settings", "comboConfig")
- MenuMorg.comboConfig:addParam("USEQ", "Use Q in Combo", SCRIPT_PARAM_ONOFF, true)
- MenuMorg.comboConfig:addParam("USEW", "Use W in Combo", SCRIPT_PARAM_ONOFF, true)
- MenuMorg.comboConfig:addParam("USEE", "Use E in Combo", SCRIPT_PARAM_ONOFF, true)
- MenuMorg.comboConfig:addParam("USER", "Use R in Combo", SCRIPT_PARAM_ONOFF, true)
- MenuMorg.comboConfig:addParam("ENEMYTOR", "Min Enemies to Cast R: ", SCRIPT_PARAM_SLICE, 2, 1, 5, 0)
- MenuMorg:addSubMenu("KS Settings", "ksConfig")
- MenuMorg.ksConfig:addParam("IGN", "KS Ignite", SCRIPT_PARAM_ONOFF, true)
- MenuMorg.ksConfig:addParam("KSQ", "KS Q", SCRIPT_PARAM_ONOFF, true)
- MenuMorg.ksConfig:addParam("KSW", "KS W", SCRIPT_PARAM_ONOFF, true)
- MenuMorg.ksConfig:addParam("KSULT", "KS R", SCRIPT_PARAM_ONOFF, true)
- MenuMorg:addSubMenu("Harras Settings", "harrasConfig")
- MenuMorg.harrasConfig:addParam("HQ", "Harras enemy Q", SCRIPT_PARAM_ONKEYTOGGLE, true, GetKey("X"))
- MenuMorg.harrasConfig:addParam("MINMPTOQ", "Min % MP To Harras Q", SCRIPT_PARAM_SLICE, 70, 0, 100, 2)
- MenuMorg.harrasConfig:addParam("HW", "Harras enemy W", SCRIPT_PARAM_ONKEYTOGGLE, true, GetKey("Z"))
- MenuMorg.harrasConfig:addParam("HWS", "Only On Stunned Enemy", SCRIPT_PARAM_ONOFF, true)
- MenuMorg.harrasConfig:addParam("MINMPTOW", "Min % MP To Harras W", SCRIPT_PARAM_SLICE, 70, 0, 100, 2)
- MenuMorg:addSubMenu("Draw Settings", "drawConfig")
- MenuMorg.drawConfig:addParam("DQL", "Draw Q Collision Line", SCRIPT_PARAM_ONOFF, true)
- MenuMorg.drawConfig:addParam("DQ", "Draw Q Range", SCRIPT_PARAM_ONOFF, true)
- MenuMorg.drawConfig:addParam("DW", "Draw W Range", SCRIPT_PARAM_ONOFF, true)
- MenuMorg.drawConfig:addParam("DR", "Draw R Range", SCRIPT_PARAM_ONOFF, true)
- end
- function Variables()
- 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
- -- Q --
- qRange = 1300
- qDelay = 250
- qSpeed = 1200
- qWidth = 60
- -- W --
- wRange = 900
- wDelay = 150
- wSpeed = 1200
- wWidth = 105
- -- E --
- eRange = 750
- -- R --
- rRange = 600
- AutoCarry.SkillsCrosshair.range = 1300
- end
- function PluginOnLoad()
- Menu()
- Variables()
- 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 MenuMorg.comboConfig.USEQ then
- CastQ()
- end
- if MenuMorg.comboConfig.USEW then
- CastW()
- end
- if MenuMorg.comboConfig.USEE then
- CastE()
- end
- if MenuMorg.comboConfig.USER then
- CastR()
- end
- end
- if MenuMorg.ksConfig.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
- 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 MenuMorg.ksConfig.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
- 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 MenuMorg.ksConfig.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 MenuMorg.ksConfig.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 MenuMorg.harrasConfig.HQ and QReady and ((myHero.mana/myHero.maxMana)*100) > MenuMorg.harrasConfig.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
- 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 MenuMorg.harrasConfig.HW and WReady and ((myHero.mana/myHero.maxMana)*100) > MenuMorg.harrasConfig.MINMPTOW then
- if MenuMorg.harrasConfig.HWS 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 and not target.canMove then
- 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
- if not MenuMorg.harrasConfig.HWS 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
- 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
- end
- function CastQ()
- if QReady and MenuMorg.comboConfig.USEQ and Target.canMove then
- 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 MenuMorg.comboConfig.USEW then
- 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 MenuMorg.comboConfig.USEE then
- CastSpell(_E)
- end
- end
- function CastR()
- local enemyCount = EnemyCount(myHero, rRange)
- if RReady and MenuMorg.comboConfig.USER and enemyCount >= MenuMorg.comboConfig.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
- function PluginOnDraw()
- if MenuMorg.drawConfig.DQL and ValidTarget(Target, qRange) then
- QMark = Target
- DrawLine3D(myHero.x, myHero.y, myHero.z, QMark.x, QMark.y, QMark.z, qWidth, ARGB(150,40,4,4))
- end
- if MenuMorg.drawConfig.DQ and QReady then
- DrawCircle(myHero.x, myHero.y, myHero.z, qRange, ARGB(255,0,0,255))
- end
- if MenuMorg.drawConfig.DW and WReady then
- DrawCircle(myHero.x, myHero.y, myHero.z, wRange, ARGB(255,255,0,0))
- end
- if MenuMorg.drawConfig.DR and RReady then
- DrawCircle(myHero.x, myHero.y, myHero.z, rRange, ARGB(255,0,255,0))
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment