Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
dvgalius2002@yahoo.com
Beginner


Joined: 01 Aug 2006
Posts: 21

PostPosted: Thu Aug 03, 2006 5:26 am   

Trigger question
 
Hey guys, sorry I don't know much about triggers. Just wondering how I would color certain words in sentences.

For example, "You get 3827 gold coins from the corpse of a Guard"

How would I color the number in one color, gold in another, and the mob name in another color? Thanks in advance
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Thu Aug 03, 2006 3:23 pm   
 
Use the #SUBSTITUTE command. This command lets you replace text matched by a trigger with some text that you specify:

#TRIGGER {You get (%d) gold coin({s|}) from (*)} {#SUB {You get %ansi(blue)%1 %ansi(high, yellow)gold%ansi(default) coin%2 from %ansi(high, red)%3%ansi(default)}}
_________________
Kjata
Reply with quote
verin
Newbie


Joined: 03 Aug 2006
Posts: 4
Location: discworld

PostPosted: Thu Aug 03, 2006 8:44 pm   Another Newbie question on Triggers
 
In the mud I've been playing, I keep hearing about sound triggers. I can do colors, but how can I get zMUD to play a sound with the trigger?
Reply with quote
Dumas
Enchanter


Joined: 11 Feb 2003
Posts: 511
Location: USA

PostPosted: Thu Aug 03, 2006 8:55 pm   
 
If you mean playing sounds from your own computer, you can use #PLAY.

If they meant the MUD has a set of sounds that can be used with it, then that is MSP information. Check the zMUD support documention about it if that is what they meant.
Reply with quote
verin
Newbie


Joined: 03 Aug 2006
Posts: 4
Location: discworld

PostPosted: Thu Aug 03, 2006 8:59 pm   
 
No, It's not within the MUD, all external. I'll have a look into "#PLAY". See what I can find in the help files, and play with it.
Thanks
Reply with quote
Dumas
Enchanter


Joined: 11 Feb 2003
Posts: 511
Location: USA

PostPosted: Thu Aug 03, 2006 9:10 pm   
 
just had to ask though, because this is from the MSP documentation:

The purpose of the MUD Sound Protocol (MSP) is to allow different sounds/music to be played in certain situations. To achieve this, both server and client must support this protocol. The protocol itself is really simple. The server can send special sequences, called sound triggers, that result in sound being played at client side. No information, requests or anything is sent in the opposite direction. The protocol also includes support for downloading sound files from the server.

Now, of course I didn't mean 'internal' to the MUD. MSP just allows the MUD to send its own codes to play sounds that you've put on your computer, just as MXP code can be sent from a MUD to do other types of things.
Reply with quote
verin
Newbie


Joined: 03 Aug 2006
Posts: 4
Location: discworld

PostPosted: Thu Aug 03, 2006 9:22 pm   
 
I've neither heard any discussion of MSP, nor seen it anywhere in the MUD's info. So I'm going to assume it's not there and stick to #PLAY. The help file doesn't seem to be too helpful, though.

Is there a specific place I should store the sound file to be used?
Reply with quote
saet
Apprentice


Joined: 12 Jun 2006
Posts: 106

PostPosted: Thu Aug 03, 2006 10:28 pm   
 
I prefer to use #PCOL for highlighting like this.

#TRIGGER {You get (%d) (gold) coin{s|} from the corpse of a (*)} {
#PCOL blue %x1
#PCOL gold %x2
#PCOL red %x3
}

To me it just seems more readable using #PCOL.
Reply with quote
verin
Newbie


Joined: 03 Aug 2006
Posts: 4
Location: discworld

PostPosted: Thu Aug 03, 2006 10:29 pm   
 
Woohoo! finally got wired for sound. I had the files in the right place, just didn't have the syntax down correctly. The helpfile on #PLAY could use some work
Reply with quote
Dumas
Enchanter


Joined: 11 Feb 2003
Posts: 511
Location: USA

PostPosted: Thu Aug 03, 2006 11:28 pm   
 
it tends to assume that everyone has a lot of experience with windows file conventions. You are right. Maybe in CMUD.
Reply with quote
dvgalius2002@yahoo.com
Beginner


Joined: 01 Aug 2006
Posts: 21

PostPosted: Fri Aug 04, 2006 4:14 am   
 
Thanks guys, works great.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net