Page 1 of 1

Play Sound / Send whisper ?!

Posted: Wed Dec 02, 2009 10:09 pm
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.

Re: Play Sound / Send whisper ?!

Posted: Thu Dec 03, 2009 12:42 am
by Administrator
Yes. Try this:

Code: Select all

RoMScript("SendChatMessage('Some Text', 'WHISPER', 0, 'SomePlayerName')");

Re: Play Sound / Send whisper ?!

Posted: Thu Dec 03, 2009 2:05 am
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;