I got an interrupt profile but want to add to dont cast anything when the focus have immune buffs for example.
I got an interrupt profile but want to add to dont cast anything when the focus have immune buffs for example.
just add " if UnitBuffID("focus", XXXXX) then return end " before your cast XXXXX is your immun buff
But if i add that it would interrupt when the focus have the immune buff not when it dont have it should be the opposite of that
but you can add a condition to stop casting spells when the unit has the buff.
heres an working short example script:
local kickon = {
"Flash of Light" ,
"Divine Light"
}
if UnitBuffID("focus", 642)
or UnitBuffID("focus", 1022) then return end --everything after this line will be no executed if that buff exist on your focus + you can add more requirements
if PQR_SpellAvailable(1766) then
for i=1, #kickon do
if UnitCastingInfo("focus") == kickon[i] then
CastSpellByID(1766, "focus") --kick for eg or you can change 1766 to your interrupt spell
return true
end
end
end
Yeah, thats good, i did this which should work the same:
and UnitDebuff("focus", "Spellname") == nil
then return true
end