|
satas Newbie
Joined: 19 Nov 2006 Posts: 4
|
Posted: 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?
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: 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.
|
|
|
|
satas Newbie
Joined: 19 Nov 2006 Posts: 4
|
Posted: 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. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: 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 |
|
|
|
satas Newbie
Joined: 19 Nov 2006 Posts: 4
|
Posted: 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 |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Wed Nov 29, 2006 4:27 am |
Did you try escaping the brackets with whatever the regex escape char is?
|
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: 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 |
|
|
|
satas Newbie
Joined: 19 Nov 2006 Posts: 4
|
Posted: 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.
|
|
|
|
|
|