Alias

From Alter Aeon Wiki
Revision as of 04:31, 23 January 2013 by Nyx (talk | contribs) (Created page with " Format: set alias <keyword> alias set <keyword> alias edit <keyword> alias show [keyword] aliases [keyword] unalias <keyword> The 'aliases' and 'alias show' commands w...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Format:

set alias <keyword>
alias set <keyword>
alias edit <keyword>
alias show [keyword]
aliases [keyword]
unalias <keyword>

The 'aliases' and 'alias show' commands will show you a list of all your current aliases. You can also see what each alias is by giving its keyword, for example 'alias show nuke' to see your 'nuke' alias.

The 'unalias' command deletes an existing alias.

Aliases can contain more than one command. To begin setting an alias, use the 'alias set' command, for example:

alias set nuke

Once you've started setting the alias, you'll be prompted to enter commands into the alias, one line at a time. Simply type in the commands you want for the alias, and when you're done finish the alias with a '/done' command on the last line.

To edit an alias, use the 'alias edit' command. For example:

alias edit nuke

Note that aliases may invoke other aliases, but cannot invoke themselves recursively. The number of aliases that may be set is dependent on character level. Aliases may also take and pass around arguments. See 'help alias args' for more information.


Alias Arguments

Up to 9 arguments may be used in aliases, each space delimited. Inside the alias, arguments are referenced by using $1 through $9, with $0 and $* both representing all arguments. Additionally, a 'shift' command is available inside aliases to shift higher arguments down to lower ones.

Here is a sample alias 'healtwo' that takes arguments:

    say I will now heal $*
    cast heal $1
    shift 1
    cast heal $1

The first line says all the arguments that the alias is invoked with.

The second line attempts to cast heal using the first argument as a target.

The third line shifts the arguments left by one. This means that the second argument now becomes the first.

The fourth line attempts to cast heal using the first argument as a target, but since we shifted the arguments it will not hit the same target as the second line.


Alias Comments

Comments can be added to any line of an alias using the '##' separator. For example:

get ae45 pocket ## this is a comment, ae45 is the uuid of my sword

Any text after the '##' is ignored.