Check out our other great game worlds.

2.10 LUSTERNIA'S ALIAS SYSTEM

An alias in Lusternia is a combination of letters and/or numbers, with no spaces. Linked with this 'word' is a command. When you type the alias, the command will be executed instead.

For example, if your alias was, 'sayhi' and the command associated with it was 'say Hi everyone!' then every time you entered 'sayhi', Lusternia would turn it into 'say Hi everyone!'.

Overview -------- 
You may name your aliases and your targets whatever you want, provided they are 12 or fewer characters long. It is important that you do _not_ name your aliases the same as any commands that you want to use, else the commands will not work for you. When you type in EAT PENNYROYAL, for instance, Lusternia will first search to see if you have an alias called "eat". If you do, then it will try to execute that.


Aliases and continuation ------------------------

Aliases will accept a string of input after the initial command. This input will be appended to the alias when it is run. For example, if you set the alias 'sayhi' to do 'say Hi everyone!', then 'sayhi How are you?' will do 'say Hi everyone! How are you?'

NOTE: This will not occur if you use a substitution in your alias. See Aliases and subtitutions below.


Aliases and targets --------------------

Within aliases, you may embed what are called targets. Think of targets as an alias within an alias. All targets in an alias must be preceeded with a & character.

So, for example, let's make the 'sayhi' alias from above a bit more functional, so that it may be targeted to your guildmaster, whomever that happened to be at the time.

You would first set your 'sayhi' alias to equal 'hi &gm', where 'gm' is the target. You would then set that target (settarget gm <name>) to be the name of whoever your guildmaster is. If you set the 'gm' target to be 'Estarra', then 'sayhi' would execute 'hi Estarra'.

It should be pointed out that generally you do NOT need 10 aliases for punch (for instance). Instead of different aliases for 'punch hyena', 'punch rat', etc, all you need to do is use a target. For example:

setalias k kick &tar 
settarget tar <whatever>

Set up all your attacking aliases to use target, and then when you want to attack a new opponent, simply change the target, and all your attacking aliases will now work on the new target.


Aliases and substitution ------------------------

Sometimes you just want to make part of a command into shorthand to save you some time. For example, typing out 'CLAN CRAFTERS TELL Hello everybody' is awfully long, but in this instance using a target wouldn't work as you want to be able to chat without having to change your target each time. In this case, we can use a substitution token.

You can use a substitution token by entering $ followed by a number to indicate the word to use. $0 will use everything after your alias, whereas $2 would use the second word.

For example:
 setalias crtell clan crafters tell $0

If I then entered 'crtell Hello everybody', the game would automatically expand it to 'CLAN CRAFTERS TELL Hello everybody'.

However, if I set the alias instead to: 
setalias crtell clan crafters tell $2

And entered the same command, the game would expand it to 'CLAN CRAFTERS TELL everybody'.

You can also append a * to a substitution (e.g. $2*) to include all words including and after the second word. This is useful in situations such as targeted emotes with says in them, where you wish to have the target defined as the first parameter and the say elsewhere from the rest of your parameters, e.g. ('setalias customsay emote says inquisitively to ^$1, "$2*"': 'customsay Estarra What's up?' becomes 'emote says inquisitively to ^Estarra "What's up?"')

NOTE: If you use a substitution flag in an alias, continuation will be disabled for the alias and you will have to use substitution to get the rest of your input.


Aliases and dynamic targets ---------------------------

In other instances, you may want to set a target, but want to be able to change that target easily without having to go through the SETTARGET steps. In this case, you can precede your target name with ^, example ^tar, and it will do just that.

Example, I have an alias set as follows: 
setalias stf point staff at ^tar

If I type in 'stf spider', it will set your internal target called 'tar' to spider and expand your command to 'point staff at spider' at the same time.

Then, if I type just 'stf' afterwards, the game will expand your command to 'point staff at spider' again without needing to reenter the target.


Command list:

SETALIAS <alias name> <substituted text> : Makes a new alias. 
ALIASLIST/AL                             : Lists your aliases. 
CLEARALIAS <alias name>                  : Clears an alias.

SETTARGET/ST <target name> <text>        : Makes a new target. 
TARGETLIST/TARLIST                       : Lists your targets. 
CLEARTARGET <target>                     : Clears a target.