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
in4939
Newbie


Joined: 12 Nov 2008
Posts: 5

PostPosted: Wed Jul 08, 2009 12:27 pm   

CMud Automapper get Zone name
 
Hi

I'm trying to write a cmud alias that when given a room name as a parameter will return the zone name (rather than the zone id).

So far I can get the zoneid of the room, but I can't get the zone name.

Any help will be much appreciated.
Reply with quote
in4939
Newbie


Joined: 12 Nov 2008
Posts: 5

PostPosted: Wed Jul 08, 2009 12:36 pm   
 
Actually I take that back - I can't even get the zoneId - just the room number.
Reply with quote
in4939
Newbie


Joined: 12 Nov 2008
Posts: 5

PostPosted: Wed Jul 08, 2009 1:57 pm   
 
Would I have to write a COM component to do proper SQL lookups on the map database?
Reply with quote
wrym
Magician


Joined: 06 Jul 2007
Posts: 349
Location: The big palace, My own lil world

PostPosted: Wed Jul 08, 2009 1:57 pm   
 
You'll need to stack a few functions, %mapquery() to get the room number, then %roomzone to get the zone then %zonename to get the zone name

Code:
%zonename(%roomzone(%mapquery("[Name] like 'test'")))
_________________
"To the engineer, all matter in the universe can be placed into one of two categories: (1) things that need to be fixed, and (2) things that will need to be fixed after you've had a few minutes to play with them" - Scott Adams, The Dilbert Principle
Reply with quote
in4939
Newbie


Joined: 12 Nov 2008
Posts: 5

PostPosted: Wed Jul 08, 2009 2:52 pm   
 
Thanks Wyrm that almost works!!!

%zonename appears to be working fine as does %mapquery but for some strange reason %roomzone always returns the same value, nomatter what roomid I pass to it.

ANyone got any ideas why that would be so?
Reply with quote
in4939
Newbie


Joined: 12 Nov 2008
Posts: 5

PostPosted: Wed Jul 08, 2009 3:14 pm   
 
Scratch that last one, it now works perfectly.

Thanks Wym - that was just the job.
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