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
Death
Apprentice


Joined: 25 Jun 2002
Posts: 109
Location: USA

PostPosted: Fri Jul 12, 2002 5:08 pm   

capturing the color of strings
 
There a way I could capture the color in the string as well. So non-colored strings wouldn't set it off?

--> Name has vanquished his foes, gaining himself level Number!
--> Name forgets the real world and steps into the myth!

black = dark color
green = default grey
red = red
blue = bright white

Those are the 2 basic strings that i want to set off triggers for saying hi or gratz'ing them for leveling.
Reply with quote
Apollyon
Wanderer


Joined: 02 Oct 2001
Posts: 76
Location: USA

PostPosted: Fri Jul 12, 2002 5:51 pm   
 
you could always do this
#trigger {^--> (*) has vanquished his foes, gaining himself level (*)!} {chat Congratulations %1 on attaining level number %2.}

#trigger {^--> (*) forgets the real world and steps into the myth!} {chat Welcome %1, enjoy your stay.}

by putting in the ^ you can prevent dopes from setting off your triggers with says and chats and such.
Reply with quote
Death
Apprentice


Joined: 25 Jun 2002
Posts: 109
Location: USA

PostPosted: Fri Jul 12, 2002 7:10 pm   
 
i do. but there is ways around that. and every now and then imms get restless and play with triggers...and i want the color to search so if they really want to play with triggers to have some editing to do.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Fri Jul 12, 2002 10:06 pm   
 
Yes, triggers can fire based on colors. To do this, you need to check the ANSI trigger in the Options tab for the trigger you want. This allows ANSI control codes in the pattern. Now, you need to find out the control codes that rpdocue the color of the message you want.

An easy way to do this is to open the Editor (Windows|Editor) and make sure it is in Raw Mode (Options|Raw Mode). Now, go to the MUD window, copy the text you want to match, and paste it in the Editor. Now the text appears with the ANSI control codes. Copy this from the Editor and paste it into the Pattern box for your trigger. Finally, replace every occurance of the weird character (the one that always comes before a [) with %e.

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