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


Joined: 28 Sep 2005
Posts: 55

PostPosted: Wed Sep 28, 2005 8:27 pm   

Sending commands after #walk completes ***Solved***
 
Howdy all,

I am trying to setup a trigger that will walk to a room then execute a command after the #walk command completes. The best I can come up with at this point is using an alarm timer to run it but then on short walks you are waiting around for the alarm to trigger. here is the code I am using for this:
Code:
#TRIGGER {(%w). The package can be picked up from:$  -----$&pickuproom
#var pickupzone %1
#walk {@pickuproom} {@pickupzone}
#alarm +20 {#if %inwalk {#show still walking} {#send pickup}}}


This works but is inefficent, any help would be appreciated.

An example of the triggering text is:

Your task is to pick up a package on Cube. The package can be picked up from:
-----
Cube Cafe
The seating arrangements in this small cafe are by cubicle only so you may have to look around to find an empty one. An exit is southeast.
-----
Delivery details will be provided when you collect the package.


Thanks again.


Jamie


Last edited by Palek on Wed Sep 28, 2005 11:28 pm; edited 1 time in total
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5187

PostPosted: Wed Sep 28, 2005 9:24 pm   
 
Check out the onwalkend special alias. This alias is automatically called when a speedwalk ends.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Palek
Wanderer


Joined: 28 Sep 2005
Posts: 55

PostPosted: Wed Sep 28, 2005 9:52 pm   
 
Ok I change the trigger to look like this:

Code:
#var pickupzone %1
#ALIAS (walk) {
  #walk {@pickuproom} {@pickupzone}
  #ALIAS onwalkend {pickup}
  }

Now when the triggering text comes up it does nothing at all.

Tried appending walk to the end of it, it walks to the location but does not execute the onwalkend command.

tried appened walk and onwalkend to the end of this and it does the same as just putting the command after the walk command it executes it in the middle of the walk.


Jamie
Reply with quote
Palek
Wanderer


Joined: 28 Sep 2005
Posts: 55

PostPosted: Wed Sep 28, 2005 11:30 pm   
 
While researching onwalkend I came acrossed a solution:

Code:
#var pickupzone %1
#ALIAS onroomenter {#IF (@pickuproom=%roomid) {pickup}}
#walk {@pickuproom} {@pickupzone}


This works perfectly.

Thanks for pointing in the right direction.

Jamie
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