Welcome to the Builder Academy

Question Soundsend

More
22 Jun 2012 05:01 #173 by Halenbane
Replied by Halenbane on topic Re: Soundsend
Mushclient

I just get confused when I look at all of the different ways to do it, From a zip file downloaded, from a url, using !! , using SoundSend , etc etc.

I just want to be able to send a sound to the player , that is using mushclient , whenever it is called for.

I'd prefer to have it send by reading the wav file from the server, rather than the player having to download a package prior.

Please Log in or Create an account to join the conversation.

More
22 Jun 2012 05:23 #174 by Vatiken
Replied by Vatiken on topic Re: Soundsend
I'm not 100% sure, but I don't think you can play sounds from an on-line server thru MushClient. I think you'd have to go through a plug-in route like these guys did. If you don't want your player to have to DL and soundpack and plug-in, you might be interested in using Mudlet. You can host your own zip package of sounds/visuals and have Mudlet automatically DL the file when a player connects.

As far as I know, zMUD/cMUD? are the only clients that can play sounds from an on-line server, although in my attempts with zMUD I was only able to get it to work with the files saved on my disk.

tbaMUD developer/programmer

Please Log in or Create an account to join the conversation.

More
22 Jun 2012 05:45 #176 by Halenbane
Replied by Halenbane on topic Re: Soundsend
I looked at what you posted for materia magic and noticed they had a toggle to enable sound. Is this not needed since sendsound was added? I now have the file test.wav in my mushclient/sounds/combat folder and in the who function I have it as SoundSend(ch->desc, "sounds/combat/test.wav");

It seems like this is all I would need, but I still get no sounds.

Please Log in or Create an account to join the conversation.

More
22 Jun 2012 05:47 #177 by Halenbane
Replied by Halenbane on topic Re: Soundsend
This is the msp plugin i have enabled on mushclient
Code:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE muclient> <!-- Saved on Friday, August 09, 2002, 1:00 PM --> <!-- MuClient version 3.25 --> <!-- Plugin "msp" generated by Plugin Wizard --> <muclient> <plugin name="msp" author="Nick Gammon" id="7da63d78d9f91bebb5285127" language="VBscript" purpose="Emulates MSP (MUD Sound Protocol)" save_state="y" date_written="2002-08-09 12:58:11" requires="3.24" version="1.0" > <description trim="y"> <![CDATA[ Type: "msp:help" to see this help. See: http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=783 for a more complete description. You will need to get the sound files manually (ie. from the MUD) and install them before using this. The plugin is configured to look for them in c:\mushclient\msp, but you can change that by typing: set_msp_path new_path eg. set_msp_path d:\muds\mushclient\msp You may need to enable MSP manually, as this plugin does not do telnet negotiation. eg. On Dawn Of Time MUDs, type: msp on ]]> </description> </plugin> <!-- Get our standard constants --> <include name="constants.vbs"/> <!-- Triggers --> <triggers> <trigger enabled="y" match="^(.*)\!\!SOUND\(([A-Za-z0-9./]+).*\)(.*)$" name="sound" omit_from_output="y" regexp="y" script="OnSound" sequence="100" > </trigger> </triggers> <!-- Aliases --> <aliases> <alias script="On_set_MSP_path" match="set_msp_path *" enabled="y" > </alias> </aliases> <!-- Variables --> <variables> <variable name="msp_path">c:\mushclient\msp\</variable> </variables> <!-- Script --> <script> <![CDATA[ ' ' Trigger script to simulate MSP (MUD Sound Protocol) ' sub OnSound (strName, strLine, aryWildcards) dim sBefore, sSound, sAfter, iColourFore, iColourBack ' extract text from wildcards ' wildcard 1 is the text before the sound ' wildcard 2 is the sound file name ' wildcard 3 is the text after the sound sBefore = aryWildcards (1) ' what arrived before the !!SOUND directive sSound = replace (aryWildcards (2), "/", "\") ' sound file to play sAfter = aryWildcards (3) ' what arrived after the !!SOUND directive ' play sound - directory in variable world.Sound (world.getvariable ("msp_path") & sSound) ' remember current world.note colours iColourFore = world.notecolourfore iColourBack = world.notecolourback ' set note colour to default text colour world.NoteColourRGB world.NormalColour (8), world.NormalColour (1) ' display the text surrounding the sound world.note sBefore & sAfter ' set note colour back to what it was world.NoteColourRGB iColourFore, iColourBack end sub sub On_set_MSP_path (strName, strLine, aryWildcards) dim sPath sPath = aryWildcards (1) ' ' ensure trailing backslash ' if right (sPath, 1) <> "\" then sPath = sPath & "\" end if world.setvariable "msp_path", sPath world.note "MSP sound files will be obtained from " & _ sPath end sub ]]> </script> <!-- Plugin help --> <aliases> <alias script="OnHelp" match="msp:help" enabled="y" > </alias> </aliases> <script> <![CDATA[ Sub OnHelp (sName, sLine, wildcards) World.Note World.GetPluginInfo (World.GetPluginID, 3) End Sub ]]> </script> </muclient>

Please Log in or Create an account to join the conversation.

More
22 Jun 2012 05:49 - 22 Jun 2012 05:51 #178 by Halenbane
Replied by Halenbane on topic Re: Soundsend
Just noticed the variable path is a bit different than where the sound is stored, Im going to try and change that to see if it is the only problem.


*Edit*

Fixed the path, still nothing :(
Last edit: 22 Jun 2012 05:51 by Halenbane.

Please Log in or Create an account to join the conversation.

More
22 Jun 2012 09:07 #182 by KaVir
Replied by KaVir on topic Re: Soundsend

Halenbane wrote: I looked at what you posted for materia magic and noticed they had a toggle to enable sound. Is this not needed since sendsound was added?

It is, you'll need to add a simple command or config option that toggles sound on/off:

ch->desc->pProtocol->pVariables[eMSDP_SOUND] = !ch->desc->pProtocol->pVariables[eMSDP_SOUND];

In fact it would probably make sense to add the command directly to tbaMUD.

You could in theory use the MSP negotiation to enable sound automatically, but there are three problems with doing that:

1) Some clients can play sounds using MSP but don't support the negotiation.

2) Some clients support MSP but the player might not have the soundpack.

3) Some clients support MSP but the player might not want to play sounds.

I've ranted about MSP before, so I'll spare you a repeat, but suffice to say I consider the protocol poorly thought out. However it's far better supported by mud clients than any of the alternatives.

Please Log in or Create an account to join the conversation.

Time to create page: 0.213 seconds