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


Joined: 30 Nov 2005
Posts: 12
Location: fwefas

PostPosted: 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
Reply with quote
layman8
Beginner


Joined: 30 Nov 2005
Posts: 12
Location: fwefas

PostPosted: 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
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: 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
Reply with quote
layman8
Beginner


Joined: 30 Nov 2005
Posts: 12
Location: fwefas

PostPosted: 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
Reply with quote
ZealousAnonymous
Wanderer


Joined: 06 Jan 2006
Posts: 70

PostPosted: 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.
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