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


Joined: 31 Mar 2001
Posts: 39
Location: USA

PostPosted: Fri Feb 15, 2002 1:28 am   

Command to check color of a word?
 
Ok say I have a line that is the same except for a change in color on the words.

This is a line.

and the word line changes various colors say red blue yellow.

Now I know you could make one trigger with the ascii color codes for each possible color but is there a command I'm missing that would do something like this
#trig {This is a (%w).} {#if (%colorword(%1)=1) {#say red}}

so that you can do a command based on the color of the word line.
PS. I have found the %linecol command but this appears to only do the start of the line you can't do %linecol(%1) for example.
Input appreciated.
Tambu
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Fri Feb 15, 2002 3:33 am   
 
A trigger ignores all ANSI codes in the MUD output and so there is no way to see the codes from insde the commands of a trigger. The only way to make a trigger not ignore the ANSI codes is to make it an ANSI trigger, but then the codes are only used to see if the pattern will still match or not.

Kjata
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