Manual:Zone Manual/Color and Formatting Codes/Formatting code descriptions and examples

From DikuMUD Wiki
Jump to navigation Jump to search

Formatting code descriptions and examples

&&
If you want a single '&' you must let the VME know that you don't want a formatting or a color code. You do this by doubling the '&' sign. The following is a couple examples:
text Result
&& &
&&&& &&
&&&&&& &&&
&l
When you want to turn off the formatting you use this formatting code. Everything after the '&l' will be shown exactly as you put it in the string.
	&l
	*     *
	 *   *
	  * *
	   *
	  * *
	 *   *
	*     *
&f
The formatted text as we have already said is default. If you want to turn the formatted text back on after some literal text you will have to use the '&f' code. The following is an example of some literal text followed by a short bit of formatted text.
	&l
	*     *
	 *   *
	  * *
	   *
	  * *
	 *   *
	*     *

	&fThe X marks the spot!
&s<#>
If you want to input extra spaces in a sentence with out using the

'&l' you can add them one at a time or multiple by using the '&s' code.

	This sentence has 10 spaces&s10before the first word before.
&n
If you want to input some blank lines with out using the literal code you can add a '&n'for each line you want.
	This sentence&n&n&n would look like this:

	This sentence

	would look like this:
&x
The line break is made for use with the DIL language. You will not need it to do regular text formatting. It was added so a DIL could split a string that is loaded from a file. If you don't understand the following example don't worry it is explained more in the DIL reference.
	mystrlist:=split(string,"&");
&h
On terminals that can handle it the '&h' will clear the screen. If you wanted a sign that would clear the screen before displaying when a character looked at it would look like this.
	&h&l
	*     *
	 *   *
	  * *
	   *
	  * *
	 *   *
	*     *

	&fThe X marks the spot!