Quantcast
WoWInterface - View Single Post - Flashy name for nearby guild mates
View Single Post
05-02-21, 10:08 AM   #11
Yukka
An Aku'mai Servant
 
Yukka's Avatar
Join Date: Feb 2020
Posts: 32
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:
  1. local guildie={}
  2. local f=CreateFrame("frame")
  3. f:RegisterEvent("GUILD_ROSTER_UPDATE")
  4. f:RegisterEvent("NAME_PLATE_UNIT_ADDED")
  5. f:SetScript("OnEvent",function(self,event,unit)
  6.     if event=="GUILD_ROSTER_UPDATE" then
  7.         local total=GetNumGuildMembers()
  8.         wipe(guildie)
  9.         for i=1,total do
  10.             local guid=select(17,GetGuildRosterInfo(i))
  11.             if guid then
  12.                 guildie[guid]=true
  13.             end
  14.         end
  15.     elseif event=="NAME_PLATE_UNIT_ADDED" then
  16.  
  17.         if guildie[UnitGUID(unit))] then
  18.             Playsound(416)
  19.         end
  20.  
  21.     end
  22. end

Last edited by Yukka : 05-02-21 at 10:45 AM.
  Reply With Quote