![]() |
by Greg Kempe www.kempe.net |
|
![]() |
|
|
![]() |
||
| Screenshots |
There are examples of MUSH Formatter's usage lower down this page.
|
Main Window
This is the main MUSH Formatter window. You can select the formatting type and choose between a file and the clipboard for input and output. Dropping a file (or files) onto this form will format it using the selected options.
|
Prefences
This is the main prefernces dialog. As you can see, you can easily and quite dramatically change the way in which MUSH Formatter operates. |
![]() |
![]() |
| Example |
Consider the following piece of MUSH code that displays the location of all the players
connected to the game:
# --- BEGIN CODE
&where_cmd me=
$+where:
@pemit %#=Where everyone is...%r%r;
@dolist lwho()=
{
@pemit %#=
#
# Name
#
[ljust(name(##),15)]
#
# Location and dbref
#
[name(loc(##))]%(#[loc(##)]%)
}
-
# --- END CODE
In its present form, it would be unintelligible to the MUSH parser and would result
in a lot of Huh? messages. When passed through the MUSH Formatter, the following code results:
&where_cmd me=$+where:@pemit %#=Where everyone is...%r%r;@dolist lwho()={@pemit %#=[ljust(name(##),15)][name(loc(##))]%(#[loc(##)]%)}
As you can see, this line of code will make a lot more sense when sent to the game.
© Greg Kempe, 1998-2001