Here is what ChatGPT thinks you should do. The first one requires no code and will just tell you when there is >1.
In world of warcraft, make a weak aura to keep track of how many enemies of a certain type are nearby
As an AI language model, I don't have access to World of Warcraft game interface to create a weak aura, but I can provide you with the steps to create one.
To create a weak aura that tracks how many enemies of a certain type are nearby in World of Warcraft, follow these steps:
Now, whenever there are enemies nearby that match the specified enemy type, the WeakAura will display an icon indicating how many enemies are within range.
Can you make it show how many of that enemy type are nearby
Yes, you can modify the WeakAura to display the number of enemies of a certain type that are nearby. Here are the steps:
In the "Custom Text" field, enter the following code:
function()
local count = 0
for i=1,#aura_env.Enemies do
if aura_env.Enemies[i].name == "Enemy Type" and aura_env.Enemies[i].distance <= 40 then
count = count + 1
end
end
return count
end
Replace "Enemy Type" with the name of the enemy type you want to track.
In the "Trigger" tab, set the trigger to "Custom".
In the "Custom Trigger" field, enter the following code:
function()
aura_env.Enemies = {}
for i=1,#C_NamePlate.GetNamePlates() do
local unit = C_NamePlate.GetNamePlateForUnit("target")
if unit and UnitIsEnemy("player", unit) then
local name = UnitName(unit)
local distance = UnitDistanceSquared(unit)
table.insert(aura_env.Enemies, {name = name, distance = distance})
end
end
return true
end
Save your new WeakAura by clicking "Done" and give it a name.
Now, the WeakAura will display the number of enemies of the specified type that are within 40 yards of your character. You can adjust the distance by changing the "distance <= 40" value in the code to the desired distance.