 |
Davos Adept
Joined: 30 Jan 2003 Posts: 228 Location: USA
|
Posted: Sat Jan 31, 2004 11:40 pm
Query for untested links |
Is there a way I can query for untested links on my mapper? to see where I need to go to continue to map, its painstaking going over each room in the display just to see, Thanks for any ideas
|
|
|
 |
Vijilante SubAdmin

Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sun Feb 01, 2004 5:58 pm |
This is what I use.
#CLASS {UnfinishedScan}
#ALIAS uscan {UScanCount=0;UScanResults="";#T+ MapScanStat status;#WHILE (@UScanCount<%numrooms) {#ADD UScanCount 1;#FORALL %roomexit(%mapvnum(@UScanCount)) { #IF (%i) { #IF (%roomlink(%mapvnum(@UScanCount),%i)=-2) { #ADDITEM UScanResults {%mapvnum(@UScanCount)}}}}};#T- MapScanStat status}
#VAR UScanCount {0} {0}
#VAR UScanResults {}
#STAT {MapScan: %eval(@UScanCount*100/%numrooms)~%} "" "MapScanStat"
#CLASS 0
#T- MapScanStat status
It leaves all the room numbers in @UScanResults. |
|
|
 |
Charbal GURU
Joined: 15 Jun 2001 Posts: 654 Location: USA
|
Posted: Sun Feb 01, 2004 8:38 pm |
I'm not sure that script really answers the question... it appears to find all rooms which outgoing links without a destination. This command should do the same thing, but be several orders of magnitude faster (also, by using a COM ADODB connection, it'd be possible to save the room numbers to a variable like the script; this version just displays them):
#MAPQUERY "ObjID IN (SELECT FromID FROM ExitTbl WHERE ToID = FromID AND DirToType = (SELECT MAX(DirID) FROM VersTbl))"
Anyway, I believe the original question was asking about finding links that had not been used yet and are thus marked as untested in the mapper (i.e., the links that show up as gray if you have the mapper option to show untested links as gray). If that is the case, then this script should be suitable:
#MAPQUERY "ObjID IN (SELECT FromID FROM ExitTbl WHERE Tested = -1)" |
|
|
 |
|
|