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
JerleMin
Novice


Joined: 17 Oct 2000
Posts: 38

PostPosted: Sat Aug 31, 2002 4:52 am   

Terminating an ansi function?
 
How can I go about terminating a %ansi function? I setup a sub function to add in timestamps to my chats and stuff, and used %ansi to colour it. However many users often have ansi-colour prefixes(for chat) and right now it's stripping the colour from those prefixes, and other such matters.. Anything after the #SUB ends works fine, but I would like to see colours prior to it.

Jerle Minara,
zMUD 6.34
Win 2k Advanced Server
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sat Aug 31, 2002 5:00 am   
 
I think the problem is that the trigger has stripped all the ansi codes out of what it is SUBbing. I would have to see your trigger, an example of the mudinput, what it outputs like and what you want it to look like to be sure though.
Reply with quote
JerleMin
Novice


Joined: 17 Oct 2000
Posts: 38

PostPosted: Sat Aug 31, 2002 5:02 am   
 
Trigger:


~<- Leaves -~> (*)

Performs:


#SUB {%ansi( high, red)~[%ansi( high, cyan)%time( hh:mm:ss)%ansi( high, red)~] %ansi( high, cyan)~<- %ansi( high, red)Logout %ansi( high, cyan)-~>%ansi( default) %1}


Output:
<- Leaves -> Gabriel has fled from Land of Chaos.


Jerle Minara,
zMUD 6.34
Win 2k Advanced Server
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Aug 31, 2002 2:17 pm   
 
You can't terminate an %ansi function. You can use another %ansi function to switch to a different set of colors, but there's no way to revert to the MUD colors once you choose to override them. %ansi(default) is your default text color, but it's still a specific color.

LightBulb
Senior Member
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sat Aug 31, 2002 5:14 pm   
 
If I understand right you want to not change the colors in anything after the "<- Leaves ->", so we just remove it from the trigger and then the SUB doesn't affect it.

#TR {^~<- Leaves -~>} {#SUB {%ansi( high, red)~[%ansi( high, cyan)%time( hh:mm:ss)%ansi( high, red)~] %ansi( high, cyan)~<- %ansi( high, red)Logout %ansi( high, cyan)-~>%ansi( default)}



Output:
<- Leaves -> Gabriel has fled from Land of Chaos.


Jerle Minara,
zMUD 6.34
Win 2k Advanced Server

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