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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
obor
Wanderer


Joined: 20 Dec 2001
Posts: 56
Location: USA

PostPosted: Tue Aug 26, 2003 12:58 pm   

where'd the color numbers go in 6.62?
 
I remember in 6.40, if I entered "color" or "cw" in the index for help, it would give me a list, by number, of all the colors.

the idea being I set up triggers for stuff like when you get disarmed.

i.e.

#tr {DISARMS you and sends your weapon flying!} {#cw 666}

in the help files, there was a description about how to adjust the background color, the foreground color, and how to bold the colors, by using math. i.e. add 8 to the basic color's # to make it bold, so that if 1 was blue, then 9 would be bold blue. then multiply by 16 to make the background orange, or whatever.

well, that's what I"m trying to find. the math. I can't find it in the help files in 6.62 when I look at color or cw in the help files.
Reply with quote
Anabasis
Wanderer


Joined: 26 Jan 2001
Posts: 74

PostPosted: Tue Aug 26, 2003 2:40 pm   
 
I dunno if that is still in the help files or not, but I happened to have it handy in a text file.

quote:
...to make a color brighter, add 8 to the base value. For example, 9 is bright blue. To change the background color, rather than the foreground, multiply the base value by 16. For example, to get a red background, use 4*16 or 64. To make the foreground font bold, add 128 to the value.

Thus, a bold white on a blue background would be 128 + 1*16 + 15 = 159.


Ana
Reply with quote
obor
Wanderer


Joined: 20 Dec 2001
Posts: 56
Location: USA

PostPosted: Tue Aug 26, 2003 3:05 pm   
 
perfect!! that's it!!!
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Tue Aug 26, 2003 10:06 pm   
 
The list got taken out since it would have to be duplicated in 7 places, and a specific numeric value could always be achieved by the %color function.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Aug 27, 2003 2:53 am   
 
Actually, most of us who actually are interested in knowing details such as this would probably be satisfied with having it in one place (which is how it was before). A function isn't the same as having the actual information, and isn't always as convenient or useful. Even if you never use it, others will.

I appreciate that a lot of work and thought went into revising the helpfiles. Please don't be offended if we don't all agree that every change was for the better. It's actually possible that some things might have been better before, and that others would be better in a mixture of how it was and how it is now.
Reply with quote
obor
Wanderer


Joined: 20 Dec 2001
Posts: 56
Location: USA

PostPosted: Thu Aug 28, 2003 2:14 am   
 
vijilante, what do you mean, referencing the %color function?

also, how do you do underlining? I did it "accidnetally", must've jacked up my math somehow, but I would LOVE to know how to set up a trigger to underline stuff that I feel is important.

EDIT - did searches for underlining, didn't find a response, nor did I find it in the help files.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri Aug 29, 2003 1:17 am   
 
Underline is 256.
#SHOW %color( under) // 256
For instance, to underline cyan text (3) on a black background (0), it's 3 + 256 = 259.
#SHOW %ansi( 259)cyan

%color isn't very helpful for this, since it calculates the number for an underlined cyan background if you put under first
#SHOW %color( under,cyan) //304

and ignores under if it's not first.
#SHOW %color( cyan,under) //3
#SHOW %color( cyan,black,under) //3

Fortunately, you can underline by simpling using the word "under" with %ansi, #CW, etc.
#SHOW %ansi( under,3)cyan
#SHOW %ansi( cyan,under)cyan
#TR {underline} {#CW under}
Reply with quote
obor
Wanderer


Joined: 20 Dec 2001
Posts: 56
Location: USA

PostPosted: Fri Aug 29, 2003 7:09 am   
 
hurm...so let's say I wanted to underline the "bash" message a bright cyan background with a bold blue foreground font

blue = 1, bold = 128 (129 for foreground font)
cyan = 3, bright = 8 (11*16 = 176 for background)
256 for underline

#tr {You SLAM into} {#cw 561}

does my feeble mind follow?

EDIT - WHOA!!! just made the effort...holy schmackers, that makes the stuff blink!!! 'the hell did I do that???
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri Aug 29, 2003 3:43 pm   
 
Bright colors aren't allowed for background. So it's
Blue foreground = 1
Cyan background = 3*16 = 48
Bold = 128
Under = 256
1 + 48 + 128 + 156 = 433

It's much simpler to just use the words:
#TR {You SLAM into} {#CW bold,blue,cyan,under}
Reply with quote
Slick
Newbie


Joined: 16 Apr 2003
Posts: 5

PostPosted: Sat Aug 30, 2003 12:28 pm   
 
If all else fails, you can just do this...

#variable colorcount 0;#REPEAT 5000 {#show TEST COLOR @colorcount;#COLOR @colorcount; #MATH colorcount @colorcount+1}

...and ZMud will spit out the whole list. Hope you don't have epilepsy. :D
Reply with quote
obor
Wanderer


Joined: 20 Dec 2001
Posts: 56
Location: USA

PostPosted: Tue Sep 02, 2003 2:22 pm   
 
OH GOD MY EYES!!! i actually did that. quite....interesting.

how the heck you get that blinking?

so far, it's +8 for "bright", *16 for background adjustment, +128 for bold, and +256 for underline.

what's the math for blinking?

EDIT - whoa...just reread LightBulb's reply.

it is a whole helluva lot easier to do it that way, using words.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Sep 02, 2003 8:05 pm   
 
#SHOW %color( blink)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion 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