Well I was bored, so here it is:
Code:
chars = {}
count = 0
prevcount = 0
function AI(myid)
local actors = GetActors()
prevcount = count
for i,v in ipairs(actors) do
local type = GetV(7, v)
if ( (type >=0 and type <=25) or (type >= 4001 and type <= 4049) ) then
if (chars[v] == nil) then
chars[v] = true
count = count + 1
end
end
end
if (count > prevcount) then
TraceAI("I have seen " .. count .. " players.")
end
MoveToOwner(myid)
end
Put it as AI.lua in your USER_AI folder (don't try it unless you know how to restore your current AI), type /traceai in game to enable logging from homun AIs (and /hoai if you don't have an AI activated already) then call the homunculus and walk around the venders. The results will appear in TraceAI.txt in your ro folder.
I made it count every player rather than just vending classes, since I figured it would be easier to just count every non-vender you see rather than @who2:ing them to figure out what classes they are if you don't recognize all possible sprites (male/female of non-trans/trans of all possible merch classes + sn).
And right now there are 198 vender in pront. I didn't bother checking other towns.
Edit: hm.. I thought the [ code ] type quote should preserve formatting, but it removed all my tabs
oh well, should still work.
My chars: TPC / Tjuven / Dansare / Sinne / Magiker / Byracka / Krigare / Andreas