Color code descriptions and examples

&c and &b

In order to allow you to change the colors there are two codes. One is for the foreground color (&c) and the other is for the background color (&b). '&c' is used with one or two arguments depending on brightness, while the '&b' s only used with one because it has only one brightness. They both have the forms as follows:


&c<bright><color>
&b<color>

It is important to set both the foreground and background color because if a player has his default background color set to blue and you use blue as a foreground color it will make the letters invisible to the player. It is also important to set the colors back to the default color when done. This is done by using the following command:


&[default]

Note

The '&[default]' command will be described in the next section. It is enough to know for now that it will return the players colors to their default colors.

Before we give some color examples we should define the symbols for brightness and the symbols for each color and what they are.

Table 2. Colors

CodeColor
nBlack
rRed
g Green
yYellow
bBlue
mMagenta
cCyan
wWhite

Table 3. Sample Color codes

CodeResulting Colors
&cb&bw 
&+g&bn 
&c+w&r 
&c+w&bn 
&[<color>]

As we have said in the previous section, if you're not careful you can make your text not visible to the player by indavertently setting the foreground to the same color as the player's background. To make it easy for you to change how the color looks and even match it with the way players have their colors set already; we created colors that the players can set and you can use. The VME comes with a default list of colors which can be added to by either the color.def or even by a DIL program online. The default colors are as follows:

deathdefaultexit
grouphit_mehit_opponent
hit_otherimmort_descrimmort_title
logmiss_memiss_opponent
miss_othernodam_menodam_opponent
nodam_othernpc_descrnpc_title
obj_descrobj_titlepc_descr
pc_titlepromptrespond
room_descrbroom_titlesay_other
say_selfshield_meshield_opponent
shield_othershout_othershout_self
social_othersocial_selfspells
tell_othertell_selftime
weatherwhisperwho
who_guildwho_invwho_name
who_titlewizxpgain

To use these colors all you have to do is use the following formatting command:


&[color]

The color that will be shown is the color that the player has set for the color in question. If for example the player has his or her 'death' color set to bright red with a black background and you have a description as follows:


descr
"This is a &[death]death&[room_descr]room"

The description would be in the players 'room_descr' color while the word death would be in his or hers 'death' color. You should note we had to set the color back to the room description color so that the rest of the description was not in the 'death' color.

To change the player's color to the default output color: which is the color that is used when no color is specified by the server, then you use 'default'. You probably won't use this in normal zone building but it is very important to know it exists when you start making spells, skills, and commands with DIL