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
Latent
Apprentice


Joined: 19 Aug 2002
Posts: 120
Location: USA

PostPosted: Sat Feb 01, 2003 7:14 am   

multi word aliases
 
is it possible to make an alias where you type "who family" and it outputs something else? up until now i have only used 1 word, just wondering if you could use 2 some how.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Sat Feb 01, 2003 7:55 am   
 
ZMud will interpret the two things as two things.

You can make an alias out of the first word and then ignore the second
word completely:
#ALIAS who {#ECHO Do something else here;#NOOP Something to catch the paramter and ignore it}

Or you can store all the words after for reference or something:

#ALIAS who {#ECHO Do something different;#VAR whoparams "%-1";#SHOW Passed to the who alias @whoparams}

If you want to replace the who command and do send a changed who command
make sure you ~ the command in the alias so you don't cause a loop:

#ALIAS who {~who -i -t -b %-1}

Ton Diening
Reply with quote
Davos
Adept


Joined: 30 Jan 2003
Posts: 228
Location: USA

PostPosted: Sat Feb 01, 2003 9:12 pm   
 
Or you could just use who_family or WhoFamily heh

The Seaworthy
Reply with quote
Latent
Apprentice


Joined: 19 Aug 2002
Posts: 120
Location: USA

PostPosted: Sat Feb 01, 2003 9:55 pm   
 
I am currently using who_family, but im so used to typing it in without the underscore that i often forget so im just trying to find a way to type it in without the underscore and have it still work
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sun Feb 02, 2003 1:43 am   
 
#ALIAS who {#IF (%1 = "family") {your code here}}

Kjata
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Feb 02, 2003 6:54 am   
 
#AL who {~who %replace( %-1, "family", "your family goes here")}

This allows you to use family anywhere, not just as the first item. It will also work with multiple families.

LightBulb
Advanced Member
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