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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
GrimofDC
Beginner


Joined: 14 Jul 2002
Posts: 18

PostPosted: 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.
*A farmer peddles her crops here.

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
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Oct 06, 2002 5:11 pm   
 
Does it really have to be limited to WHITE *'s?
#TR {^~*} {#SUB {Invis}}

LightBulb
Senior Member
Reply with quote
GrimofDC
Beginner


Joined: 14 Jul 2002
Posts: 18

PostPosted: 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
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: 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
Reply with quote
GrimofDC
Beginner


Joined: 14 Jul 2002
Posts: 18

PostPosted: 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
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: 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
Reply with quote
GrimofDC
Beginner


Joined: 14 Jul 2002
Posts: 18

PostPosted: Mon Oct 07, 2002 9:09 pm   
 
Cool! Kjata your second example worked. Thank you both for helping me out.

Grim
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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