Play Sound / Send whisper ?!

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
bussdee
Posts: 37
Joined: Tue Apr 28, 2009 11:20 am

Play Sound / Send whisper ?!

#1 Post by bussdee »

Is it possible to play a sound or send a whisper at waypoint-file ?

I tryed this, but can`t get it to work:

Code: Select all

SendChatMessage("Some Text", "WHISPER", 0, "SomePlayerName")

Code: Select all

PlaySoundByPath("music/rom/title.mp3")
thanks for any help.
"Erfahrung ist fast immer eine Parodie auf die Idee."
Johann Wolfgang von Goethe
User avatar
Administrator
Site Admin
Posts: 5344
Joined: Sat Jan 05, 2008 4:21 pm

Re: Play Sound / Send whisper ?!

#2 Post by Administrator »

Yes. Try this:

Code: Select all

RoMScript("SendChatMessage('Some Text', 'WHISPER', 0, 'SomePlayerName')");
bussdee
Posts: 37
Joined: Tue Apr 28, 2009 11:20 am

Re: Play Sound / Send whisper ?!

#3 Post by bussdee »

thx a lot, works well and now i get notified if my bot finished @ lvl 10!
Maybe you can help me with some other problem too?

I`m creating an AddOn with some usefull functions.
Right now i try to play a soundfile every time i get whispered (maybe another sound on GM-message possible?)

Code: Select all

function Wsound_OnLoad(this)
	this:RegisterEvent("CHAT_MSG_WHISPER");
	wait(10)
	DEFAULT_CHAT_FRAME:AddMessage("|cff993333 >> Whisper-Sound|r |cffffffff: aktiviert.|r");
end; 

function Wsound_OnEvent(this, event) 
	if event == "CHAT_MSG_WHISPER" then 
		if(string.find( s, " ") ) then PlaySoundByPath("Interface/AddOns/ingamefunctions/notify.wav");
	        end; 
        end;
end;
"Erfahrung ist fast immer eine Parodie auf die Idee."
Johann Wolfgang von Goethe
Post Reply