Alias: Difference between revisions

From Eternal Lands Wiki
Jump to navigation Jump to search
m (Robot: Cosmetic changes)
Line 12: Line 12:
''<nowiki>#</nowiki>alias <number> <message>''
''<nowiki>#</nowiki>alias <number> <message>''


where <number> is 1-99
where <number> is 0-99


Then to use the alias:
Then to use the alias:
Line 18: Line 18:
''<nowiki>#</nowiki><number>''
''<nowiki>#</nowiki><number>''


 
e.g.  
e.g.
''<nowiki>#</nowiki>alias 1 #gm Hello World
 
<nowiki>#</nowiki>1''
''<nowiki>#</nowiki>alias 1 #gm Hello World
<nowiki>#</nowiki>1''
 


would say <nowiki>#</nowiki>gm Hello World.
would say <nowiki>#</nowiki>gm Hello World.
Line 31: Line 28:
''<nowiki>#</nowiki>unalias <number>''
''<nowiki>#</nowiki>unalias <number>''


 
e.g.  
e.g.
''<nowiki>#</nowiki>unalias 1''
''<nowiki>#</nowiki>unalias 1''


would remove the alias we created earlier.
would remove the alias we created earlier.
Line 42: Line 38:


You can also create aliases that accept arguments. For example, if you often advertise in the market " I'm selling Life Essences @ 4 gc each pm me for details (not a bot) ". You could alias the text so that it allows any item:
You can also create aliases that accept arguments. For example, if you often advertise in the market " I'm selling Life Essences @ 4 gc each pm me for details (not a bot) ". You could alias the text so that it allows any item:
 
''<nowiki>#</nowiki>alias 1 @@3 I'm selling $0 @ $1 gc each pm me for details (not a bot) ''
''<nowiki>#</nowiki>alias 1 @@3 I'm selling $0 @ $1 gc each pm me for details (not a bot) ''
 


Then to send your advert :
Then to send your advert :
 
''<nowiki>#</nowiki>1 "Life Essence" 4''
''<nowiki>#</nowiki>1 "Life Essence" 4''
 


or to advertise Fox Fur @ 5 gc (for example)
or to advertise Fox Fur @ 5 gc (for example)
''<nowiki>#</nowiki>1 "Fox Fur" 5''


''<nowiki>#</nowiki>1 "Fox Fur" 5''


Note: the arguments are space separated so if you want 2 words to be 1 argument, use set of double quotes ("").


Note: the arguments are space separated so if you want 2 words to be 1 argument, use "".
Finally, the aliases are recursive so, continuing the advert example, if you had an advert you sent all the time, you could do:
''<nowiki>#</nowiki>alias 2 <nowiki>#</nowiki>1 "Life Essence" 4''


Finally, the aliases are recursive so, continuing the advert example, if you had an advert you sent all the time, you could do:
then typing <nowiki>#</nowiki>2 would send: @@3 I'm selling Life Essences @ 4 gc each pm me for details (not a bot)


''<nowiki>#</nowiki>alias 2 <nowiki>#</nowiki>1 "Life Essence" 4''


If you don't pass enough arguments as required, an error will be shown
  Text alias requires parameters, but none given


then typing <nowiki>#</nowiki>2 would send: @@3 I'm selling Life Essences @ 4 gc each pm me for details (not a bot)
Extra arguments are ignored silently without an error.

Revision as of 20:55, 13 January 2012

#Alias

This feature was added to the EL client a little while ago by Alvie. This is a short tutorial written by Minion07 and editted to fit in wiki.

#alias lets you save something you type a lot. e.g. instead of typing #gm Hello All! , you could just type #1.

To alias something, type:

#alias <number> <message>

where <number> is 0-99

Then to use the alias:

#<number>

e.g. 
#alias 1 #gm Hello World
#1

would say #gm Hello World.

To remove aliases, type:

#unalias <number>

e.g. 
#unalias 1

would remove the alias we created earlier.

You can list all the aliases you have made by typing #aliases.

Advanced Features

You can also create aliases that accept arguments. For example, if you often advertise in the market " I'm selling Life Essences @ 4 gc each pm me for details (not a bot) ". You could alias the text so that it allows any item:

#alias 1 @@3 I'm selling $0 @ $1 gc each pm me for details (not a bot) 

Then to send your advert :

#1 "Life Essence" 4

or to advertise Fox Fur @ 5 gc (for example)

#1 "Fox Fur" 5


Note: the arguments are space separated so if you want 2 words to be 1 argument, use set of double quotes ("").

Finally, the aliases are recursive so, continuing the advert example, if you had an advert you sent all the time, you could do:

#alias 2 #1 "Life Essence" 4

then typing #2 would send: @@3 I'm selling Life Essences @ 4 gc each pm me for details (not a bot)


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

 Text alias requires parameters, but none given

Extra arguments are ignored silently without an error.