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


Joined: 11 Mar 2002
Posts: 93

PostPosted: Thu Oct 07, 2004 7:49 am   

Moving multiple rooms on the map when running
 
In the mud I play, there is the ability to run a maximum of 10 rooms in a straight line.

Is there a way to have the mapper calculate the rooms in a straight line from your location:

I am in room 1 there is 5 rooms leaving west. I want to run west, which will put me in the 5th room.

And have the mapper automatically update your new position?

So I would enter the command "Run West" and the mapper would move me to the last possible room up to a max of 10.
Reply with quote
Rorso
Wizard


Joined: 14 Oct 2000
Posts: 1368

PostPosted: Thu Oct 07, 2004 11:41 am   
 
Try:
#CLASS {runner}
#ALIAS run {
; Show error message if no direction is specified.
#if (%null( %1)) {
#show "Usage: run ~<direction~>" %crlf
#abort 1
}
; Now move on map. Then send the direction to the MUD.
vnum = %roomlink( , %1)
max = 1 // Have moved one step above.
#while (%roomlink( @vnum, %1) > 0 and @max < 10) {
vnum=%roomlink( @vnum, %1)
max=%eval( @max+1)
#echo @max @vnum
}
~run %1 // Send direction to MUD.
#tel @vnum // Now move to correct position on the mapper.
}
#CLASS 0
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