|
Corleidum Novice
Joined: 30 Apr 2003 Posts: 43 Location: Sweden
|
Posted: Thu May 06, 2004 10:39 pm
Asni color off? |
I have a question..
I have a trigger looking like this
#TR {~$ (%w)~:} {%ansi( yellow)Comms %ansi(NOoCLOR)~$ %1 ~:}
What should replace the NOCOLOR so I have it without a color?
Because my mud already give the comm a color, and I just want the "comm" part to be colored just before the comm.. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu May 06, 2004 10:59 pm |
Change green to whatever color the $ should have.
#TR {^~$ } {#SUB {%ansi( yellow)Comms %ansi( green)$}} |
|
|
|
Corleidum Novice
Joined: 30 Apr 2003 Posts: 43 Location: Sweden
|
Posted: Thu May 06, 2004 11:37 pm |
Hmm green? That's a color though?
And while you are reading this lightbulb
I have a #CAP on (%w) tells you: %2
the prob is, it looks like this
xxxx tells you: ok here is the tell, and my mud doenst support word
wrapping.
So it only captures the first line, are there any way of caputring the entire thing?
Myabe if I have GOLD color on the tell TR {(%w) tells you: %2} {#CW GOLD}
and then ansi trigger? is that possible? and if so, how todo it..? |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri May 07, 2004 4:51 am |
Let me be absolutely clear. There is no NOCOLOR code. Whatever you use as the pattern for a #SUB trigger will lose whatever color codes were associated with it.
The best that can be done with normal patterns is to limit the color loss to the $. It might be possible to do something using the ANSI option, but it would require far more effort than I'm willing to provide.
Multiline captures can be tricky. The key is to find a method of identifying the end of the captured material. You then just start capturing when you receive the initial pattern and continue capturing until you receive ending pattern. Simple in theory, but seldom in practice. |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Fri May 07, 2004 11:09 am |
First %ansi(default) is the closest to a nocolor you can get but it is still a color
Second A RED line changed to a GREEN line with #SUB #CW etc is still has ansi codes for a RED line (I believe this was the way it was when I tested it)
Third Multiline tells are easy to capture with #conditional triggers
#TRIGGER "tellcap" {Tells you:} {#TEMP "tellcaptemp" {^$} {#STATE tellcap 0};#cap tells}
#COND {^(*)$} {#IF (!%null("%1")) {#CAP tells}} {looplines|param=4}
Or something along those lines |
|
|
|
|
|