Help/Alias
Alias
There are two alias systems in DikuMUD. The original alias system is built into the dictionary which you can buy in Udgaard and in Midgaard. Look at the dictionary for help (see {Help Dictionary}). The old system is for you if you're using telnet only.
This help section is about alias in the web client, which has built-in alias handling. Your aliases are kept with your character, so they follow you to any browser, but only the web client carries them out. While you carry a dictionary, the alias command goes to the dictionary instead.
Usage:
alias // list your alias alias foo // remove alias foo alias foo cmd1 [\; cmd2] // create alias foo
No arguments will list all your defined aliases. One argument will remove the alias in question (in this case `foo'). Any other number of arguments will result in the first word of the argument to become an alias for the remainder. An alias name can be at most 12 letters long, and you can have up to 25 aliases.
Various special control characters are available in aliases:
You can combine several commands with the semicolon ';'. When you type the alias command, write each semicolon as '\;', or the web client splits your line there and sends the rest as a command of its own.
You can insert various parts of an argument in an alias-text using the dollar sign '$'. $1 will get the first word of the argument, the '$2' the second word etc. The '$0' can be used to substitute the entire argument string.
Examples:
alias ge get $1 from $2\; eat $1 alias gb ge bread bag alias gs ge steak sack
The alias 'gb' will then mean 'get bread from bag; eat bread' and the commands will be carried out in that order. Alternatively 'gs' will mean 'get steak from sack; eat steak'.
alias say emote whispers almost inaudibly '$0'
Will make the say command have another appearance for other players, ie: say Hello, friends becomes:
Gnort whispers almost inaudibly 'Hello, friends'
Notice that 'sa' will still work as the original say-command, as aliases don't check for abbreviations, unlike the command interpreter.
Notice that ANY and all use of ';' and of '$' followed by a digit in an alias will be interpreted as that character's special meaning. I.e.:
alias greet say Hi Quinn $0 God !! \;-)
will substitute the '$0' with whatever argument 'greet' will be given or simply the empty string. Thus the alias 'greet' with no arguments will yield the commands: 'say Hi Quinn God !! ' and because the special character semicolon was used the second command will be '-)', which will give an error message from the interpreter (Unless aliased of course).
See Also:
{Help Trigger}
{Help Variable}
{Help Dictionary}