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
SpiritWolf
Wanderer


Joined: 02 Jul 2002
Posts: 74
Location: USA

PostPosted: Tue Dec 24, 2002 3:31 pm   

[6.40] alias problem
 
#ALIAS look {#say test;#send look %1}

Using the above, when I type "look w", the "#say test" part works, but the "#send look %1" part doesn't. I just get a blank line in the mud and have to hit enter again to get my prompt back.

If I use #ALIAS look (%w) {#say test;#send look %1} its as if the alias never even worked at all and the command was sent normal to the mud. Ie: I get no #say test command sent.

Any ideas? Am I missing something really simple?
Reply with quote
Humpton
Apprentice


Joined: 10 Oct 2000
Posts: 158
Location: Chicago, IL

PostPosted: Tue Dec 24, 2002 4:40 pm   
 
The second one definitely won't work, and I'm not sure how you might have come up with that syntax.

The first one is close. Take out the #send part and just have look %1.

#send is for sending a text file to the mud one line at a time. In your case you are trying to send the contents of 'look' to the mud with each line prefixed with %1. No file 'look' means a blank line, I guess.

Stay JOLLY!
H

___
Humpton lives like he types.... fast, and full of mistakes!

Core 2651: For those who prefer the future to the past.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Tue Dec 24, 2002 5:21 pm   
 
Actually, if #SEND doesn't receive a valid filename as an argument, it just sends its argument as if you had typed it into the command line, but without echoing it.

SpiritWolf, your alias should be:
#ALIAS look {#SAY test;#SEND {look %1}}

Kjata
Reply with quote
mr_kent
Enchanter


Joined: 10 Oct 2000
Posts: 698

PostPosted: Tue Dec 24, 2002 5:22 pm   
 
 

#ONINPUT {^look (*)$} {#SAY TEST;look %1}
Reply with quote
Humpton
Apprentice


Joined: 10 Oct 2000
Posts: 158
Location: Chicago, IL

PostPosted: Tue Dec 24, 2002 6:10 pm   
 
Well, there's my 'learned something new today' item. Although, I can't think of a reason for using #SEND that way. Can you?



Stay JOLLY!
H

___
Humpton lives like he types.... fast, and full of mistakes!

Core 2651: For those who prefer the future to the past.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Dec 24, 2002 6:32 pm   
 
This one will not only look west, it will also look in bag.
#AL look {#SAY test;~look}

LightBulb
Senior Member
Reply with quote
SpiritWolf
Wanderer


Joined: 02 Jul 2002
Posts: 74
Location: USA

PostPosted: Tue Dec 24, 2002 7:38 pm   
 
the second one I was just messin around trying to figure things out.

The reason to use #send is in an alias just like I have. The alias name is also the same as the command on the mud I'm trying to perform, so it would make a loop.
Both LightBulb's and Kjata's work fine though. Thanks for the help! :)
Reply with quote
AzCowboy
Adept


Joined: 09 Nov 2000
Posts: 222
Location: USA

PostPosted: Tue Dec 24, 2002 10:49 pm   
 
quote:

the second one I was just messin around trying to figure things out.

The reason to use #send is in an alias just like I have. The alias name is also the same as the command on the mud I'm trying to perform, so it would make a loop.
Both LightBulb's and Kjata's work fine though. Thanks for the help! :)





You don't need to use #send to prevent it from looping, just use the ~ in front of the word...

So, if you have an alias for look, you can use ~look in the alias without looping....

quote:

Well, there's my 'learned something new today' item. Although, I can't think of a reason for using #SEND that way. Can you?


Yes, I use it on my mud for a script to practice certain fighting techniques... to concentrate on a certain attack, you type the attack name after each attack... it becomes VERY spammy on the screen, so I use #send @attack to send it to the mud without echoing it....

I also gag the blank lines, prompts and enemy condition, so instead of around 10 lines per round, I've got 1 or 2....
Reply with quote
shibbidy joe
Wanderer


Joined: 02 Nov 2002
Posts: 76
Location: Tuvalu

PostPosted: Wed Dec 25, 2002 1:46 am   
 
Someone explain how the ~tilde works? I know it quotes characters... how's it keep from looping?

-Shibbidy Joe
Sometimes I'm smart. Othertimes I'm not. Guess which time this is.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Dec 25, 2002 4:47 am   
 
It tells zMUD not to parse the next character. If it's not parsed, it can't be interpreted as an alias.

LightBulb
Senior Member
Reply with quote
shibbidy joe
Wanderer


Joined: 02 Nov 2002
Posts: 76
Location: Tuvalu

PostPosted: Wed Dec 25, 2002 4:50 am   
 
Got it. Much thanks. Lightbulb... if you could IM me at Shibbidy Joe, I'd be much obliged. I still can't get this #wait thing to work. (Sorry for this off topic post. I'm in a state of perpetual anxiety about this script.)

-Shibbidy Joe
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