Unknown2005-12-01 17:30:47
Okay, it's a little bit of a dumb question: I know how to colour words and whole lines of text, but have forgotten how to highlight the words in different colours. Could anyone tell me how?
Shorlen2005-12-01 17:41:53
QUOTE(grongard @ Dec 1 2005, 01:30 PM)
Okay, it's a little bit of a dumb question: I know how to colour words and whole lines of text, but have forgotten how to highlight the words in different colours. Could anyone tell me how?
231076
With what client?
Unknown2005-12-01 17:51:31
I'm not sure what you mean.
"You have been slain by Superman"
#TRIGGER {You have been slain by} {#CO red,bold}
#TRIGGER {Superman} {#CO yellow,bold}
Would make the words before Superman bright red, and Superman yellow. I dont really know what you mean by 'I can colour lines and words but not words in different colours", just colour different words seperately. The only real issue is that if it isnt a relatively uncommon word, you'll find it popping up all bright and fancy in places you wouldnt necessarily need it to.
Assuming you use zMUD.
"You have been slain by Superman"
#TRIGGER {You have been slain by} {#CO red,bold}
#TRIGGER {Superman} {#CO yellow,bold}
Would make the words before Superman bright red, and Superman yellow. I dont really know what you mean by 'I can colour lines and words but not words in different colours", just colour different words seperately. The only real issue is that if it isnt a relatively uncommon word, you'll find it popping up all bright and fancy in places you wouldnt necessarily need it to.
Assuming you use zMUD.
Unknown2005-12-01 18:27:43
You use #PCOL for each argument enclosed with brackets (%x1, %x2 etc), if that's what you're asking for.
QUOTE
#REGEX {(arrives|leaves) (?:from|to) the (@directions)} {#PCOL Yellow %x1
 #PCOL Yellow %x2}
 #PCOL Yellow %x2}
Unknown2005-12-02 04:23:24
Okay, I was a little rushed in making this post. I want to highlight lines with colour like...umm, stuff in Murphy's system . Maybe if you see it you'll understand what I'm trying to get.
Unknown2005-12-02 04:28:10
Ah, you want to change the background color?
Look up %ansi function in the helpfile.
Look up %ansi function in the helpfile.
QUOTE
#ECHO %ansi( hi, red, white)" REBOUNDING! "
Unknown2005-12-02 04:36:07
Ah, there we go, I knew that I was missing one function or the other. Thanks.
Unknown2005-12-03 02:38:53
I like to use nicer colors, so I go with #CW for my highlights. ANSI colors are too limiting. If you use #CW, you can provide two colors, separated by a comma, for foreground and background, too.
CODE
#REGEX {\\b(?:@Enemies)\\b} {#cw firebrick,antiquewhite}
Shorlen2005-12-05 18:34:34
QUOTE(Zarquan @ Dec 2 2005, 10:38 PM)
I like to use nicer colors, so I go with #CW for my highlights. ANSI colors are too limiting. If you use #CW, you can provide two colors, separated by a comma, for foreground and background, too.
CODE
#REGEX {\\b(?:@Enemies)\\b} {#cw firebrick,antiquewhite}
231908
But %ansi can work with #echos trivially, is the thing. So I can have my alias:
#alias heal {#echo ;#echo %ansi(yellow,red)YOU ARE NOT A HEALER! YOU CAN'T SAVE %1 EVEN IF YOU WANTED TO!}
which clearly and loudly reminds me I gave up healing for hexes every time I try to heal someone, which is quite often
Unknown2005-12-07 18:57:48
I agree that the %ansi function has its uses. I'm just saying that if you want to color a name or a line, it's more flexible to use #CW for the colors. Using only %ansi-supported colors is limiting. For arbitrary echo things, I use MXP codes to get the same color choices.
CODE
#ALIAS heal {#echo ~YOU ARE NOT A HEALER! YOU CAN'T SAVE %1 EVEN IF YOU WANTED TO!~ }
Shorlen2005-12-10 04:01:24
QUOTE(Zarquan @ Dec 7 2005, 02:57 PM)
I agree that the %ansi function has its uses. I'm just saying that if you want to color a name or a line, it's more flexible to use #CW for the colors. Using only %ansi-supported colors is limiting. For arbitrary echo things, I use MXP codes to get the same color choices.
CODE
#ALIAS heal {#echo ~YOU ARE NOT A HEALER! YOU CAN'T SAVE %1 EVEN IF YOU WANTED TO!~ }
234155
Dude! I didn't know you could do that! I thought #echos were limited to ansi colors.
Now, how do I use the color picker with that....
Unknown2005-12-10 15:00:53
When I tried to use mxp in echos, it was being displayed with a delay. For example, I had a first line of a message triggered to echo some mxp colored text, and it was displayed after the prompt.