|
TiberSeptim Beginner
Joined: 20 Jun 2006 Posts: 24
|
Posted: 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]'; |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: 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.
|
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: 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 |
|
|
|
TiberSeptim Beginner
Joined: 20 Jun 2006 Posts: 24
|
Posted: 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). |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Tue Jan 08, 2008 3:21 am |
Yep, the cost just applies to the algorithm that works out the shortest route to your destination.
|
|
|
|
|
|