View Single Post
12-26-20, 07:23 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Lua Code:
  1. local f = CreateFrame("Frame")     --create a frame to listen for the event
  2. f:RegisterEvent("CHAT_MSG_SYSTEM")     --register for the event you want to listen for
  3. f:SetScript("OnEvent", function(self, event, msg)     --tell WoW what to do when the event fires
  4.           if strfind(msg, "sold") then     --we only registered for one event, so we don't even have to check to see which one it was
  5.                PlaySound(5274)
  6.           elseif strfind(msg, "expired") then
  7.                PlaySound(5275)
  8.           end
  9.      end)
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote