About Us
Products
Purchase
Downloads
Support
Forums
Contact Us
Site
 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
Davos
Adept


Joined: 30 Jan 2003
Posts: 228
Location: USA

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


Joined: 18 Nov 2001
Posts: 5182

PostPosted: 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.
Reply with quote
Charbal
GURU


Joined: 15 Jun 2001
Posts: 654
Location: USA

PostPosted: 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)"
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