Trigger PlaySound upon keyword event
I'm looking to create a macro/script/addon where if I receive a system message that any of my auction items expired or sold, I would hear a sound cue.
So basically it would search anything from CHAT_MSG_SYSTEM by keywords and triggers a PlaySound, example: The word 'sold' appears, it activates PlaySound(5274) and ... The word 'expired' appears, it activates PlaySound(5275). I used to have this but lost it when I forgot to make a backup. Any advice or instruction would be very helpful. Thanks. Note: I'm a complete newbie with this so I don't know how to even set this up. |
Lua Code:
|
<Bows before Seerah>
UPDATE: Out of curiosity, what is the purpose of adding 'self' to it? You have an event that contains a message, it's not like one is listening for other players. |
What you call variables is irrelevant. The first return from an event firing is the frame that was listening to it. The second return is the specific event that was fired in case your frame was listening for more than one. Beyond that, anything else depends on which event it was and what comes with it.
|
Ok, very good.
|
All times are GMT -6. The time now is 11:59 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI