dragonmase 5 Posted March 21, 2017 Share Posted March 21, 2017 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) Link to comment Share on other sites More sharing options...
iMod 99 Posted March 21, 2017 Share Posted March 21, 2017 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" && Link to comment Share on other sites More sharing options...
dragonmase 5 Posted March 22, 2017 Author Share Posted March 22, 2017 Exactly what I was looking for. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now