 |
DeathDealer Adept

Joined: 20 Jul 2004 Posts: 268
|
Posted: 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 |
|
|
 |
nexela Wizard

Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: 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}} |
|
|
|
 |
DeathDealer Adept

Joined: 20 Jul 2004 Posts: 268
|
Posted: 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. |
|
|
|
 |
DeathDealer Adept

Joined: 20 Jul 2004 Posts: 268
|
Posted: 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... |
|
_________________
 |
|
|
 |
DeathDealer Adept

Joined: 20 Jul 2004 Posts: 268
|
Posted: 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 :-) |
|
|
|
 |
|
|
|