|
aardmadrox Newbie
Joined: 28 Jul 2003 Posts: 5 Location: USA
|
Posted: 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? |
|
|
|
aardmadrox Newbie
Joined: 28 Jul 2003 Posts: 5 Location: USA
|
Posted: 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"} |
|
|
|
hogarius Adept
Joined: 29 Jan 2003 Posts: 221 Location: islands.genesismuds.org
|
Posted: 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} |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: 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"} |
|
|
|
aardmadrox Newbie
Joined: 28 Jul 2003 Posts: 5 Location: USA
|
Posted: Tue Mar 23, 2010 5:06 pm |
ty for your replies it has been very helpful
|
|
|
|
|
|