Hi,
Im trying to play a sound on players death, but it does not work for me
Lua Code:
local function OnEvent(self, event, ...)
if event == "COMBAT_LOG_EVENT_UNFILTERED" then
local Event = select(2, ...)
local sourceGUID = select(4, ...)
local GUID = select(8, ...)
local SpellName = select(13, ...)
local EventType = select(15, ...)
if Event == "UNIT_DIED" then
if GUID == UnitGUID("player") then
a.Sound(SoundPackValue("player_died"))
end
end
end
and every time I buff myself
Lua Code:
if Event == "SPELL_AURA_APPLIED" and GUID == UnitGUID("player") then
if EventType == "BUFF" then
a.Sound(SoundPackValue("buff_on_self"))
end
end
Could you please help me understand why doesn't it work and correct me?
Thank you so much for help.