October 21, 20205 yr So today during grind player attacked me, bot instead of picking a player, was still attacking and chasing fleeing mob. Is there a way to make wrobot switch attacking player ?
October 23, 20205 yr On 10/22/2020 at 2:57 AM, Artek said: So today during grind player attacked me, bot instead of picking a player, was still attacking and chasing fleeing mob. Is there a way to make wrobot switch attacking player ? You have to modify ur fightclass. public void Initialize() { FightEvents.OnFightLoop += TargetSwitcher; } public void Dispose() { FightEvents.OnFightLoop -= TargetSwitcher; } private void TargetSwitcher(WoWUnit woWPlayer, System.ComponentModel.CancelEventArgs cancelable) { WoWPlayer player = ObjectManager.GetNearestWoWPlayer(ObjectManager.GetObjectWoWPlayer().Where(o => o.IsAttackable).ToList()); if (player == null || !player.IsValid || !player.IsAlive || player.Faction == ObjectManager.Me.Faction || player.IsFlying || player.IsMyTarget || woWPlayer.Guid == player.Guid) return; if (player.InCombatWithMe && ObjectManager.Target.Type != WoWObjectType.Player) { cancelable.Cancel = true; Fight.StartFight(player.Guid, robotManager.Products.Products.ProductName != "WRotation", false); } }
Create an account or sign in to comment