function(s, ...)
local name, _, _, _, _, _, expirationTime, _, _, _, spellId, _, _, _, _, _, _, _ = UnitAura("target", "Shadow Word: Pain", nil, "HARMFUL|PLAYER")
if name then
local remainingTime = expirationTime - GetTime()
local mobHealth = UnitHealth("target")
local mobMaxHealth = UnitHealthMax("target")
local dotTickDamage = 22
local SWP_TICK_DURATION = 1.5
-- Calculate total remaining damage from the DoT
local remainingDotDamage = dotTickDamage * math.floor(remainingTime / SWP_TICK_DURATION)
if remainingDotDamage >= mobHealth then
return true -- Show skull icon
end
end
return false -- Hide skull icon
end
is there any way to get this to work