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
Cordir
Beginner


Joined: 23 Jan 2011
Posts: 20

PostPosted: Sat Feb 08, 2014 9:39 pm   

Special characters
 
The mud that I frequent uses the bracket ( [ ) in its room exits. When I want to set up a two line trigger to colorize certain rooms, Cmud seems to be unhappy with the use of brackets. (A two line trigger is needed for some instances, as room names are not 100% unique, and the exits can determine whether or not I'm in the specific room I want to colorize.)

For example:

A vestibule
[Exits: north south west]

I've been building the trigger like this:

<trigger priority="4740" id="1945">
<pattern>A vestibule.$[Exits: north south west]</pattern>
<value>#COLOR "yellow,mxpgreen"</value>
</trigger>

But it doesn't seem to be triggering, because of the brackets in the exit line. Any suggestions on what I'm doing wrong? (I am QUITE a novice at this sort of thing)
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Sat Feb 08, 2014 9:56 pm   
 
As with all special characters in patterns, you need to escape it with the tilde (~) to treat it as a literal character, rather than as its special function. This should work fine:
Code:
<trigger priority="4740" id="1945">
<pattern>A vestibule.$~[Exits: north south west~]</pattern>
<value>#COLOR "yellow,mxpgreen"</value>
</trigger>
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