|
GrimofDC Beginner
Joined: 14 Jul 2002 Posts: 18
|
Posted: Sun Oct 06, 2002 11:42 am
problem with ansi codes and #sub |
Hello all you helpful people,
I'm trying to #sub a white asterisk with the word 'Invis'
Here is the raw mud output.
[1m*[1;36mA farmer peddles her crops here.[0m
that displays something something like this
*A farmer peddles her crops here.
Note: used a pink * since it would be easier to see than white.
I've tried this ansi trigger
#TR {%e[1m~*} {#sub "Invis"}
but the the first portion of the line looks like it is overwritten.
Invisrmer peddles her crops here.
here is another example if I increase the substitution to "Invisibile"
Invisibilermer peddles her crops here.
I've tried to figure this one out on my own but I haven't been really sucessful and I really need all ansi white *'s at the beginning of a line to show Invis instead. Otherwise my mapper doesn't grab that line into the room description.
Thanks for you help,
Grim |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sun Oct 06, 2002 5:11 pm |
Does it really have to be limited to WHITE *'s?
#TR {^~*} {#SUB {Invis}}
LightBulb
Senior Member |
|
|
|
GrimofDC Beginner
Joined: 14 Jul 2002 Posts: 18
|
Posted: Mon Oct 07, 2002 1:19 am |
yes it must be white *'s since I don't want to be spammed with 20 to 30 lines of 'Invis' whenever I get a line like this:
**************************************
For a quick fix I've put the trigger you suggested in my automapper class it that seems to be working ok since it's not always on. Just wondering why I'm losing characters with ansi triggers.
Thanks very much,
Grim |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Oct 07, 2002 2:31 am |
I don't know why you're losing characters with the ansi triggers. That's why I suggested a quick fix.
To put your mind at ease, you won't get spammed. That line should come out as
Invis *************************************
I'm not sure what color it will be, but only the first * should get subbed.
LightBulb
Senior Member |
|
|
|
GrimofDC Beginner
Joined: 14 Jul 2002 Posts: 18
|
Posted: Mon Oct 07, 2002 3:41 am |
Actually ^~* does something weird in 6.16, but it might be fixed in the beta version. That trigger causes a line of ********* to show up as "Invis Invis Invis Invis etc..". It looks really terrible when there are *'s in a score card too.
Grim |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Mon Oct 07, 2002 7:31 pm |
I don't have zMUD to test with me, but how about this:
#TRIGGER {^%e[1m~*%e[1;36m(*)} {#SUB {Invis%ansi(cyan, high)%1}}
or perhaps with a pattern of:
^%e[1m~*%e[1;36m(*).%e[0m$
Kjata |
|
|
|
GrimofDC Beginner
Joined: 14 Jul 2002 Posts: 18
|
Posted: Mon Oct 07, 2002 9:09 pm |
Cool! Kjata your second example worked. Thank you both for helping me out.
Grim |
|
|
|
|
|