#Need help with custom weak aura - Holy Paladin

6 messages · Page 1 of 1 (latest)

lavish dirge
#

Hello Guys, I am trying to create a custom weak aura. The idea is, that I will be able to track when enemy npcs have the Unworthy debuff on them which I apply but hitting judgement on them. I would like the judgement Icon to be highlighted above enemy health NPC when the unworthy debuff is active on them. I asked ChatGPT for help, it gave me a few different codes and none of them seem to work. The last one being :

-- WeakAura for highlighting Judgment icon when Unworthy buff is active

function(event, ...)
local unworthyBuffId = 123456 -- Replace with the actual spell ID of Unworthy
local unit = "target"
local iconSize = 36 -- Adjust the size of the icon as needed

-- Check if the target has the Unworthy buff
local _, _, _, _, _, _, expirationTime, _, _, _, spellId = UnitBuff(unit, GetSpellInfo(unworthyBuffId))

if spellId == unworthyBuffId and expirationTime then
    -- Calculate remaining time on the Unworthy buff
    local remainingTime = expirationTime - GetTime()

    -- Display a basic text on top of the target's health bar
    local text = string.format("Unworthy: %.1fs", remainingTime)
    return true, text
else
    return false
end

end

I did replace the numbers with the unworthy spell ID which I got from "idTip" addon. No matter the version of the code it provided to me, I am getting an error :

Does any of you know why this might be happening? Thank you!

iron bloom
#

Yeah, ChatGPT can't help you with that. It's complex.
You should probably just handle it within the nameplate addon (Plater)

lavish dirge
#

nameplate addon is only for my nameplates, not for the icons above them or am I wrong :?

iron bloom
#

Well if you already have icons on the plates then it's probably being done by the plate addon.
Or you're adding them with a WA, in which case, why are you trying to come up with custom code to highlight an Aura that already exists?

lavish dirge
#

I am left with the impression, that icons are visible on the enemy health bars in general. I haven't touched anything personally for them to be shown. So question remains, even if this has been pre-set from any addon. How do you enlarge them, make them shine.. ?

iron bloom
#

You'd have a hard time affecting those from WA.
Create them with WA and you're in control of them.
Or use an addon to take over the whole nameplate aspect and have it control them.