Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
ZekeAdvanced
Newbie


Joined: 16 Oct 2003
Posts: 5
Location: USA

PostPosted: Wed Oct 22, 2003 11:11 pm   

Alias help...
 
I'm almost a total newb. I have a trigger that feeds me when I'm hungry but that's all I can manage.
What I need is a alias that'll take my potions from my cloud bag when i throw them. But I don't know how to make aliases well, if at all.
Please help me...
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Oct 23, 2003 2:44 am   
 
Aliases aren't hard. Just pick a name for the alias; this is what you will type when you want to use it. Then put the commands you want it to perform. %1 to %99 give you a way to refer to the first ninety-nine parameters (usually words) after the alias's name, without having to know what they are. Any parameters not used within the alias script are appended to the end of the final command.

Command Line
#AL tp {get %1 cloud;throw %1}

Editor
Name: tp
Value:
get %1 cloud
throw %1

Usage is the same either way.
tp potion-name [target]
tp is the alias name
potion-name is the first word (parameter) after tp. Use "potion name" if you need two or more words.
target is where to throw it. It's optional.
Reply with quote
mr_kent
Enchanter


Joined: 10 Oct 2000
Posts: 698

PostPosted: Thu Oct 23, 2003 1:07 pm   
 
quote:
Use "potion name" if you need two or more words.



I've tried to find a way to get away without quoting multiple word parameters. I can't find a way. Is there any way to force an alias to use everything following the name as the first parameter, without having to quote it all?
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Thu Oct 23, 2003 2:38 pm   
 
#ALIAS do {#var all {%-1};#echo @all}
#VAR all {}

Will capture everything
The { } let Zmud know you want to get it all not just append
Reply with quote
mr_kent
Enchanter


Joined: 10 Oct 2000
Posts: 698

PostPosted: Thu Oct 23, 2003 3:13 pm   
 
quote:
Originally posted by megamog75

#ALIAS do {#var all {%-1};#echo @all}
#VAR all {}

Will capture everything
The { } let Zmud know you want to get it all not just append



Thanks!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net