An alias can be defined through the GUI window activable with the menu item Aliases in the Tools menu or through the commandline command #alias. The syntax is the following:
#alias {shortcut} {command list}
The parameters of the command are the same as the textbox in the GUI window and have the following meanings:
Replacement can contain other aliases or GGMud internal commands, also complex stuff like the #wait command or if clauses.
To remove an alias you can use the command #unalias with the shortcut as parameter or with the Delete button on the alias window with the alias you want to remove selected in the alias list (this is the preferred method).
Remember to save your aliases once done with the Save button in the alias window. Aliases are load and saved from the ASCII file $HOME/.ggmud/aliases (on win32 INSTALLATIONDIR/bin/aliases), aliases are saved as a sequence of #alias commands, one per line.
The only way to disable an alias without deleting it is to globally disable parsing or starting your command line with the verbatim " character (double quote). Alias anyway are parsed ONLY if they start at the beginning of a line or after a separator character ; (semicolon).
Examples:
#action {pb} {rem bag;open bag;put %1 bag;close bag;wear bag}
With the command pb sword you will put the sword in the bag and wear it on your back.
#action {mygos} {goss $c0009%0$c0011}
Provided that goss hello everybody! prints something like:
You gossips, 'hello everybody!'
|
With the command mygos hello everybody! you will print something like:
You gossips, 'hello everybody!' |
7 | 8 n | 9 u |
4 w | 5 l | 6 e |
1 | 2 s | 3 d |