|
jmasta Beginner
Joined: 03 Oct 2006 Posts: 11
|
Posted: Thu Jan 25, 2007 4:49 pm
Trigger off a color with random text |
I'm looking to make a color trigger off the color white, with random text.
I tried pasting a sample of white text in, then deleting the text, and checking the ansi trig box, and trigger on line color, but it's not capturing correctly.
Any help would be great.
-jmasta |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Jan 25, 2007 5:42 pm |
Check the ANSI box first, then paste the text. Then change the text part (not the colour code part) to the * wildcard.
You could also use the line colour option if the whole line is that colour. |
|
|
|
jmasta Beginner
Joined: 03 Oct 2006 Posts: 11
|
Posted: Thu Jan 25, 2007 10:45 pm |
Hmm, it's still not working. Here's what I have right now.
ANSI box is checked, and i tried it with the line colour option as well.
Pattern: %e[1;37m(*) (i tried it with a space before (*) and without the ())
Value: playersinroom = 1
everything i've tried leaves @playersinroom = 0. :(
any other suggestions? do i not have the pattern capturing correctly?
thank you,
-jmasta |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Jan 25, 2007 11:55 pm |
1 is bold, 37 is white foreground (see this). Is that right?
|
|
|
|
jmasta Beginner
Joined: 03 Oct 2006 Posts: 11
|
Posted: Fri Jan 26, 2007 1:06 pm |
That's what the chart says, but the text doesn't look bold to me. I tried it without the 1, with a 0(no attributes) and with 22(normal intensity-not bold or faint) but none of those worked either. Usually, the white line will start with a capital letter, but not always.
I am still at a loss. :( Thanks for the help though, Fang.
-Jmasta |
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Fri Jan 26, 2007 1:57 pm |
Why don't you turn on ansi logging and see what the tags are that way?
|
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
jmasta Beginner
Joined: 03 Oct 2006 Posts: 11
|
Posted: Fri Jan 26, 2007 2:58 pm |
I'll check that out when I get home from class, thank you Arminas
-jmasta |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Fri Jan 26, 2007 4:31 pm |
If you look on the zMUD colour options, bold means the brighter version of each colour. Most MUDs do use the bold colours rather than the duller ones.
|
|
|
|
jmasta Beginner
Joined: 03 Oct 2006 Posts: 11
|
Posted: Fri Jan 26, 2007 5:22 pm |
Ok, it is bold, so the correct code is %e[1;37m So I should just end with (*) to capture anything? Or do I not even need it if it's set to Ansi trigger? Does %e[1;37m go in the pattern line, or does it go somewhere else and (*) just goes in the pattern line, then the trigger checks the color on it on whether or not to fire? Thanks again,
-jmasta
ps. The whole line is that color, how would it work with the line color option checked? (referring to Fang's 1st reply) |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Fri Jan 26, 2007 5:34 pm |
The trigger pattern should read "%e[1;37m(*)" - or, on the options page of the trigger you can check the "line colour" option and if you click on the box next to it, choose a colour. Then the pattern will just be (*).
|
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Fri Jan 26, 2007 7:06 pm |
This worked for me. I couldn't get the trigger on line color to work though.
I didn't use the (*) because I didn't see you using the captured results anywhere.
Code: |
#TRIGGER {%e[1;37m} {playersinroom = 1} "" {prompt|color} |
Just paste that into the command line and hit enter. |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
jmasta Beginner
Joined: 03 Oct 2006 Posts: 11
|
Posted: Fri Jan 26, 2007 7:40 pm |
That worked just great, Arminas. Thank you guys for all the help!
|
|
|
|
|
|