 |
 |
Useful Info

The changes page shows the latest modifications to the game.

Read more...
|
|
 |
|
 |
Nanvaent help directory: Commands: Personal: Alias
Please email any further questions to help@nanvaent.org. You may also wish to have a look at the FAQ.

commands/personal/alias Nanvaent Player Help
NAME
alias - list or change aliases
USAGE
al [ <alias_name> [ <new_definition> ] ]
alias [ <alias_name> [ <new_definition> ] ]
DESCRIPTION
Aliases are widely used throughout play to help enter multiple
commands with just a few key strokes.
In it's simplest form, you can use aliases to just enter a longer
command for you.
> alias ga get all from corpse
Having defined the "alias" ga, when you enter "ga" it will be
translated into "get all from corpse".
> ga
[get all from corpse]
You get the fine steel short sword and 57 platinum coins from the
corpse of the wuzzie guard.
All of the translations are transparent. You do not see them on your
screen. In all of the examples here I will show what Nanvaent
translates them into using [ ] brackets.
You can 'chain' multiple commands together using a ';' semicolon.
> alias ga get all from corpse; search
> ga
[get all from corpse]
You get the fine steel short sword and 57 platinum coins from the
corpse of the wuzzie guard.
[search]
You peer around and notice a hidden exit leading south!
A common usage of an alias is known as a 'travel alias', used to move
around the game quickly. Here is an example of one:
> alias runaround n;n;n;n;n;w;n;n;n;e;n;n;n;w;n;e
> runaround
[n]
[n]
[etc]
In these definitions I use the word argument to mean anything after
the first command. So in "get all from corpse" "get" is the command,
"all" is the first argument, "from" is the second argument, etc.
$*$ means all the arguments:
> alias ga get $*$ from corpse
> ga long steel sword
[get long steel sword from corpse]
$<n>$ means just one argument. So $1$ means the first argument, $8$
means the 8th argument, etc:
> alias ga get $2$ from $1$
> ga corpse sword
[get sword from corpse]
$*<n>$ means all arguments up to and including argument <n>. So $*2$
means the first argument to the second argument. $*5$ means arguments
1 to 5:
> alias ga get $*2$ from $3$
> ga long sword corpse
[get long sword from corpse]
> alias ga get $3$ from $*2$
> ga wuzzie corpse sword
[get sword from wuzzie corpse]
$<n>*$ means all arguments after and including the argument <n>:
$2*$ means all arguments 2 upwards.
> alias ga get $3*$ from $*2$
> ga wooden box bright red pencil case
[get bright red pencil case from wooden box]
$arg:<text>$ means if there is an argument, use it, otherwise take the
default of <text> instead:
> alias ga get $arg:all$ from corpse
> ga
[get all from corpse]
> ga pencil
[get pencil from corpse]
> ga long sword
[get long sword from corpse]
A _very_ useful way of using this is to put $arg:victim$ at the end
of your combat aliases. For example:
alias cw cast web of binding at $arg:victim$
Then, as a wizard, cw will translate to cast web of binding at victim
and cw blah will translate to cast web of binding at blah.
The words "victim" and "victims" are a special case, and can be used
whenever in combat to choose random people (or all people) you are
fighting.
$arg<n>:<text>$ means if argument <n> exists, use it, otherwise take
the default of <text> instead:
> alias ga get $arg1:all$ from $arg2:corpse$
> ga
[get all from corpse]
> ga hat
[get hat from corpse]
> ga hat sack
[get hat from sack]
The earlier use of $arg:victim$ also applies here too. Use
$arg<n>:victim$ instead.
~~ means ignore running an alias for this command:
> alias smile say I'm happy;~~smile
> smile
You say: I'm happy
You smile.
Using that example, if you don't want to say I'm happy, prepend
with ~~
> ~~smile
You smile.
You may be thinking: What happens to arguments that haven't been
specifically handled by the alias?
Any unused arguments are added to the end of the converted string, as
if a $*$ had been added at the end of the alias.
> alias ga get $1$ from
> ga hat sack
[get hat from sack]
> ga hat dirty sack
[get hat from dirty sack]
If an argument is specified in the alias but missing in the command
line, the argument is treated as blank:
> alias ga get $1$ hat from nail
> ga
[get hat from nail]
> ga red
[get red hat from nail]
If you just enter "alias" then you will be shown all of your defined
aliases. To change an alias use "ealias". To remove an alias use
"unalias".
> alias
ca : consider all
exs : examine sword
ga : get all
ka : kill mall
sk : skills
stats : score stats
Some special aliases exist:
Alias name Description
---------- -----------
.plan Shown in finger under heading "Plan"
.creplan As .plan but only immortals can see it
.project Shown in finger under heading "Project"
login Alias to run immediately after logging on
.signature Automatically added to the bottom of mail and
posts you make on boards
CAVEATS
Recursive aliases are not allowed for obvious reasons.
You cannot specify ';' inside your alias as part of the command. All
';' are treated as the end of one command:
> alias travela s;alias travelb n;n;n
> travela
[s]
[alias travelb n]
[n]
[n]
In the example I was trying to just go south once and redefine alias
travelb to n;n;n. What actually happened is I went south once, aliased
travelb to n, then went north twice. It would have been nice to be able
to change aliases on the fly. Oh well :(
You will need to 'save' after changing any of the aliases relating to
your finger information like '.plan'. The new version will then be
shown, rather than the old version when someone uses 'finger' on you.
SEE ALSO
chfn, ealias, finger, nickname, unalias, save
|
 |