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


Joined: 16 Mar 2004
Posts: 20

PostPosted: Sat May 22, 2004 5:28 am   

MapQuery
 
I've gotten the following to work no problem.

#VAR QuestRoom %replace( "%2", "'", "''")
#mapquery {[Name] = '@QuestRoom'}

Now I would like to refine it a little and add zone to the mapquery.

#mapquery {[Name] = '@QuestRoom' and [Zone] = '@ZoneName'};

I keep getting an error when I run it... Anyone have a suggestion for me? Thanks in advance.
Reply with quote
Ratalon
Beginner


Joined: 08 Apr 2004
Posts: 24
Location: USA

PostPosted: Sat May 22, 2004 6:17 pm   
 
This is a tricky one.
The Zones are kept in a different table. First off you would have to get the ZoneId from the Zone table
then this could work.
#mapquery {[Name] = '@QuestRoom' and [ZoneId] = '@ZoneIdNum'};


I Don't know how to retrieve the ZoneId from the Zone table as a unique number to be used this way. But you are 1 step closer to your goal! (I always just sorted the results from the quest room and looked in the area I needed.)
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Mon May 24, 2004 4:03 pm   
 
I believe There is a function for retrieving the Zonenum from the name of the zone but I am not sure offhand what is %zone or something like that and then you could use something like this

#mapquery {[ZONEID] = '%zonenumfunc(@zonename)'}
Reply with quote
Charbal
GURU


Joined: 15 Jun 2001
Posts: 654
Location: USA

PostPosted: Mon May 24, 2004 5:15 pm   
 
Try

#MAPQUERY {[Name] = '@QuestRoom' and [ZoneID] IN (SELECT ZoneID FROM ZoneTbl WHERE Name = '@ZoneName')}
Reply with quote
solem
Beginner


Joined: 16 Mar 2004
Posts: 20

PostPosted: Sat Jun 05, 2004 4:04 pm   
 
Sorry for the late reply..... I've been on vacation for a while.

Script works like a charm.

Thank 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