|
solem Beginner
Joined: 16 Mar 2004 Posts: 20
|
Posted: 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. |
|
|
|
Ratalon Beginner
Joined: 08 Apr 2004 Posts: 24 Location: USA
|
Posted: 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.) |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: 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)'} |
|
|
|
Charbal GURU
Joined: 15 Jun 2001 Posts: 654 Location: USA
|
Posted: Mon May 24, 2004 5:15 pm |
Try
#MAPQUERY {[Name] = '@QuestRoom' and [ZoneID] IN (SELECT ZoneID FROM ZoneTbl WHERE Name = '@ZoneName')} |
|
|
|
solem Beginner
Joined: 16 Mar 2004 Posts: 20
|
Posted: 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 |
|
|
|
|
|