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
Dypers
Beginner


Joined: 11 Mar 2005
Posts: 11

PostPosted: Sat Aug 27, 2005 11:42 am   

End of path
 
I'm trying to get zMud to execute a set of commands only after a slowwalk path is completed. I've tried:
#SLOW walkpath
get X

But this doesn't work, and zMud executes get X during the path. In the place of get X, I've tried #IF (%inwalk=0) {get X}, which doesn't seem to work either, but I'm not sure if I'm using that wrongly.

Any advice from any of the experts out there?

Thanks!
Reply with quote
Muzzle
Newbie


Joined: 28 Apr 2005
Posts: 3

PostPosted: Sat Aug 27, 2005 2:59 pm   
 
I am pretty new to this, so this is probably a bad way to do it, but if you know the set time needed to walk the path, couldn't you create a one time alarm with the time needed, and have it execute "get x" or whatever when done?
Reply with quote
Dypers
Beginner


Joined: 11 Mar 2005
Posts: 11

PostPosted: Sat Aug 27, 2005 5:52 pm   
 
The problem is that along the path, I pause and resume to fight, cast spells, etc. So the time taken each time I go through the path is uncertain.

Thanks for replying though, Muzzle :)
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Aug 27, 2005 6:37 pm   
 
Using %destroom(), you can probably set up a zmud expression trigger for this. %destroom() returns the room ID (which means it has to be mapped already) or a -1 if the room has been entered already.

I'm not too familar with it, but the syntax would look something like this:

#trigger (%destroom() >= 0) {stuff you want to do}.

If you pause before reaching it, you may need to set up your own %destroom() wrapper so that the original destination is saved. I'm not sure if ZMud changes anything status-wise regarding speedwalking or destination when you are paused or stopped.
_________________
EDIT: I didn't like my old signature
Reply with quote
Dypers
Beginner


Joined: 11 Mar 2005
Posts: 11

PostPosted: Sat Aug 27, 2005 8:03 pm   
 
Thanks MattLofton!

Is there a way to do this if the map is not open? I ask because this path is part of a script, which covers different areas and requires portaling from area to area.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun Aug 28, 2005 2:14 pm   
 
Use the special alias "onwalkend". This alias is automatically executed when a walk ends. If you have a number of different things you want to do at certain destinations then you will want to use a variable or 2 so that you are not always recreating the alias.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Dypers
Beginner


Joined: 11 Mar 2005
Posts: 11

PostPosted: Mon Aug 29, 2005 11:11 am   
 
I'll try that out. Thanks Vijilante!
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