Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ Howto make a simple sound-command?
Howto make a simple sound-command?
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Mazarin
(14 posts) Bio
|
Date
| Fri 13 Aug 2010 12:51 AM (UTC) |
Message
| A simple question: how do I get a sound to pley?
At the mom. I got a trigger that makes use the mudcommand "page" with a line "Send ("page Mazarin Time = On") - which sends a beep to my character (= Mazarin). However I could use a direct command (like "PlaySound "beep.waw" or whatever). I just don't know howto accieve this.
Any help?
Thank you.
//Mazarin | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #1 on Fri 13 Aug 2010 03:12 AM (UTC) |
Message
|
 |
Scripting tutorial
There is extensive information about scripting in MUSHclient at http://mushclient.com/scripting. This includes screen shots and examples.
|
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Mazarin
(14 posts) Bio
|
Date
| Reply #2 on Tue 17 Aug 2010 11:36 AM (UTC) |
Message
| I have placed (pasted) the line
"PlaySound (1, "c:\sound\boeing.wav", false, 0, 0)"
as mentioned in the example in among my trigs as mentioned in the example that was referred to. This however gives only a short beep and not the chime-type sound it should. When I replace this line with the command
"Send ("page Mazarin Questtime")"
then I get the correct sound. - I have of course placed a file with the name "boeing.wav" in the directory c:\sound (there is no other file in the directory).
The result is the same independantly of whether I have a full path specified or not.
What might be wrong?
// Mazarin
| Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #3 on Tue 17 Aug 2010 09:06 PM (UTC) |
Message
| If this is Lua, try putting "check" around the call to see what is going wrong. Also, in Lua backslashes need to be doubled. And if this is send-to-script they have to be doubled again.
It might be easier to use forward slashes. So:
check ( PlaySound (1, "c:/sound/boeing.wav", false, 0, 0) )
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Mazarin
(14 posts) Bio
|
Date
| Reply #4 on Thu 19 Aug 2010 10:09 AM (UTC) |
Message
| With forward slashes it works just great. Thanks!!
//Mazarin | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
16,470 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top