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
mystilon
Newbie


Joined: 07 Mar 2003
Posts: 2
Location: USA

PostPosted: Fri Mar 07, 2003 7:28 am   

Alias Issues
 
The mud that I just started has no reply command, so I'm trying to create one using an alias. Normally this wouldn't be a problem, as a simple #ALIAS reply {tell @replyto} would do, assuming that the @replyto var had a proper value.

However, in this case the reply command also has a reply lock/unlock feature which I am trying to get working as well. I currently have it doing if statements to see if the first word is lock or unlock, and reacting accordingly (see below):


#ALIAS reply {
#IF (%1 = lock) { #T- replyto } {
#IF (%1 = unlock) { #T+ replyto } {
tell @replyto %1
}
}
}

The problem being that %1 only contains the first word passed to the alias. And theoretically anywhere between 1 and 99 of the params could be filled. What I need is a way to send the entire list of paramters to the "tell @replyto" command, without sending a lot of extra spaces.
Reply with quote
Troubadour
GURU


Joined: 14 Oct 2000
Posts: 556
Location: USA

PostPosted: Fri Mar 07, 2003 7:32 am   
 
%-1 (note the -) will be assigned all parameters.

%-2 would be assigned parameters 2 thru 99.


Troubadour
(Win 98, Pentium III, 550 MHz)
Reply with quote
mystilon
Newbie


Joined: 07 Mar 2003
Posts: 2
Location: USA

PostPosted: Fri Mar 07, 2003 7:36 am   
 
Thanks a lot :)
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