|
alluran Adept
Joined: 14 Sep 2005 Posts: 223 Location: Sydney, Australia
|
Posted: 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 |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: 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}
|
|
|
|
alluran Adept
Joined: 14 Sep 2005 Posts: 223 Location: Sydney, Australia
|
Posted: 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 |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: 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 |
|
|
|
alluran Adept
Joined: 14 Sep 2005 Posts: 223 Location: Sydney, Australia
|
Posted: 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 |
|
|
|
|
|