|
layman8 Beginner
Joined: 30 Nov 2005 Posts: 12 Location: fwefas
|
Posted: Mon Jan 16, 2006 7:54 am
How to get the room list which is linked to a specific room? |
I' working on an auto-search robot on map, some times I need to get a list of room ids which is linked to a specific room.
I can not find a direct function for that, so I tried to use the two function:
%roomexit([vNum]) Return the exit string of the room to string s.
%roomlink([vNum], dir) Return or set the link in direction(uses mud direction like SE) dir to the room with vNum i.
However, this won't work for non-standard rooms ( like ed,su,etc.)
For example:
2351 -- ed -- 2350
|
su
|
2352
#show %roomexit(2351)
ed|su
#show %roomlink(2351,su)
//nothing
#show %roomlink(2351,s)
2352
This is the issue. %roomlink only accept map direction while %roomexit returns actual direction.
QUESTION:
What would be the best way to get a room list for a specific room?
Thanks in advance! |
|
_________________ Hi, this is layman |
|
|
|
layman8 Beginner
Joined: 30 Nov 2005 Posts: 12 Location: fwefas
|
Posted: Mon Jan 16, 2006 7:59 am |
Also there's other custom directions like
#show %roomexit(2347)
#wa 4000;nu|s
It is really crazy! I can see all the linking room ids in map's room property, but I have no way to get them! |
|
_________________ Hi, this is layman |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Tue Jan 17, 2006 3:06 am |
The other function to use is %roomportal.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
layman8 Beginner
Joined: 30 Nov 2005 Posts: 12 Location: fwefas
|
Posted: Wed Jan 18, 2006 2:07 am |
Thanks, Vijilante
I find there 3 kind of situation need to handle:
#show %roomexit(xxx)
n|j|really;funny
"n":For the first kind, %roomlink works
"j":No way to handle for this kind? (can be translated in script)
"really;funny": %roomportal works
In general, by a very hard way, I can get all linked room ids of a specific room.
Just wanna to confirm: Is this the best way to do so? |
|
_________________ Hi, this is layman |
|
|
|
ZealousAnonymous Wanderer
Joined: 06 Jan 2006 Posts: 70
|
Posted: Wed Jan 18, 2006 8:13 am |
Find out what each direction translates to and make a database for them. Im not exactly sure what you want but you could make a database like
j = northeast
and use %dbget or whatever to translate for you. |
|
|
|
|
|