Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
alluran
Adept


Joined: 14 Sep 2005
Posts: 223
Location: Sydney, Australia

PostPosted: Wed Jan 16, 2008 2:57 am   

Question on the mapper
 
The mud i play has speedwalks (run 2dses for example), now, i used to use this code to make the mapper follow where i was:
#FORALL %pathexpand( %1) {#MOVE %i}

but i was wondering if anyone knows a way WITHOUT using #move to find out the final roomkey of that path. I want to replace that with a #te, so that my onMove event only fires once per speedwalk :)
_________________
The Drake Forestseer
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Wed Jan 16, 2008 3:10 am   
 
It'll probably be easier simply to change the way your onMove event works. For example, adding a line to your code for running the walk #var SpeedWalkStepsLeft %numitems(%pathexpand(%1)) and then another to your onMove event like #if (@SpeedWalkStepsLeft>0) {#add SpeedWalkStepsLeft -1} {old code for OnMove goes here}
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
alluran
Adept


Joined: 14 Sep 2005
Posts: 223
Location: Sydney, Australia

PostPosted: Wed Jan 16, 2008 3:23 am   
 
The aim was to iscolate the mapper package from the events package. I achieved this by making a few more events (startSpeedwalk and endSpeedwalk) for use by scripts that need to move during a speedwalk.
At the moment I'm aiming to set up a series of events for the mud I play (i guess people could alter the triggers that fire them for their own muds) which will allow for rapid script development and more modular scripting. Basically, the one package will include a heap of events, and, a quest tracker for example, might be #event {onQComplete} {#say Quest Completed in $Time, earning $QP Quest Points} or similar.
_________________
The Drake Forestseer
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Jan 16, 2008 4:05 am   
 
You should be able to use the #QUEUE command. If you really want to blow off the mapper after that, then look at the %destroom function and #TELEPORT. #QUEUE should be able to do exactly what you want though.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
alluran
Adept


Joined: 14 Sep 2005
Posts: 223
Location: Sydney, Australia

PostPosted: Wed Jan 16, 2008 4:24 am   
 
mm, I kinda was hoping for a %destroom([string path]) option that would tell me the destination if i followed that speedwalk from my current room. Tis ok though, it's working atm.
_________________
The Drake Forestseer
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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