I agree that is was quick and dirty ther might be false negative with strange sizes on other types. There is event, earth etc with micro sizes
A speedup would be to add the size filter to the getfind and only fetch micro caches
With a little change that makes the code shorter it will be less dirty and accept 100 find on any type
Replace the following part
if cache.type == "Traditional Cache" then
results.tradi = results.tradi + 1
end
if cache.type == "Multi-cache" then
results.multi = results.multi + 1
end
if cache.type == "Unknown Cache" then
results.unknown = results.unknown + 1
end
if cache.type == "Wherigo Cache" then
results.wherigo = results.wherigo + 1
end
if cache.type == "Letterbox Hybrid" then
results.letter = results.letter + 1
end
With
if results[cache.type] == nil then
results[cache.type]=0
end
results[cache.type]=results[cache.type]+1
int the output
types[conditions[1]]
will be
conditions[1]
etc
and the it will work in all cases