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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Loftaris
Adept


Joined: 24 Aug 2004
Posts: 277

PostPosted: Wed Jan 14, 2009 8:59 pm   

Ansi trigger help
 
I'm trying to create a trigger for a line that uses ansi.

The line is as follows:

[PARTY] Playername: i said something

the [PARTY] is in yellow, everything after that is regular non-colored text, including the players name and :
Reply with quote
Progonoi
Magician


Joined: 28 Jan 2007
Posts: 430

PostPosted: Wed Jan 14, 2009 9:05 pm   
 
Here's what I did.

entered

Code:

#show %ansi(yellow)[PARTY]%ansi(default) Playername: i said something


Then copied it onto clipboard.

Made a new trigger and checked ANSI before doing anything else.

Then pasted the line above into pattern box.

Code:

<trigger priority="10" ansi="true" id="1">
  <pattern>%e[53m[PARTY]%e[0m Playername: i said something$</pattern>
  <value>#say test</value>
</trigger>


Given that the yellow is actually yellow (bright), it should work.

Either way, that's how I usually do ansi triggers myself.

For getting the 100% correct color codes, obviously you copy the line straight from your MUD.
_________________
The Proud new owner of CMud.

--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
--------------------------------
Reply with quote
gamma_ray
Magician


Joined: 17 Apr 2005
Posts: 496

PostPosted: Wed Jan 14, 2009 9:08 pm   
 
The quickest way is to create a new trigger and tick the ANSI box in the settings editor, and then copy and paste a sample line into the pattern box, it -should- copy the ANSI that you want. The next quickest way is to open up the debugger and make sure show ANSI is on.
Reply with quote
Loftaris
Adept


Joined: 24 Aug 2004
Posts: 277

PostPosted: Wed Jan 14, 2009 9:20 pm   
 
I tried using that ansi box, but it was AFTER I made the trigger.

Copy/pasted works fine, just needed the checkmark first.

Thanks guys!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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