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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
aardmadrox
Newbie


Joined: 28 Jul 2003
Posts: 5
Location: USA

PostPosted: Tue Mar 23, 2010 3:25 pm   

Trigger Question using Color codes
 
I used to have my name colored on zmud and it worked off this trigger.

#TRIGGER {Madrox} {#CW "#01FC13"}

now in Cmud it seems not to be working, can anyone help me make this work?
Reply with quote
aardmadrox
Newbie


Joined: 28 Jul 2003
Posts: 5
Location: USA

PostPosted: Tue Mar 23, 2010 3:32 pm   
 
Ok got the single name one working via string above, now trying to get multiple names

ie

#TRIGGER {Madrox|Maddy} {#CW "#01FC13"}
Reply with quote
hogarius
Adept


Joined: 29 Jan 2003
Posts: 221
Location: islands.genesismuds.org

PostPosted: Tue Mar 23, 2010 4:32 pm   
 
From the help page for #CW: http://forums.zuggsoft.com/modules/mx_kb/kb.php?mode=doc&page=3&refpage=3&a=cmud_%23cw

Syntax: #CW pattern color
Related: #PCOL, #COLOR

If used after a successful trigger, this command will color the phrase matched by the trigger with the specified color.

Supports numeric values generated with the %color function, desciptive values including those listed in the %colorname function, and RGB values in hexadecimal format preceded by a $.

So, your trigger should read as follows:

#TRIGGER {Madrox|Maddy} {#CW $01FC13}
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Mar 23, 2010 4:45 pm   
 
No, actually CMUD handles the # character just fine for colors as long as it's within " quotes...it just isn't documented properly. The problem is that you are missing a set of {} braces. The braces you already have around Madrox|Maddy are just the normal delimiters for a trigger pattern argument. To achieve the | "or" operation in a trigger, you need to enclose the list of possible matches within their own set of {} braces. So the correct trigger would be:

#TRIGGER {{Madrox|Maddy}} {#CW "#01FC13"}

or, you can put the list into a string list variable and then use that within the trigger like this:

#VAR FriendList {Madrox|Maddy}
#TRIGGER {{@FriendList}} {#CW "#01FC13"}
Reply with quote
aardmadrox
Newbie


Joined: 28 Jul 2003
Posts: 5
Location: USA

PostPosted: Tue Mar 23, 2010 5:06 pm   
 
ty for your replies it has been very helpful
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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