Quick Search by buff list (useful for detecting poison, stunned ...)
LuaScript:
local idBuffs={13750,5004,433,121279,20572}
for key,value in pairs(idBuffs) do
for i=1,40 do
local name, _, _, _, _, _, _, _, _, _, spellId = UnitBuff("player", i)
if (value==spellId) then
result=1
return;
end
end
end
result=0
Research:
1
Var:
result
Replace spells id 13750,5004,... by your buff spells id needed.