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
DeathDealer
Adept


Joined: 20 Jul 2004
Posts: 268

PostPosted: Thu Feb 24, 2005 4:47 pm   

Alias with #IF **SOLVED**
 
Wanted to make an enter alias to do one of 2 things, either #tel me to a room OR enter something.
Aardwolf has a way to get a portal wear location. basically, if you are wearing an Amulet of Aardwolf and type enter you get taken to the Aard Hotel.

#alias enter {~enter;#tel 0 "Aardwolf Hotel"}

This of course creates a problem for the normal enter routines like enter (something) because it still does the #tel part.
How would I get it to NOT do the #tel if something is typed after enter?
I'm 75% sure it's with a #alias enter {~enter %-1 and a #if but can't figure it out.

And this of course also leads into a heap of trouble with all the other area portals, but it can easily be solved with an area named alias and it's own #tel so thats not really a problem.

And yeap, i know that the whole thing can easily be averted by just having an alias called en that does the #tel, but this isn't for me but a friend that is TO set into typing enter or enter hole to be able to type en and enter hole. So wanted to try to make her happy by having just the one. I can help her with the area portals alias, it's just this one thing.

Thanks.


Last edited by DeathDealer on Fri Apr 01, 2005 8:14 pm; edited 1 time in total
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Thu Feb 24, 2005 5:11 pm   
 
#ALIAS enter {~enter;#IF (%null("%1")) {#Tel 0 "Aardwolf Hotel"}}

OR

#ALIAS enter {~enter;#IF (%numparam()=0) {#TEL 0 "Aardwolf Hotel}}
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
DeathDealer
Adept


Joined: 20 Jul 2004
Posts: 268

PostPosted: Thu Feb 24, 2005 8:12 pm   
 
Thanks Nexela!!
The 2nd one worked. The 1st wouldn't allow "enter hole" types. would only send enter.
Reply with quote
DeathDealer
Adept


Joined: 20 Jul 2004
Posts: 268

PostPosted: Fri Feb 25, 2005 3:26 pm   
 
And oddly, today neither one of them works at all.

#ALIAS enter {~enter;#IF (%numparam()=0) {#TEL 0 "Aardwolf Hotel"}}

Typed:
enter water

Output:
enter
water

yesterday it worked perfect...
_________________
Reply with quote
DeathDealer
Adept


Joined: 20 Jul 2004
Posts: 268

PostPosted: Fri Feb 25, 2005 3:38 pm   
 
never mind. got it to work with:
#ALIAS enter {~enter %-1;#IF (%numparam()=0) {#TEL 0 "Aardwolf Hotel"}}

Now to hope that it KEEPS working :-)
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