Something to count number of mobs around me

I remember having something like this long ago but lost track of it.

It’s some sort of macro or script that counts the number of enemy npc mobs around you. It’s very useful for achievements and such where you need to have a certain number of mobs spawn before you kill them.

Anyone know of it?

1 Like

You need nameplates on, but something like this:

/run local n,c="Name of Mob",0 for i=1,5000 do if UnitName("nameplate"..i)==n then c=c+1 end end print(n,"found:",c)

replacing Name of Mob with the name of the mob you want to count.

It counts the number of nameplates up with that name. So if nameplates are off or you’re in first person looking away from a mob right behind you or any other reason the nameplate won’t be visible, they won’t count.

1 Like

Much respect for your time in replying.

As best as I can recall, the script I used to use (curses that I can’t remember it) just generically counted all mobs around me. I didn’t have to specifically edit the script with a mod name (although that’s a very cool feature!), and the direction I or the mobs were facing didn’t matter as it simply counted all mobs around me on the screen.

Was it in vanilla? Back in vanilla we could make addons to not only do this, but it could populate the minimap with all targets around us, sort of making the hunter tracking ability pointless. They periodically did a /target Aa, Ab, Ac, etc to Zz and noted coordinates. Targeting is now protected and requires a hardware event (latter I think during vanilla) and we can no longer get coordinates of hostiles. (Blizzard really didn’t like this lol)

For a time there was a popular pvp addon that watched the combat log to see who was doing stuff around you. But they needed to be doing stuff that ends up on the combat log. So a rogue quietly sitting at a flag isn’t going to be noticed.

With the combat log it’s also possible to count the distinct guids that are attacking you. I don’t know of an addon to do this.

If you’re thinking of something that told you of passive/non-acting mobs (eg not attacking you or anything; just sitting there) around you without nameplates, the answer is a pretty definite not possible in current WoW.

Oh no, it wasn’t in Vanilla (I didn’t start until Wrath). It was a good while ago though.

I’m utterly horrible with narrowing down time frames and dates and such, but I think it was somewhere in the timeline of MoP if I’m not mistaken.

I vaguely remember finding the script in a random comment on Wowhead, though of course I have no idea what it was I was researching that led me to find the comment.

Not passive mobs, no. The script counted the generic amount of aggroed mobs. That’s the only thing it did was to give a generic count in the chat of how many mobs were around me (with threat of course).

I use the following bit of code to count the mobs (primarily for Spine of Deathwing fight):

/run local count = 0 for i = 0, 10000, 1 do if _G[“NamePlate”…i] ~= nil and _G[“NamePlate”…i]:IsVisible() then count = count + 1 end end print(count)

1 Like

Nice, thanks.