Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Power Interrupt 1.1.2 by Klokje
- ========================================================================
- Info
- Automatically interrupt channeled spells if your are in range and your spell isn't on cooldown. With a piority system.
- Example if you are Taric you want to stun Fiddlesticks lifedrain, but if you are malphite you don't want to waste ulti for that. But you still want to use it for Katarina ulti.
- Supported Interrupt Champions (current version):
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Sion
- Alistar
- FiddleSticks
- Kassadin
- Cho'Gath
- Malzahar
- Pantheon
- Taric
- HeimerDinger
- Poppy
- Soraka
- Talon
- Draven
- Diana
- Sona
- Malphite
- Blitzcrank
- Fizz
- Galio
- Gragras
- Darius
- Maokai
- Garen
- Hecarim
- Leesin
- Leona
- Lulu
- Rammus
- Maokai
- Riven
- Shen
- Singed
- Viktor
- Udyr
- Vayne
- Tristana
- Volibear
- Warwick
- Wukong
- Janna
- Ziggs
- Urgot
- Renekton
- Ahri
- Hecarim
- Sejuani
- Nami
- Veigar
- Supported Champions that need to interrupt (current version):
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Katarina
- Galio
- FiddleSticks
- Nunu
- Shen
- Urgot
- Malzahar
- Pantheon
- Karthus
- Varus
- Caitlyn
- MissFortune
- Warwick
- Changelog
- ~~~~~~~~~
- 0.1 - Initial release
- 0.2 - Added more champions
- 0.3 - Added more champions
- 0.3.1/0.3.2 - Fixed some bugs
- Addes more champions
- 1.0 - Added champion Nami
- Rename to Power Interrupt
- Out of beta
- 1.1 - Works with new version of bol
- Added champion Veigar
- 1.1.1 - Rewrite some code
- ]]
- -- Config ----------------------------------------------------------------------
- local ToStun = false
- local charStun = false
- local stunSpells = {}
- local spellsToStun = {}
- champsCanStun = {
- --Q
- { charName = "Sion", spellSlot = _Q, spellRange = 550, interrupttype = 0, interrupt = 0},
- { charName = "Alistar", spellSlot = _Q, spellRange = 365, interrupttype = 2, interrupt = 0},
- { charName = "FiddleSticks", spellSlot = _Q, spellRange = 575, interrupttype = 0, interrupt = 0},
- { charName = "Kassadin", spellSlot = _Q, spellRange = 650, interrupttype = 0, interrupt = 0},
- { charName = "Chogath", spellSlot = _Q, spellRange = 950, interrupttype = 1, interrupt = 0},
- { charName = "Malzahar", spellSlot = _Q, spellRange = 850, interrupttype = 1, interrupt = 0},
- { charName = "Garen", spellSlot = _Q, spellRange = 400, interrupttype = 3, interrupt = 0},
- { charName = "Leona", spellSlot = _Q, spellRange = 400, interrupttype = 3, interrupt = 0},
- { charName = "Maokai", spellSlot = _Q, spellRange = 200, interrupttype = 2, interrupt = 0},
- { charName = "Volibear", spellSlot = _Q, spellRange = 400, interrupttype = 3, interrupt = 0},
- { charName = "Janna", spellSlot = _Q, spellRange = 1100, interrupttype = 4, interrupt = 0},
- { charName = "Nami", spellSlot = _Q, spellRange = 825, interrupttype = 1, interrupt = 0},
- --W
- { charName = "Pantheon", spellSlot = _W, spellRange = 600, interrupttype = 0, interrupt = 0},
- { charName = "Alistar", spellSlot = _W, spellRange = 650, interrupttype = 0, interrupt = 0},
- { charName = "Chogath", spellSlot = _W, spellRange = 700, interrupttype = 1, interrupt = 0},
- { charName = "Lulu", spellSlot = _W, spellRange = 650, interrupttype = 1, interrupt = 0},
- { charName = "Riven", spellSlot = _W, spellRange = 250, interrupttype = 2, interrupt = 0},
- { charName = "Viktor", spellSlot = _W, spellRange = 700, interrupttype = 1, interrupt = 0},
- { charName = "Ziggs", spellSlot = _W, spellRange = 1000, interrupttype = 4, interrupt = 0},
- { charName = "Renekton", spellSlot = _W, spellRange = 250, interrupttype = 3, interrupt = 0},
- --E
- { charName = "Taric", spellSlot = _E, spellRange = 625, interrupttype = 0, interrupt = 0},
- { charName = "HeimerDinger", spellSlot = _E, spellRange = 925, interrupttype = 1, interrupt = 0},
- { charName = "Poppy", spellSlot = _E, spellRange = 525, interrupttype = 0, interrupt = 0},
- { charName = "Soraka", spellSlot = _E, spellRange = 725, interrupttype = 0, interrupt = 0},
- { charName = "FiddleSticks", spellSlot = _E, spellRange = 750, interrupttype = 0, interrupt = 0},
- { charName = "Talon", spellSlot = _E, spellRange = 700, interrupttype = 0, interrupt = 0},
- { charName = "Draven", spellSlot = _E, spellRange = 900, interrupttype = 1, interrupt = 0},
- { charName = "Diana", spellSlot = _E, spellRange = 250, interrupttype = 2, interrupt = 0},
- { charName = "Darius", spellSlot = _E, spellRange = 550, interrupttype = 1, interrupt = 0},
- { charName = "Hecarim", spellSlot = _E, spellRange = 400, interrupttype = 3, interrupt = 0},
- { charName = "Rammus", spellSlot = _E, spellRange = 325, interrupttype = 0, interrupt = 0},
- { charName = "Shen", spellSlot = _E, spellRange = 600, interrupttype = 1, interrupt = 0},
- { charName = "Singed", spellSlot = _E, spellRange = 400, interrupttype = 0, interrupt = 0},
- { charName = "Udyr", spellSlot = _E, spellRange = 400, interrupttype = 3, interrupt = 0},
- { charName = "Vayne", spellSlot = _E, spellRange = 450, interrupttype = 0, interrupt = 0},
- { charName = "Ahri", spellSlot = _E, spellRange = 975, interrupttype = 1, interrupt = 0},
- { charName = "Hecarim", spellSlot = _E, spellRange = 250, interrupttype = 3, interrupt = 0},
- { charName = "Veigar", spellSlot = _E, spellRange = 600, interrupttype = 5, interrupt = 0},
- --ulti
- { charName = "Sona", spellSlot = _R, spellRange = 1000, interrupttype = 1, interrupt = 1},
- { charName = "Nami", spellSlot = _R, spellRange = 2550, interrupttype = 1, interrupt = 1},
- { charName = "Malphite", spellSlot = _R, spellRange = 1000, interrupttype = 1, interrupt = 1},
- { charName = "Blitzcrank", spellSlot = _R, spellRange = 600, interrupttype = 2, interrupt = 0},
- { charName = "Fizz", spellSlot = _R, spellRange = 1275, interrupttype = 1, interrupt = 1},
- { charName = "Galio", spellSlot = _R, spellRange = 600, interrupttype = 2, interrupt = 1},
- { charName = "Gragras", spellSlot = _R, spellRange = 1050, interrupttype = 1, interrupt = 1},
- { charName = "LeeSin", spellSlot = _R, spellRange = 375, interrupttype = 0, interrupt = 1},
- { charName = "Tristana", spellSlot = _R, spellRange = 700, interrupttype = 0, interrupt = 1},
- { charName = "Warwick", spellSlot = _R, spellRange = 700, interrupttype = 0, interrupt = 1},
- { charName = "MonkeyKing", spellSlot = _R, spellRange = 325, interrupttype = 2, interrupt = 1},
- { charName = "Leona", spellSlot = _R, spellRange = 1200, interrupttype = 1, interrupt = 1},
- { charName = "Janna", spellSlot = _R, spellRange = 725, interrupttype = 2, interrupt = 1},
- { charName = "Urgot", spellSlot = _R, spellRange = 600, interrupttype = 0, interrupt = 1},
- { charName = "Skarner", spellSlot = _R, spellRange = 350, interrupttype = 0, interrupt = 1},
- { charName = "Hecarim", spellSlot = _R, spellRange = 1000, interrupttype = 1, interrupt = 1},
- { charName = "Sejuani", spellSlot = _R, spellRange = 1150, interrupttype = 3, interrupt = 1}
- }
- --Add here champs that need to be interrupt
- champsToStun = {
- --Important, how lower the number, how important it is to interrupt
- { charName = "Katarina", spellName = "KatarinaR" , important = 0},
- { charName = "Galio", spellName = "GalioIdolOfDurand" , important = 0},
- { charName = "FiddleSticks", spellName = "Crowstorm" , important = 1},
- { charName = "FiddleSticks", spellName = "DrainChannel" , important = 1},
- { charName = "Nunu", spellName = "AbsoluteZero" , important = 0},
- { charName = "Shen", spellName = "ShenStandUnited" , important = 0},
- { charName = "Urgot", spellName = "UrgotSwap2" , important = 0},
- { charName = "Malzahar", spellName = "AlZaharNetherGrasp" , important = 0},
- { charName = "Karthus", spellName = "FallenOne" , important = 0},
- { charName = "Pantheon", spellName = "Pantheon_GrandSkyfall_Jump" , important = 0},
- { charName = "Varus", spellName = "VarusQ" , important = 1},
- { charName = "Caitlyn", spellName = "CaitlynAceintheHole" , important = 1},
- { charName = "MissFortune", spellName = "MissFortuneBulletTime" , important = 1},
- { charName = "Warwick", spellName = "InfiniteDuress" , important = 0}
- }
- local k = 1;
- for i,champCanStun in pairs(champsCanStun) do
- if (myHero.charName == champCanStun.charName) then
- charStun = true;
- stunSpells[k] = { spellSlot = champCanStun.spellSlot, spellRange = champCanStun.spellRange, interrupttype = champCanStun.interrupttype, interrupt = champCanStun.interrupt}
- k= k+1
- end
- end
- if charStun == false then return end
- local l = 1
- for i,champToStun in pairs(champsToStun) do
- for i=1, heroManager.iCount do
- local enemy = heroManager:GetHero(i)
- if enemy.team ~= myHero.team and (enemy.charName == champToStun.charName) then
- spellsToStun[l] = { spell = champToStun.spellName, important = champToStun.important }
- l=l+1
- ToStun = true
- end
- end
- end
- if ToStun == false then return end
- -- Code ------------------------------------------------------------------------
- function OnLoad()
- PrintChat(" >> Power Interrupt 1.1.2")
- end
- function OnProcessSpell(unit, spell)
- local spellName = spell.name
- if (unit and unit.team ~= myHero.team and unit.dead == false) then
- for i,spellToStun in pairs(spellsToStun) do
- if(spellName == spellToStun.spell) then
- for i,stunSpell in pairs(stunSpells) do
- if (CanUseSpell(stunSpell.spellSlot) == READY and GetDistance(unit) < stunSpell.spellRange) then
- if((stunSpell.interrupt == 0) or (stunSpell.interrupt == 1 and spellToStun.important == 0)) then
- if (stunSpell.interrupttype == 0) then
- CastSpell(stunSpell.spellSlot, unit)
- return
- elseif (stunSpell.interrupttype == 1) then
- CastSpell(stunSpell.spellSlot, unit.x, unit.z)
- return
- elseif (stunSpell.interrupttype == 2) then
- CastSpell(stunSpell.spellSlot)
- return
- elseif (stunSpell.interrupttype == 3) then
- CastSpell(stunSpell.spellSlot)
- player:Attack(unit)
- return
- elseif (stunSpell.interrupttype == 4) then
- CastSpell(stunSpell.spellSlot, unit.x, unit.z)
- CastSpell(stunSpell.spellSlot)
- return
- elseif (stunSpell.interrupttype == 5) then
- local stunLoc = getELoc(unit, stunSpell.spellRange)
- CastSpell(stunSpell.spellSlot, stunLoc.x, stunLoc.z)
- end
- end
- end
- end
- end
- end
- end
- end
- function getELoc(target, range)
- myLoc = Vector(myHero.x, myHero.y, myHero.z)
- targetLoc = Vector(target.x, target.y, target.z)
- stunLoc = Vector(targetLoc) + (Vector(targetLoc)-Vector(myLoc)):normalized()*375
- if GetDistance(stunLoc) < range then return stunLoc end
- stunLoc = Vector(targetLoc) - (Vector(targetLoc)-Vector(myLoc)):normalized()*375
- return stunLoc
- end
Advertisement
Add Comment
Please, Sign In to add comment