Hey guys first time posting and making an add0n.
Idea behind it is:
- Check yourself and all members in your party for the Blinding Peck Debuff from the Eye of Aszhara dungeon.
- If debuff is found on someone, play soud snipette.
I'm new to Lua and everything I have done has been from reverse engineering other addons similiar to the one I want to make however I cannot get it to work and I'm unsure as to where I have gone wrong.
Anyone with the ability to help me please do I'll love you forever!
Code:
local BLINDING_PECK_ID = 195561
local BLINDING_PECK = GetSpellInfo(BLINDING_PECK_ID)
local frame = CreateFrame("FRAME")
frame:RegisterEvent("UnitDebuff", "player", "party1", "party2", "party3", "party4")
frame:SetScript("OnEvent", eventHandler)
local name = UnitDebuff("player", "party1", "party2", "party3", "party4" BLINDING_PECK)
local function eventHandler(self, event, ...)
PlaySoundFile([[Interface\AddOns\Segullspeck\media\Seagullspeck.ogg]], "Master")
end