Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if myHero.charName ~= "Irelia" then return end
- --[[ VP ]]--
- require 'VPrediction'
- local rRange, rDelay, rSpeed, rWidth = 1100, 0, 1600, 70
- local VP, ts = nil, nil
- --[[ VP ]]--
- local Minions
- function PluginOnLoad()
- --[[ VP ]]--
- VP = VPrediction()
- --[[ VP ]]--
- Minions = minionManager(MINION_ENEMY, 1250, player, MINION_SORT_HEALTH_ASC)
- enemyMinions = minionManager(MINION_ENEMY, 650, myHero, MINION_SORT_HEALTH_ASC)
- AutoCarry.SkillsCrosshair.range = 99999999999999999999999999 --1150
- jungleMinions = minionManager(MINION_JUNGLE, 360, myHero, MINION_SORT_MAXHEALTH_DEC)
- --> Main Load
- mainLoad()
- --> Main Menu
- mainMenu()
- end
- function PluginOnTick()
- jungleMinions:update()
- local QREADY = (myHero:CanUseSpell(_Q) == READY)
- local WREADY = (myHero:CanUseSpell(_W) == READY)
- local EREADY = (myHero:CanUseSpell(_E) == READY)
- local RREADY = (myHero:CanUseSpell(_R) == READY)
- if Menu.useRKS then
- RKS()
- end
- enemyMinions:update()
- if Menu.farm then
- AutoFarmQ()
- end
- if Menu.flee then
- flee()
- end
- --升級大招--
- DodajUlti()
- Checks()
- if Target then
- if Menu.sflee and GetDistance(Target) > 350then
- flee()
- end
- if ((myHero.health / myHero.maxHealth) < 0.5) then
- if RREADY and Menu.useR and GetDistance(Target) <= 600 then Cast(SkillQQ, Target) end
- end
- if (AutoCarry.MainMenu.AutoCarry or AutoCarry.MainMenu.MixedMode) then
- if GetDistance(Target) <= 230 then
- CastSpell(_W)
- end
- end
- --[[
- if (AutoCarry.MainMenu.AutoCarry or AutoCarry.MainMenu.MixedMode) and Menu.Harass then
- if TargetHaveBuff("ireliahitenstylecharged", myHero) and QREADY and GetDistance(Target)<320 then
- DelayAction(function() qq() end, 5.5)
- end
- end
- ]]--
- if (AutoCarry.MainMenu.AutoCarry or AutoCarry.MainMenu.MixedMode) then
- if GetDistance(Target)<280 and EREADY and ((myHero.health / myHero.maxHealth) < (Target.health / Target.maxHealth)) then
- CastSpell(_E, Target)
- end
- end
- end
- --[[ Auto Q ]]--
- if Menu.autoks then
- if myHero:GetSpellData(_W).level == 1 then
- w=15
- elseif myHero:GetSpellData(_W).level == 2 then
- w=30
- elseif myHero:GetSpellData(_W).level == 3 then
- w=45
- elseif myHero:GetSpellData(_W).level == 4 then
- w=60
- elseif myHero:GetSpellData(_W).level == 5 then
- w=75
- end
- for i = 1, heroManager.iCount, 1 do
- local enemy = heroManager:getHero(i)
- if ValidTarget(enemy, qRange) then
- local dmgE = getDmg("E", enemy, myHero)
- local dmgQ = getDmg("Q", enemy, myHero)+getDmg("AD",enemy,myHero)
- if enemy.health <= dmgQ and QREADY then
- CastSpell(_Q, enemy)
- end
- if myHero.level > 3 then
- if enemy.health <= dmgQ+w and QREADY and WREADY and GetDistance(Target)<600 then
- CastSpell(_W)
- CastSpell(_Q, enemy)
- end
- end
- if TargetHaveBuff("ireliahitenstylecharged", myHero) and QREADY and GetDistance(Target)<600 then
- if enemy.health <= dmgQ+w then
- CastSpell(_Q, enemy)
- end
- end
- if enemy.health <= dmgE and EREADY and GetDistance(Target)<300 then
- CastSpell(_E, enemy)
- end
- end
- end
- end
- end
- function qq()
- Checks()
- if Target then
- if ((myHero.health / myHero.maxHealth) > (Target.health / Target.maxHealth) ) then
- CastSpell(_Q, Target)
- end
- end
- end
- function eEndPos(unit)
- local endPos = Point(unit.x-myHero.x, unit.z-myHero.z)
- abs = math.sqrt(endPos.x*endPos.x + endPos.y*endPos.y)
- endPos2 = Point(myHero.x + (650*(endPos.x/abs)), myHero.z + (650*(endPos.y/abs)))
- return endPos2
- end
- function RKS()
- local QREADY = (myHero:CanUseSpell(_Q) == READY)
- local WREADY = (myHero:CanUseSpell(_W) == READY)
- local EREADY = (myHero:CanUseSpell(_E) == READY)
- local RREADY = (myHero:CanUseSpell(_R) == READY)
- if myHero:GetSpellData(_W).level == 1 then
- w=15
- elseif myHero:GetSpellData(_W).level == 2 then
- w=30
- elseif myHero:GetSpellData(_W).level == 3 then
- w=45
- elseif myHero:GetSpellData(_W).level == 4 then
- w=60
- elseif myHero:GetSpellData(_W).level == 5 then
- w=75
- end
- for i = 1, heroManager.iCount, 1 do
- local enemy = heroManager:getHero(i)
- if ValidTarget(enemy, 1100) then
- local dmgR = getDmg("R", enemy, myHero)
- local dmgQ = getDmg("Q", enemy, myHero)
- --單純R尾刀
- if enemy.health <= dmgR*4 then
- if RREADY and GetDistance(enemy) <= 1100 then
- local CastPosition, HitChance, Position = VP:GetLineCastPosition(enemy, rDelay, rWidth, rRange, rSpeed, myHero, false)
- if HitChance >= 2 then
- CastSpell(_R, CastPosition.x, CastPosition.z)
- return
- end
- end
- end
- --遠距離Q+R尾刀
- if enemy.health <= dmgQ + dmgR*4 then
- if RREADY and QREADY and GetDistance(enemy) <= 650 then
- local CastPosition, HitChance, Position = VP:GetLineCastPosition(enemy, rDelay, rWidth, rRange, rSpeed, myHero, false)
- if HitChance >= 2 then
- CastSpell(_R, CastPosition.x, CastPosition.z)
- return
- end
- end
- end
- --遠距離Q+R+W
- if TargetHaveBuff("ireliahitenstylecharged", myHero) then
- if enemy.health <= dmgQ + dmgR*4+w then
- if RREADY and QREADY and GetDistance(enemy) <= 650 then
- local CastPosition, HitChance, Position = VP:GetLineCastPosition(enemy, rDelay, rWidth, rRange, rSpeed, myHero, false)
- if HitChance >= 2 then
- CastSpell(_R, CastPosition.x, CastPosition.z)
- return
- end
- end
- end
- end
- --近距離R --------------------------------------------------------------------------------
- if enemy.health <= dmgR*6 then
- if RREADY and GetDistance(enemy) <= 320 then
- local CastPosition, HitChance, Position = VP:GetLineCastPosition(enemy, rDelay, rWidth, rRange, rSpeed, myHero, false)
- if HitChance >= 2 then
- CastSpell(_R, CastPosition.x, CastPosition.z)
- return
- end
- end
- end
- --近距離Q+R --------------------------------------------------------------------------------
- if enemy.health <= dmgQ + dmgR*6 then
- if RREADY and QREADY and GetDistance(enemy) <= 320 then
- local CastPosition, HitChance, Position = VP:GetLineCastPosition(enemy, rDelay, rWidth, rRange, rSpeed, myHero, false)
- if HitChance >= 2 then
- CastSpell(_R, CastPosition.x, CastPosition.z)
- return
- end
- end
- end
- --近距離Q+R+W ------------------------------------------------------------------
- if TargetHaveBuff("ireliahitenstylecharged", myHero) then
- if enemy.health <= dmgQ + dmgR*9+w then
- if RREADY and QREADY and GetDistance(enemy) <= 320 then
- local CastPosition, HitChance, Position = VP:GetLineCastPosition(enemy, rDelay, rWidth, rRange, rSpeed, myHero, false)
- if HitChance >= 2 then
- CastSpell(_R, CastPosition.x, CastPosition.z)
- return
- end
- end
- end
- end
- end
- end
- end
- function flee()
- local MousePos = Vector(mousePos.x, mousePos.y, mousePos.z)
- local Position = myHero + (Vector(MousePos) - myHero):normalized()*300
- myHero:MoveTo(Position.x, Position.z)
- mPos = getNearestMinion(mousePos)
- if mPos then
- if myHero:GetSpellData(_W).level == 1 then
- w=15
- elseif myHero:GetSpellData(_W).level == 2 then
- w=30
- elseif myHero:GetSpellData(_W).level == 3 then
- w=45
- elseif myHero:GetSpellData(_W).level == 4 then
- w=60
- elseif myHero:GetSpellData(_W).level == 5 then
- w=75
- end
- for index, minion in pairs(enemyMinions.objects) do
- if minion.health*1 <= getDmg("Q", minion, myHero)+getDmg("AD",minion,myHero) and QREADY then
- CastSpell(_Q,minion)
- end
- if TargetHaveBuff("ireliahitenstylecharged", myHero) then
- if minion.health*1 <= getDmg("Q", minion, myHero)+getDmg("AD",minion,myHero)+w then
- CastSpell(_Q, minion)
- return
- end
- end
- end
- end
- end
- function getNearestMinion(unit)
- local closestMinion = nil
- local nearestDistance = 0
- enemyMinions:update()
- for index, minion in pairs(enemyMinions.objects) do
- if minion ~= nil and minion.valid and string.find(minion.name,"Minion_") == 1 and minion.team ~= player.team and minion.dead == false then
- if GetDistance(minion) <= 650 and minion.health*1 <= getDmg("Q", minion, myHero)+getDmg("AD",minion,myHero) then
- --PrintChat(GetDistance(eEndPos(minion), unit) .. " - ".. GetDistance(unit))
- if GetDistance(eEndPos(minion), unit) < GetDistance(unit) and nearestDistance < GetDistance(minion) then
- nearestDistance = GetDistance(minion)
- closestMinion = minion
- end
- end
- if TargetHaveBuff("ireliahitenstylecharged", myHero) then
- if minion.health*1 <= getDmg("Q", minion, myHero)+getDmg("AD",minion,myHero)+w then
- if GetDistance(eEndPos(minion), unit) < GetDistance(unit) and nearestDistance < GetDistance(minion) then
- nearestDistance = GetDistance(minion)
- closestMinion = minion
- end
- end
- end
- end
- end
- return closestMinion
- end
- function AutoFarmQ()
- if myHero:GetSpellData(_W).level == 1 then
- w=15
- elseif myHero:GetSpellData(_W).level == 2 then
- w=30
- elseif myHero:GetSpellData(_W).level == 3 then
- w=45
- elseif myHero:GetSpellData(_W).level == 4 then
- w=60
- elseif myHero:GetSpellData(_W).level == 5 then
- w=75
- end
- if myHero:CanUseSpell(_Q) == READY then
- for index, minion in pairs(enemyMinions.objects) do
- if minion.health*1 <= getDmg("Q", minion, myHero)+getDmg("AD",minion,myHero) then
- CastSpell(_Q, minion)
- return
- end
- if TargetHaveBuff("ireliahitenstylecharged", myHero) then
- if minion.health*1 <= getDmg("Q", minion, myHero)+getDmg("AD",minion,myHero)+w then
- CastSpell(_Q, minion)
- return
- end
- end
- end
- end
- if myHero:CanUseSpell(_Q) == READY then
- for index, minion in pairs(jungleMinions.objects) do
- if minion.health*1 <= getDmg("Q", minion, myHero)+getDmg("AD",minion,myHero) and GetDistance(minion)< 600 then
- CastSpell(_Q,minion)
- return
- end
- end
- end
- if myHero:CanUseSpell(_Q) == READY then
- for index, minion in pairs(jungleMinions.objects) do
- if minion.health*1 <= getDmg("Q", minion, myHero)+getDmg("AD",minion,myHero)+w and GetDistance(minion)< 600 then
- if TargetHaveBuff("ireliahitenstylecharged", myHero) then
- CastSpell(_Q,minion)
- return
- end
- end
- end
- end
- end
- --[[ Parry ]]--
- function PluginOnProcessSpell(unit, spell)
- Target = AutoCarry.GetAttackTarget()
- QREADY = (myHero:CanUseSpell(_Q) == READY)
- WREADY = (myHero:CanUseSpell(_W) == READY)
- EREADY = (myHero:CanUseSpell(_E) == READY)
- RREADY = (myHero:CanUseSpell(_R) == READY)
- if unit.isMe then
- LastQ = os.clock()
- end
- if AutoCarry.PluginMenu.autoParry and EREADY then
- if unit and unit.type == myHero.type and spell.target == myHero then
- for i=1, #Abilities do
- if (spell.name == Abilities[i] or spell.name:find(Abilities[i]) ~=
- nil) then
- if getDmg("AD", myHero, unit) >= (myHero.maxHealth*0.06) or
- getDmg("AD", myHero, unit) >= (myHero.health*0.04) and GetDistance(Target)<300 then
- if GetDistance(Target)<300 and EREADY and ((myHero.health / myHero.maxHealth) < (Target.health / Target.maxHealth)) then
- CastSpell(_E, Target)
- end
- end
- end
- end
- end
- end
- end
- Abilities = {
- "GarenSlash2", "SiphoningStrikeAttack", "LeonaShieldOfDaybreakAttack", "RenektonExecute",
- "ShyvanaDoubleAttackHit", "DariusNoxianTacticsONHAttack", "TalonNoxianDiplomacyAttack", "Parley", "MissFortuneRicochetShot", "RicochetAttack", "jaxrelentlessattack", "Attack"
- }
- function PluginOnDraw()
- --> Ranges
- if TargetHaveBuff("ireliahitenstylecharged", myHero) then
- DrawCircle(myHero.x, myHero.y, myHero.z, qRange, 0xA0009E)
- end
- DrawCircle(myHero.x, myHero.y, myHero.z, 650, 0x992D3D)
- DrawCircle(myHero.x, myHero.y, myHero.z, 300, 0x992D3D)
- if myHero:GetSpellData(_W).level == 1 then
- w=15
- elseif myHero:GetSpellData(_W).level == 2 then
- w=30
- elseif myHero:GetSpellData(_W).level == 3 then
- w=45
- elseif myHero:GetSpellData(_W).level == 4 then
- w=60
- elseif myHero:GetSpellData(_W).level == 5 then
- w=75
- end
- if myHero:CanUseSpell(_Q) == READY then
- for index, minion in pairs(enemyMinions.objects) do
- if minion.health*1 <= getDmg("Q", minion, myHero)+getDmg("AD",minion,myHero) then
- for g = 0, 6 do
- DrawCircle(minion.x, minion.y, minion.z,90 + g,255255255)
- end
- return
- end
- if TargetHaveBuff("ireliahitenstylecharged", myHero) then
- if minion.health*1 <= getDmg("Q", minion, myHero)+getDmg("AD",minion,myHero)+w then
- for g = 0, 6 do
- DrawCircle(minion.x, minion.y, minion.z,90 + g,255255255)
- end
- return
- end
- end
- -- DrawCircle(minion.x, minion.y, minion.z,80 + 255255255)
- end
- end
- end
- --> Main Load
- function mainLoad()
- qRange, wRange, rRange = 650, 900, 1100
- QREADY, WREADY, RREADY = false, false, false
- SkillQ = {spellKey = _Q, range = qRange, speed = 1.2, delay = 355, width = 75}
- SkillQQ = {spellKey = _R, range = 1100, speed = 1.6, delay = 0, width = 75}
- Cast = AutoCarry.CastSkillshot
- Menu = AutoCarry.PluginMenu
- Col = AutoCarry.GetCollision
- end
- --> Main Menu
- function mainMenu()
- AutoCarry.PluginMenu:addParam("autoParry", "Auto Parry", SCRIPT_PARAM_ONOFF, true)
- Menu:addParam("Harass", "Use Q to Harass", SCRIPT_PARAM_ONOFF, true)
- Menu:addParam("useRKS", "Use R to KS", SCRIPT_PARAM_ONOFF, true)
- Menu:addParam("useR", "Use R", SCRIPT_PARAM_ONOFF, true)
- Menu:addParam("autoks", "Auto Kill with Q", SCRIPT_PARAM_ONOFF, true)
- Menu:addParam("farm", "Q Farm", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("V"))
- Menu:addParam("flee", "E to Flee", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("E"))
- Menu:addParam("sflee", "Space to Flee", SCRIPT_PARAM_ONKEYDOWN, false, 32)
- end
- --> Checks
- function Checks()
- Target = AutoCarry.GetAttackTarget()
- QREADY = (myHero:CanUseSpell(_Q) == READY)
- WREADY = (myHero:CanUseSpell(_W) == READY)
- EREADY = (myHero:CanUseSpell(_E) == READY)
- RREADY = (myHero:CanUseSpell(_R) == READY)
- end
- --升級大招--
- function DodajUlti()
- if myHero.level == 6 or myHero.level == 11 or myHero.level == 16 then
- LevelSpell(_R)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment