#Chatgpt aura help

3 messages · Page 1 of 1 (latest)

vestal iris
#

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

summer ingot
#

!chatgpt

warm horizonBOT
#

ChatGPT (and other LLM chatbots) aren't good at designing WeakAuras. It's too niche of a subject and the solutions that they provide can cause far more confusion than help. If you're struggling to create a WeakAura, try #resources, #snippets or ask in one of the channels here. There are plenty of people willing to help!