From Discworld MUD Wiki
Revision as of 11:14, 21 October 2009 by Rig (Talk | contribs) (Getting started: Check the alias name before creating alias to that name)

Jump to: navigation, search

Aliases allow you to write and store one or more commands under a name specified by you, allowing you to then execute those commands by typing the name. This saves you a lot of time typing out complete commands, and as aliases can contain things such as parameter parsing and basic conditional clauses, you can make them as complex as needed.

Getting started

Typing 'alias' without any arguments will show you a list of your current aliases. Typing 'alias <alias name>' will show you the command or commands currently aliased to that alias name.

Creating an alias

For basic alias creation, simply type 'alias <name> <command>'. Before creating an alias, a useful check to perform is simply to type the name that you have in mind for your new alias. Although aliases can generally be easily removed (see below), this simple check can make sure that you don't accidentially alias commands to a cardinal direction, etc.

Single command example

> alias lw look Weston
Added alias "lw"
> alias lw
lw: look Weston $*$

If you want to include multiple commands within a single alias, seperate the commands using a semi-colon, i.e. 'alias <name> <command1>;<command2>'

Multiple command example

> alias lw look Weston;nudge Weston
Changed alias "lw" from "look Weston $*$".
> alias lw
lw: look Weston;nudge Weston $*$

Note that some MUD clients process the ; character as a new line symbol. You will need to disable the parser or change the settings to create aliases using this symbol.

Using an alias

You can execute a complicated command using a less complicated input with aliases, as tasks of any given complexity can be simplified into simple aliases. Using the example above:

> lw
Weston looks like a relatively recent recruit to both life as a Hunter and life as a smith.    
He's rather pale aside from his ink-stained fingers, and lacks the muscular physique usually 
associated with his new trade.  However he does look quite content with his situation, a 
slightly bewildered smile on his face more or less constantly.
He is in good shape.
He is standing.
Holding : a smith's hammer (left hand).
Wearing : a pair of hard leather boots, a pair of lightweight beige linen trousers, a
starched white shirt and a brown leather belt.
You nudge Weston.

Removing an alias

To remove an alias, use the command 'unalias <name>'. Continuing the example above:

> unalias lw
Successfully unaliased "lw":
look Weston;nudge Weston $*$
> lw

Alias Resources

The following pages contain aliases which may be useful.

  • General (aliases for day to day things such as commerce and communication)
  • Combat (aliases to perform combat-related actions)
  • Craft (aliases helpful when performing craft actions)
  • Travel (aliases generally consisting of directional commands to get you from A to B)
  • Guild-Related (aliases for guild commands and other guild-specific activities)

External Links