Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This would be somewhere in a FakeUnits file. It could go in your rotation file, but that could get ugly
- local spellsToInterrupt = {
- 2060, -- Heal
- 21162, -- Fireball
- -- And so on
- }
- local function isCastingInterruptable(unit, distance)
- local actualDist = NeP.DSL:Get("distance")(unit)
- local inFront = NeP.DSL:Get("infront")(unit)
- if actualDist > distance or not inFront then return false
- for intSpell in spellsToInterrupt do
- if NeP.DSL:Get("casting")(unit, intSpell) then return true end
- end
- end
- NeP.FakeUnits:Add('toInterrupt', function(distance)
- for _, Obj in pairs(NeP.OM:Get(Enemy)) do
- if isCastingInterruptable(Obj.key, distance) then
- return Obj.key
- end
- end
- return nil
- end)
- -- This is the line in your rotation
- {Interrupts, 'toInterrupt(5) & toInterrupt(5).interruptAt(50) & toggle(interrupts)', 'toInterrupt(5)'}
Advertisement
Add Comment
Please, Sign In to add comment