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


Joined: 14 Nov 2013
Posts: 22
Location: Durban, South Africa

PostPosted: Wed Aug 29, 2018 4:25 am   

Find And Move To Room
 
Hi.

I am trying to figure out if there is a way to find and move to a room using script commands. I know you can use speedwalking to create a path to automatically move to a certain destination. But are there commands that allow you to do this with the mapper?

For eg:

If my character is in Room 1, and I am trying to get to Room 24. The speedwalk would be something like run 3e2n1s4n. Is it possible to generate the speedwalk from Room 1 to Room 24 by scripting and move to that location? If I am in Room 1 and trying to get to Room 24, can I write a script that will automatically use the mapper and speedwalks to get me to that room?

I have had a look at the docs but cannot see any commands in the automapper section that looks like it would do that but I could be mistaken.

#EDIT: Ok after having a look at the docs PROPERLY lol, it seem the way to go would be to use %mapquery, %pathfrom and %walk. I just played around and I am sure that these could be used to achieve the desired affect.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4693
Location: Pensacola, FL, USA

PostPosted: Wed Aug 29, 2018 12:49 pm   
 
if you know the room ID/number you want to end up at, you can just do:

#WALK 1234
#WALK pawnshop

Nothing will be saved, you just end up where you want to go.

%mapquerry returns a list of roomnumbers from an SQL search string, usually for editing the map via script
%pathfrom and %walk both return the pathing information in list format

Neither of which is needed unless you have a reason to save the value for some other setting to access later.
_________________
Discord: Shalimarwildcat
Reply with quote
Leaton
Newbie


Joined: 08 Sep 2018
Posts: 1

PostPosted: Sat Sep 15, 2018 12:08 pm   
 
Can you skip rooms with that command or do you have to follow a particular order btw? Very useful command.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4693
Location: Pensacola, FL, USA

PostPosted: Sat Sep 15, 2018 3:22 pm   
 
The #WALK command will have the mapper select the shortest route (by room count, and %roomcost).
You can have the map avoid certain areas by having rooms marked as 'do not enter' or by manually changing the %roomcost of rooms so that area is viewed as more expensive to walk through.
_________________
Discord: Shalimarwildcat
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