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
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Fri Jan 13, 2006 8:25 pm   

Getting serial operation of commands in alias
 
I have an alias which goes like this:

(Do action)
#walk location1
(Do action)
#walk location2
(Do action)
#walk location3
(Do action)

What happends is that it doesn't wait for the #walk to finish it just sort of starts them all up at the same time. I'd like to know how I can get it to wait for the #walk to reach its destination before doing the action on the next line.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sat Jan 14, 2006 12:37 am   
 
Issueing a #WALK command produce a path, then begins sending that path accorind your walk mode setting. Once that completes zMud is done processing that command and waiting for the next command. What you are really looking for it the special alias onwalkend. Currently this hs a bug in which it never executes, the work around is to use the onroomenter with a check for %roomnum=%destroom. Obviously if you are at your desitination then the walk is ending and you can issue new command that were dependant on that condition. Personally I suggest putting "#IF (%roomnum()=%destroom) {onwalkend}" as the last line in your onroomenter alias. Thus allowing you to remove the work around when the bug is fixed by only removing 1 line of code.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Sun Jan 15, 2006 5:18 am   
 
There is something going wrong with %destroom. When I double click to speedwalk somewhere it will be the proper destination number for a few rooms, then it changes to -1 and never changes back.
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