 |
Loftaris Adept
Joined: 24 Aug 2004 Posts: 277
|
Posted: 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 : |
|
|
 |
Progonoi Magician
Joined: 28 Jan 2007 Posts: 430
|
Posted: 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
-------------------------------- |
|
|
 |
gamma_ray Magician
Joined: 17 Apr 2005 Posts: 496
|
Posted: 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.
|
|
|
 |
Loftaris Adept
Joined: 24 Aug 2004 Posts: 277
|
Posted: 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! |
|
|
 |
|
|