local debuffIDs = {1822, 155722}
local targetHasDebuff = false
-- Check if the target exists
if UnitExists("target") then
-- Iterate over each debuff ID
for _, debuffID in ipairs(debuffIDs) do
local index = 1
-- Iterate over each debuff on the target
while true do
local name, _, _, _, _, _, _, _, _, spellID = UnitDebuff("target", index)
if not name then break end
-- If the target has any of the specified debuffs, set targetHasDebuff to true
if spellID == debuffID then
targetHasDebuff = true
break
end
index = index + 1
end
-- If the target has any of the specified debuffs, break out of the loop
if targetHasDebuff then break end
end
end
-- If targetHasDebuff is false, trigger the event
if not targetHasDebuff then
return true
end
return false
end```
#Getting an error on the below code - UnitDebuff seems to be defunct
15 messages · Page 1 of 1 (latest)
well now I feel dumb. When I wrote this a while ago I couldn't work out how
you want to know when the enym as a debuff?
you can just list two debuffs in the buff trigger.
aaah okay let me try that
ah.
Because i'm conditionally colouring the text based on the FeralSnapshots api
but that has nothing to do with the code here.
no, this is the untrigger event for the custom trigger
which is triggering to mark that the text colour needs changing
nothing like that is happening there. thats just a bad copy of a default trigger.