January 31, 201610 yr How do i tell the bot to do *something* if there is Elite nearby? currently: #region Wrath bool Wrath() { if (!_wrath.KnownSpell) return false; if (!_wrath.IsSpellUsable) return false; if (ObjectManager.Me.ManaPercentage > 50) { WoWPlayer tank = getTanks().First(); WoWUnit target = tank.TargetObject; if (ObjectManager.GetWoWUnitHostile().Count(u => u.Position.DistanceTo(tank.Position) <= 8 && UnitCanAttack.CanAttack(u.GetBaseAddress, tank.GetBaseAddress)) >= 3 || ObjectManager.Target.IsElite) //to improve with elite area check { return false; } Interact.InteractGameObject(target.GetBaseAddress, true); MovementManager.Face(target); _wrath.Launch(); } return false; } #endregion
February 1, 201610 yr Hello, I am not sure to understand exactly what you want, but you can use code like this: int numberOfEliteNearTank = ObjectManager.GetWoWUnitHostile().Count(u => u.Position.DistanceTo(tank.Position) <= u.InteractDistance && u.IsElite && UnitCanAttack.CanAttack(u.GetBaseAddress, tank.GetBaseAddress)); if (numberOfEliteNearTank >= 3) { // .. }
February 1, 201610 yr Author Looks like this will work! Thank you.im trying to tell the bot to not waste mana with wrath if there is elites nearby
Create an account or sign in to comment