Logged in as Nobody

Vote for Us

Epitaph Help

Categories

Concepts Creator Commands Creator Tutorials Games Innate Commands Known Commands
Lord Npc Objects Playtesters Rooms Rules

Alias

Description

In its most basic form, you can use an alias to shorten other commands, and to combine a number of commands. The following examples demonstrate how it is done.

The first example creates an alias "align". After creating this alias, if you type "sp" the mud will execute "score points". The second example demonstrates another feature: aliases can take arguments. If you type "k zombie", the mud will execute "kill zombie".

The third example demonstrates how to put arguments elsewhere in your command. The $*$ is replaced by whatever you put after the alias. So for example typing "pp money" would have the mud execute "put money in pack".

You can use a semi-colon to execute several commands in one go, as demonstrated in the fourth example, and also use aliases *within* aliases.

Finally, you can use the $1$ and $2$ syntaxes to indicated the first and second words after an alias as shown in the fifth example. The last alias would permit you to do 'sloot money trousers' and it would be executed by the mud as 'get money from corpses; put money in trousers'. The numbered syntax can extend as far as you need, so $9$ would refer to the ninth argument you specify.

Special Aliases (.plan, .project, .reference, login, afterinventory)

If you create an alias login, it will be executed when you login; the alias afterinventory will be executed after your inventory regeneration. Aliases .plan and project affect your finger information. Alias .reference sets the text people will see when they reference you.

You can check all your aliases by simply typing "alias". You can get rid of an unwanted alias with the command "unalias".

As mentioned before, the examples given here are only the tip of the iceberg (although the tip that you will probably use most). For a complete tutorial, see http://imaginary-realities.com/epitaph/wiki/index.php?title=Aliases. For a more in-depth explanation of the unalias command, see help unalias.

Syntax Forms

al_ias 

List all your current aliases.

al_ias rename <alias> to <alias> 

Rename an existing alias to another name.

al_ias sorted 

List all your aliases in alphabetical order.

al_ias sorted <pattern> 

Search your aliases for a particular pattern and then show a sorted list of matching aliases.

al_ias every <alias> 

List all the aliases that start with the indicated text.

al_ias [show] categories 

Show the categories into which your aliases are sorted.

al_ias [show] category <category> 

Show the aliases in the indicated category.

al_ias [show] category <category> search <pattern> 

Show the aliases in a particular category that match the given pattern.

al_ias [show] category default 

Show the aliases in the default category.

al_ias [show] category default <pattern> 

Show the aliases in the default category that match the given pattern.

al_ias [show] sorted category default 

Show the aliases in the default category sorted in alphabetical order.

al_ias [show] sorted category <category> 

Show the aliases from a particular category sorted in alphabetical order.

al_ias [show] sorted category default <pattern> 

Show the sorted aliases that match a particular pattern from the default category

al_ias [show] sorted category <category> search <pattern> 

Show the sorted aliases in the given category matched on the indicated pattern.

al_ias set category <alias> [to] <category> 

Assign the given alias to the indicated category.

al_ias set category <alias> default 

Set the category of the indicated alias to default.

al_ias set category every <alias> <category> 

Set the category of every alias that matches the indicated text.

al_ias set category every <alias> default 

Set the category of every alias that matches the indicated text to 'default'

al_ias uncategorised 

List all the uncategorised aliases.

al_ias uncategorised <pattern> 

List all the uncategorised aliases that match the given pattern.

al_ias uncategorised sorted 

Give a sorted list of all the uncategorised aliases.

al_ias uncategorised sorted <pattern> 

Show a sorted list of all uncategorized aliases matching a particular pattern.

al_ias <alias> 

Show the commands associated with a particular alias.

al_ias <alias> <commands> 

Assosciate the indicated commands with the indicated alias name.

al_ias <alias> in "<category>" <commands> 

Associate the indicated commands with the indicated alias name, and categorise it in the specificed category

Examples

Example one

> alias sp score points Added alias "sp".

Example two

> alias k kill Added alias "k".

Example three

> alias pp put $*$ in pack Added alias "pp".

Example four

> alias loot get $*$ from corpses; cremate corpses; pp $*$ Added alias "loot".

Example five

> alias sloot get $1$ from corpses; put $1$ in $2$ Added alias "sloot".

See Also:

unalias, qalias, ealias
Copyright Statement

Epitaph - Epiphany v1.2.13 [release]. Copyright © Imaginary Realities Ltd 2009 -