About Us
Products
Purchase
Downloads
Support
Forums
Contact Us
Site
 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
TiberSeptim
Beginner


Joined: 20 Jun 2006
Posts: 24

PostPosted: Mon Jan 07, 2008 9:45 pm   

Avoiding Rooms when #WALKing?
 
So I'm setting up a lot of waypoints using the #WALK command but one problem I'm running into is that the MUD I play has certain terrain types which are impassable under particular conditions. For example [Deep Water] requires a boat and [Mountain] requires climbing boots, etc.

Is there a way I can flag a room so that #WALK will avoid it? There are several instances where [Shallow Water] provides a particular path through other rooms which are [Deep Water], but #WALK obviously doesn't know to follow these paths.


Can I easily flag a room as "Do not enter when #WALKing?"

Ideally I would like to be able to flag all the rooms on my map at once, e.g.,

UPDATE ObjectTbl
SET ObjectTbl.Someflag = somevalue
WHERE ObectTbl.Name LIKE '*Deep Water]';
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Mon Jan 07, 2008 9:47 pm   
 
Yep, there's a do not enter flag for rooms. You can also set a custom room cost (so that moving into the room will weigh as much as moving through x other rooms). The do not enter flag sets that cost to a massive number.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Mon Jan 07, 2008 9:55 pm   
 
To set the do not enter flag on a room you would do the following using %roomkind.
Code:
#call %roomkind(vNum, 128)


To undo setting your room to a do not enter type room you would use %roomcost.
Code:
#call %roomcost(vNum,0)


For finding the room names you might do something like list=%mapquery Then #Forall list {#call %roomkind(i,128)}
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
TiberSeptim
Beginner


Joined: 20 Jun 2006
Posts: 24

PostPosted: Tue Jan 08, 2008 2:21 am   
 
Thanks guys.

The "Do not enter" status only applies to #WALKS and won't actually have any effect if I manually move through that room, right? 'cause once I'm in a boat [Deep Water] is actually 0 cost so I'll be moving through them eventually (but most likely manually).
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Tue Jan 08, 2008 3:21 am   
 
Yep, the cost just applies to the algorithm that works out the shortest route to your destination.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
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