Jump to content
Eternal Lands Official Forums
Sign in to follow this  
alvieboy

New commands for text aliases

Recommended Posts

Hi,

 

here is the description for the new commands for text aliases (see here for discussion).

 

Text aliases allow you to create a quick command alias to some command - this is very useful if you do write same stuff all the time, like "#gm Hello", and such. To avoid having you to type that all the time, there are up to 100 text aliases you can use. Plus, these aliases can have parameters which you must type when you call the alias.

 

Using an alias is very simple, just type "#<n>", without the quotes, and substituting <n> by the alias number you want to use. This number must be between 0 and 100. So, to use alias number 66, just type:

#66

.

 

To create an alias, just type "#alias <n> <text>", substituting <n> by the alias number, and <text> by the alias text. This text can include commands, such as "#gm" and "/myfriend" .

Example to create alias number 66:

#alias 66 I am such a noob I don't know how to create aliases

.

 

To remove an alias, just type "#unalias <n>"

 

To list your current aliases, type "#aliases".

 

All aliases can be parametrisable. The parameters are limited to 10, from 0 to 9, and have to be "passed" by your alias invocation.

To define an alias with parameters, just use "$N" in your alias text, where N is parameter from 0 to 9. If you want '$' to appear as-is without being handled as a parameter placeholder, just type '$$'.

 

Example of an alias with parameters - remember parameters start at 0:

#alias 1 #gm I feel so $0 today because I $1, and now I want to $2

.

 

You can then call this alias like this:

#1 sad "am a lousy guy" scream

.

 

This will act as if you had typed "#gm I feel so sad today because I am a lousy guy, and now I want to scream". Nice, isn't ?

As you can see from previous example, using doublequotes in the alias arguments makes that text behave as a single argument.

 

If you don't pass enough arguments as required, an error will be shown.

 

This seems to be all for now,

Álvaro

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×