Difference between revisions of "Alias"
(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...") |
m (category) |
||
(13 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
An '''Alias''' is a shortcut command used to run one or a series of actions. | |||
There are two types alter aeon aliases which run on the game server and client aliases which run on locally on the computer under the program used to connect to alter aeon. | |||
For example {{Icode|stab <mobname>}} could be used to:- | |||
# stop wearing a sword | |||
# wield a dagger | |||
# backstab a mob | |||
This is both easier and quicker than typing out the three commands it would have taken to do this normally. | |||
==Client side aliases== | |||
Specific to each [[:category:client|client]] you will need to consult your client’s user documentation to create them. | |||
==Alter aeon (server) aliases== | |||
These run on the alteraeon game server and will always run regardless of what client you use. To create one type {{icode|alias set <aliasname>}} | |||
Format: | Format: | ||
Line 33: | Line 51: | ||
'help alias args' for more information. | 'help alias args' for more information. | ||
===Function key aliases=== | |||
Aliases which run when you press the f keys on the keyboard. Only for use with the [[dclient]]. For example to create an alias for the f1 key type {{ICode|key type alias set f01}} | |||
== Alias Arguments == | === Alias Arguments === | ||
Up to 9 arguments may be used in aliases, each space delimited. Inside the | Up to 9 arguments may be used in aliases, each space delimited. Inside the | ||
Line 54: | Line 74: | ||
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. | 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. | ||
=== Escape characters === | |||
* Use a double pipe to escape pipes in aliases. | |||
* Use a double dollar sign to escape variables in aliases. Using just a single dollar will insert the variable's value into the alias. | |||
== Alias Comments == | === Alias Comments === | ||
Line 65: | Line 89: | ||
Any text after the '##' is ignored. | Any text after the '##' is ignored. | ||
=== Useful Aliases === | |||
Some aliases you might find of use. | |||
==== 'Any Set' Saves Gear ==== | |||
Some players will have a piece of equipment they would like to use regardless of whatever set of equipment they are in. Some examples might include: | |||
Boots of Speed | |||
Any other Perma-spell Item (often [[infravision]], [[water breathing]], [[Haste]]) | |||
Equipment with very high Saving Throws | |||
You will be taking advantage of the 'remove -(location)' function as well as [[UUID]]s. | |||
You may want to use Boots of Speed in almost every set when taking down powerful mobs. | |||
A quick example for Boots of Speed. You will replace the (Speed UUID) and (Container UUID) with the actual UUID of your items (remove the parentheses), which can be seen via the [[insult]] command.: | |||
alias = f04 | |||
remove -boots | |||
get (Speed UUID) (Container UUID) | |||
wear (Speed UUID) | |||
A simple alias to switch back to whatever boots you were wearing. | |||
alias = f05 | |||
rem (Speed UUID) | |||
put (Speed UUID) (Container UUID) | |||
wear all | |||
Another example for saves equipment. Perhaps you have two pieces of wrist, and one piece of leg equipment with really high fire saves: | |||
alias = firesave | |||
rem -wrists ##Removes both pieces of wrist equipment | |||
rem -legs | |||
put all container | |||
get (Bracer1 UUID) (Container UUID) | |||
get (Bracer2 UUID) (Container UUID) | |||
get (Leggings UUID) (Container UUID) | |||
wear all | |||
I would recommend using [[eqset]]s to switch back to your main sets from these multiple-piece equipment aliases. | |||
==Alias scripting== | |||
There are various commands and statements that can be used inside an alias for scripting:- | |||
* lecho - echoes entire text unprocessed can be used for testing triggers and aliases. | |||
* var - sets a server variable i.e. var <var> <value> | |||
* [[varset]] - sets a variable to the value of a specific character stat i.e. varset hp hp | |||
* if statements - for conditional processing i.e. if $var = 1 c heal | |||
===Varset=== | |||
As of April 2015 it is possible to set a variable to your characters current hp, mana and movement, for example {{Icode|varset hp hp}}, {{icode|varset m mana}}, {{icode|varset mv move}} | |||
===Testing for empty variables=== | |||
As of April 2015 if statements were changed to better allow for testing of empty values. The following snippets below show how to test for an empty and a non-empty variable: | |||
* if "$(var1)" == "" lecho var1 is empty | |||
* if "$(var1)" != "" lecho var1 is NOT empty | |||
When typing in an alias don't forget to use a double dolar sign to escape the variable or else the current value of the variable will be substituted and saved into the alias. | |||
==Notes== | |||
* aliases are case sensitive so it is possible to have more than one aliases of the same name using different combination of lower and upper case letters.. | |||
* aliases substitute text when writing in different contexts such as email, board posts etc | |||
==See Also== | |||
===Wiki=== | |||
* [[varset]] | |||
===Articles=== | |||
* [http://www.alteraeon.com/articles/using_the_in-game_text_editor.html using the in-game text editor] | |||
===Help files=== | |||
* [http://alteraeon.com:8080/help?searchtype=standard&helpfile=aliases+macros+unalias+editing aliases macros unalias editing] | |||
* [http://alteraeon.com:8080/help?searchtype=standard&helpfile=aliases+args+arguments aliases args arguments] | |||
* [http://alteraeon.com:8080/help?searchtype=standard&helpfile=aliases+comments aliases comments] | |||
* [http://alteraeon.com:8080/help?searchtype=standard&helpfile=variables+var variables vars] | |||
* [http://alteraeon.com:8080/help?searchtype=standard&helpfile=varset+variable+set varset variable set] | |||
* [http://alteraeon.com:8080/help?searchtype=standard&helpfile=if-command+conditional if-command conditional] | |||
[[Category:Terminology]] | |||
[[Category:Alias]] |
Latest revision as of 14:15, 21 May 2015
An Alias is a shortcut command used to run one or a series of actions. There are two types alter aeon aliases which run on the game server and client aliases which run on locally on the computer under the program used to connect to alter aeon.
For example stab <mobname> could be used to:-
- stop wearing a sword
- wield a dagger
- backstab a mob
This is both easier and quicker than typing out the three commands it would have taken to do this normally.
Client side aliases
Specific to each client you will need to consult your client’s user documentation to create them.
Alter aeon (server) aliases
These run on the alteraeon game server and will always run regardless of what client you use. To create one type alias set <aliasname>
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.
Function key aliases
Aliases which run when you press the f keys on the keyboard. Only for use with the dclient. For example to create an alias for the f1 key type Template:ICode
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.
Escape characters
- Use a double pipe to escape pipes in aliases.
- Use a double dollar sign to escape variables in aliases. Using just a single dollar will insert the variable's value into the alias.
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.
Useful Aliases
Some aliases you might find of use.
'Any Set' Saves Gear
Some players will have a piece of equipment they would like to use regardless of whatever set of equipment they are in. Some examples might include:
Boots of Speed Any other Perma-spell Item (often infravision, water breathing, Haste) Equipment with very high Saving Throws
You will be taking advantage of the 'remove -(location)' function as well as UUIDs.
You may want to use Boots of Speed in almost every set when taking down powerful mobs.
A quick example for Boots of Speed. You will replace the (Speed UUID) and (Container UUID) with the actual UUID of your items (remove the parentheses), which can be seen via the insult command.:
alias = f04 remove -boots get (Speed UUID) (Container UUID) wear (Speed UUID)
A simple alias to switch back to whatever boots you were wearing.
alias = f05 rem (Speed UUID) put (Speed UUID) (Container UUID) wear all
Another example for saves equipment. Perhaps you have two pieces of wrist, and one piece of leg equipment with really high fire saves:
alias = firesave rem -wrists ##Removes both pieces of wrist equipment rem -legs put all container get (Bracer1 UUID) (Container UUID) get (Bracer2 UUID) (Container UUID) get (Leggings UUID) (Container UUID) wear all
I would recommend using eqsets to switch back to your main sets from these multiple-piece equipment aliases.
Alias scripting
There are various commands and statements that can be used inside an alias for scripting:-
- lecho - echoes entire text unprocessed can be used for testing triggers and aliases.
- var - sets a server variable i.e. var <value>
- varset - sets a variable to the value of a specific character stat i.e. varset hp hp
- if statements - for conditional processing i.e. if $var = 1 c heal
Varset
As of April 2015 it is possible to set a variable to your characters current hp, mana and movement, for example varset hp hp, varset m mana, varset mv move
Testing for empty variables
As of April 2015 if statements were changed to better allow for testing of empty values. The following snippets below show how to test for an empty and a non-empty variable:
- if "$(var1)" == "" lecho var1 is empty
- if "$(var1)" != "" lecho var1 is NOT empty
When typing in an alias don't forget to use a double dolar sign to escape the variable or else the current value of the variable will be substituted and saved into the alias.
Notes
- aliases are case sensitive so it is possible to have more than one aliases of the same name using different combination of lower and upper case letters..
- aliases substitute text when writing in different contexts such as email, board posts etc