alias
alias <creature|object>
The name aliases of a creature or object, as an iterable of word strings.
These are the keywords by which the entity can be referred to — the same
words a player would type to target it. Each alias is a separate
string element, exactly as if the alias list had been run through
words.
Arguments
<creature|object>— the entity whose aliases to list. A value of any other type is a run-time error.
Returns
An iterable whose elements are string aliases. Consume it with
each, count, first,
keyword, abbrev, or another iterable
consumer. An unresolved argument yields null.
Examples
after command (say) {
do "say My first alias is [first [alias $self]]."
}
[first [alias $self]] is the owner's first keyword; for the debug-world
mob Puff it evaluates to "Puff", so the mob says "My first alias is
Puff."
after command (say) {
oload 1
do "say The box answers to [first [alias [first [inventory $self]]]]."
}
After oload loads object vnum 1, [alias ...] yields the
box's keywords; the first is "locker", so the mob says "The box
answers to locker."
Because the result is a word iterable, it pairs naturally with the keyword matchers:
before command (get) {
require [keyword [alias $self] "puff" "dragon"]
}
keyword is true when any of the owner's aliases matches
one of the listed words.