March 21, 20179 yr I've been trying to create a raid farming profile. So far I've been able to get the bot to check if there is an enemy in a certain radius around a coordinate using: return ObjectManager.GetWoWUnitHostile().Count(u => u.IsAlive && u.Position.DistanceTo(new Vector3(-4588.846f,207.593f, 63.38676f)) < 40) == 0; However, the mob I'm trying to check for includes neutral enemies (yellow nameplates). The GetWowUnitHostile command only detects red nameplates units, so I'm missing out on killing a lot of the yellow neutral units. Does anyone know another command which allows me to check for a neutral enemy, or even better, one that allow me to specify the name of the enemy, and at the same time allow me to incorporate the distance vector command as well? (btw I'm super bad a scripting so forgive me is its simple, I just got the above code by modifying someone's profile)
March 21, 20179 yr 39 minutes ago, dragonmase said: I've been trying to create a raid farming profile. So far I've been able to get the bot to check if there is an enemy in a certain radius around a coordinate using: return ObjectManager.GetWoWUnitHostile().Count(u => u.IsAlive && u.Position.DistanceTo(new Vector3(-4588.846f,207.593f, 63.38676f)) < 40) == 0; However, the mob I'm trying to check for includes neutral enemies (yellow nameplates). The GetWowUnitHostile command only detects red nameplates units, so I'm missing out on killing a lot of the yellow neutral units. Does anyone know another command which allows me to check for a neutral enemy, or even better, one that allow me to specify the name of the enemy, and at the same time allow me to incorporate the distance vector command as well? (btw I'm super bad a scripting so forgive me is its simple, I just got the above code by modifying someone's profile) return !ObjectManager.GetObjectWoWUnit().Any(u => u.Entry == 1234 && u.IsAlive && u.Position.DistanceTo(new Vector3(-4588.846f, 207.593f, 63.38676f)) < 40); You can replace u.Entry == MobID && With u.Name == "MobName" &&
Create an account or sign in to comment