public void Execute() { if (Bot.Target != null) { Bot.Wow.FacePosition(Bot.Player.BaseAddress, Bot.Player.Position, BotMath.CalculatePositionAround(Bot.Target.Position, 0.0f, (float)Rnd.NextDouble() * (MathF.PI * 2), (float)Rnd.NextDouble()), true); } }
public void Execute() { IWowUnit randomPartymember = NpcsNearMe.ElementAt(Rnd.Next(0, NpcsNearMe.Count())); if (randomPartymember != null) { Bot.Wow.FacePosition(Bot.Player.BaseAddress, Bot.Player.Position, BotMath.CalculatePositionAround(randomPartymember.Position, 0.0f, (float)Rnd.NextDouble() * (MathF.PI * 2), (float)Rnd.NextDouble()), true); } }
public bool ExecuteTactic(CombatClassRole role, bool isMelee, out bool preventMovement, out bool allowAttacking) { preventMovement = false; allowAttacking = true; WowUnit wowUnit = WowInterface.I.ObjectManager.GetClosestWowUnitByDisplayId(DevourerOfSoulsDisplayId, false); if (wowUnit != null) { if (wowUnit.DisplayId == 30150) { // make sure we avoid the lazer // we only care about being on the reight side of him because the lazer spins clockwise float angleDiff = BotMath.GetAngleDiff(wowUnit.Position, wowUnit.Rotation, WowInterface.I.ObjectManager.Player.Position); if (angleDiff < 0.5f) { WowInterface.I.MovementEngine.SetMovementAction(MovementAction.Move, BotMath.CalculatePositionAround(wowUnit.Position, wowUnit.Rotation, MathF.PI, isMelee ? 5.0f : 22.0f)); preventMovement = true; allowAttacking = false; return(true); } } if (role == CombatClassRole.Tank) { Vector3 modifiedCenterPosition = BotUtils.MoveAhead(MidPosition, BotMath.GetFacingAngle(WowInterface.I.ObjectManager.MeanGroupPosition, MidPosition), 8.0f); float distanceToMid = WowInterface.I.ObjectManager.Player.Position.GetDistance(modifiedCenterPosition); if (wowUnit.TargetGuid == WowInterface.I.ObjectManager.PlayerGuid) { if (distanceToMid > 5.0f && WowInterface.I.ObjectManager.Player.Position.GetDistance(wowUnit.Position) < 3.5) { // move the boss to mid WowInterface.I.MovementEngine.SetMovementAction(MovementAction.Move, modifiedCenterPosition); preventMovement = true; allowAttacking = false; return(true); } } } } return(false); }
public static Vector3 MoveAhead(Vector3 targetPosition, float rotation, float offset) { return(BotMath.CalculatePositionAround(targetPosition, rotation, 0.0f, offset)); }
public void Execute() { Bot.Wow.FacePosition(Bot.Player.BaseAddress, Bot.Player.Position, BotMath.CalculatePositionAround(Bot.Objects.CenterPartyPosition, 0.0f, (float)Rnd.NextDouble() * (MathF.PI * 2), (float)Rnd.NextDouble()), true); }