I tryed it with guildies nearby but it doesnt play any sound. I have friendly nameplates turned on. I dont know how to make it working. Its probably my noob brain that forgot something.
Here's what's in the core.lua file:
Lua Code:
local guildie={} local f=CreateFrame("frame") f:RegisterEvent("GUILD_ROSTER_UPDATE") f:RegisterEvent("NAME_PLATE_UNIT_ADDED") f:SetScript("OnEvent",function(self,event,unit) if event=="GUILD_ROSTER_UPDATE" then local total=GetNumGuildMembers() wipe(guildie) for i=1,total do local guid=select(17,GetGuildRosterInfo(i)) if guid then guildie[guid]=true end end elseif event=="NAME_PLATE_UNIT_ADDED" then if guildie[UnitGUID(unit))] then Playsound(416) end end end
|