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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
satas
Newbie


Joined: 19 Nov 2006
Posts: 4

PostPosted: Tue Nov 28, 2006 4:49 am   

ansi triggers
 
Can't seem to get ansi triggers to work in cMud at all, is this not implemented?
Reply with quote
Zugg
MASTER


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

PostPosted: Tue Nov 28, 2006 5:51 pm   
 
Post the exact trigger you are trying to get working so that we can try to help. I'm not aware of any problems with ansi triggers.
Reply with quote
satas
Newbie


Joined: 19 Nov 2006
Posts: 4

PostPosted: Tue Nov 28, 2006 9:12 pm   
 
The mapper can't seem to figure out the room info by itself in either zMud or cMud, so I had to do it manually. The only way I could figure out how to get zMud to properly recognize rooms in the mud I play is by setting the room name to display as a different color in the mud's ansi settings. Brown is the color I chose as it is not used for any other text type.

To make the trigger I copied an room name from the mud and pasted into a new trigger making sure the ansi option was checked. I modified this so the following trigger would capture the room name.

%e[33m(.+)%e[37m

In cMud, when I try to paste something I have copied from the mud it strips out the ansi information, so just the regular text is pasted. If I paste the trigger from zMud into cMud it just doesn't seem to fire.
Reply with quote
Zugg
MASTER


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

PostPosted: Tue Nov 28, 2006 9:25 pm   
 
The CMUD Pattern field doesn't support pasting the ansi color codes directly like zMUD did. That's something that will be added in the future.

Your trigger looks like a regular expression trigger, and I'm not sure if regex triggers support the %e syntax. But first make sure you have the Regular Expression option turned on for this trigger. If that still doesn't work, then turn off the regular expression option and try just using a normal zMUD trigger syntax:

%e[33m(*)%e[37m
Reply with quote
satas
Newbie


Joined: 19 Nov 2006
Posts: 4

PostPosted: Wed Nov 29, 2006 3:40 am   
 
Ok, thanks. The square bracket characters were causing the problem. I was able to get it to work, but had to use the following regex to do it.

%e.33m(.+).%e.37m
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Wed Nov 29, 2006 4:27 am   
 
Did you try escaping the brackets with whatever the regex escape char is?
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Nov 29, 2006 5:04 am   
 
With a REGEX I would also reccommend replacing the '%e' with '\033'. That is the octal notation for the value of the ESC char, which would be common usage in all regex engines.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
satas
Newbie


Joined: 19 Nov 2006
Posts: 4

PostPosted: Wed Nov 29, 2006 5:17 am   
 
I did escape the brackets using the backslash. This worked for me in in zMud, but I couldn't seem to get it in cMud. I have it sorted out now well enough to do what I need, and the mapper is working great. Thanks everyone.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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