Ejemplo n.º 1
0
        public override void FindTarget()
        {
            WaypointFollower.FollowWaypoints(true);

            // Look for target
            Input.KeyPress(VirtualKeyCode.TAB);
            Helper.WaitSeconds(0.1);

            // Found a target
            if (WowApi.PlayerData.PlayerHasTarget)
            {
                bool validEnemy = WowApi.PlayerData.TargetHealth == 100 &&
                                  !WowApi.PlayerData.TargetInCombat &&
                                  !WowApi.PlayerData.IsTargetPlayer &&
                                  WowApi.PlayerData.IsInFarRange &&
                                  !WowApi.PlayerData.IsInCloseRange;

                if (validEnemy && WowApi.PlayerData.PlayerMana >= 20)
                {
                    WaypointFollower.StopFollowingWaypoints();

                    // PewPew Wrath
                    Helper.WaitSeconds(1);
                    Input.KeyPress(VirtualKeyCode.VK_2);
                    Helper.WaitSeconds(1.75);
                    Input.KeyPress(VirtualKeyCode.VK_2);
                    Helper.WaitSeconds(1.75);
                }
            }
        }
        private static void Revive()
        {
            if (m_NoDead)
            {
                return;
            }

            if (!m_Ghosted)
            {
                List <double> ghostXCoordinates = new List <double>();
                List <double> ghostYCoordinates = new List <double>();

                ghostXCoordinates.AddRange(m_ReviveXCoordinates);
                ghostXCoordinates.AddRange(m_PathXCoordinates);

                ghostYCoordinates.AddRange(m_ReviveYCoordinates);
                ghostYCoordinates.AddRange(m_PathYCoordinates);

                WaypointFollower.SetWaypoints(ghostXCoordinates, ghostYCoordinates);

                Helper.WaitSeconds(2.5);
                Input.MoveMouseTo(XReviveButtonLocation, YReviveButtonLocation);
                Helper.WaitSeconds(RegisterDelay);
                Input.LeftClick();
                m_Ghosted = true;

                Helper.WaitSeconds(1.0);
                m_ReviveSw.Start();
            }

            WaypointFollower.FollowWaypoints(true);

            if (m_ReviveSw.ElapsedMilliseconds > 1000)
            {
                Input.LeftClick();
                m_ReviveSw.Restart();
            }

            if (WowApi.PlayerData.PlayerHealth > 1)
            {
                WaypointFollower.StopFollowingWaypoints();
                m_Ghosted           = false;
                m_CurrentActionMode = ActionMode.RegenerateVitals;
                m_StartedEating     = false;
                m_ReviveSw.Stop();
                m_ResetCoordinates = true;

                Helper.WaitSeconds(0.5);
                Input.KeyPress(VirtualKeyCode.VK_B);
                Helper.WaitSeconds(0.5);
            }
        }
Ejemplo n.º 3
0
        public override void FindTarget()
        {
            WaypointFollower.FollowWaypoints(true);

            if (FirstSeal != FirstSealType.None)
            {
                switch (FirstSeal)
                {
                case FirstSealType.Crusader:
                    if (SealOfTheCrusader.CanCastSpell)
                    {
                        SealOfTheCrusader.CastSpell();
                    }
                    break;

                case FirstSealType.Justice:
                    if (SealOfJustice.CanCastSpell)
                    {
                        SealOfJustice.CastSpell();
                    }
                    break;
                }
            }
            else if (SealOfCommand.CanCastSpell)
            {
                SealOfCommand.CastSpell();
            }

            bool validTarget = false;

            validTarget = WowApi.PlayerData.PlayerHasTarget &&
                          WowApi.PlayerData.TargetHealth == 100 &&
                          !WowApi.PlayerData.TargetInCombat &&
                          WowApi.PlayerData.TargetFaction == 0 &&
                          WowApi.PlayerData.IsInCloseRange;

            if (validTarget)
            {
                if (WowApi.PlayerData.IsInCloseRange)
                {
                    Input.KeyPress(VirtualKeyCode.VK_3);
                    Helper.WaitSeconds(0.5);
                }
            }
            else
            {
                Target.Act();
            }
        }
        private static void AutoWalk()
        {
            if (m_NoWalk)
            {
                return;
            }

            if (m_ResetCoordinates)
            {
                WaypointFollower.SetWaypoints(m_WalkXCoordinates, m_WalkYCoordinates);

                m_ResetCoordinates = false;
            }

            WaypointFollower.FollowWaypoints(false);
        }
Ejemplo n.º 5
0
        public override void FindTarget()
        {
            WaypointFollower.FollowWaypoints(true);

            CheckFindMode();
            bool validTarget = false;

            if (FindTargetMode == RogueFindTargetMode.StealthAndThrow)
            {
                if (Stealth.CanCastSpell)
                {
                    Stealth.CastSpell();

                    if (!AlwaysStealth)
                    {
                        StaleStealthTimer.Start();
                    }
                }

                validTarget = WowApi.PlayerData.PlayerHasTarget &&
                              WowApi.PlayerData.TargetHealth == 100 &&
                              !WowApi.PlayerData.TargetInCombat &&
                              WowApi.PlayerData.TargetFaction == 0 &&
                              WowApi.PlayerData.IsInFarRange &&
                              !WowApi.PlayerData.IsInCloseRange;

                if (validTarget)
                {
                    WaypointFollower.StopFollowingWaypoints();

                    Helper.WaitSeconds(1);
                    Throw.Act();
                    Helper.WaitSeconds(2);
                }
            }
            else if (FindTargetMode == RogueFindTargetMode.Throw)
            {
                validTarget = WowApi.PlayerData.PlayerHasTarget &&
                              WowApi.PlayerData.TargetHealth == 100 &&
                              !WowApi.PlayerData.TargetInCombat &&
                              WowApi.PlayerData.TargetFaction == 0 &&
                              WowApi.PlayerData.IsInFarRange &&
                              !WowApi.PlayerData.IsInCloseRange;

                if (validTarget)
                {
                    WaypointFollower.StopFollowingWaypoints();

                    Helper.WaitSeconds(1);
                    Throw.Act();
                    Helper.WaitSeconds(2);
                }
            }
            else if (FindTargetMode == RogueFindTargetMode.Stealth)
            {
                if (Stealth.CanCastSpell)
                {
                    Stealth.CastSpell();

                    if (!AlwaysStealth)
                    {
                        StaleStealthTimer.Start();
                    }
                }

                validTarget = WowApi.PlayerData.PlayerHasTarget &&
                              WowApi.PlayerData.TargetHealth == 100 &&
                              !WowApi.PlayerData.TargetInCombat &&
                              WowApi.PlayerData.TargetFaction == 0 &&
                              WowApi.PlayerData.IsInCloseRange;

                if (validTarget)
                {
                    if (WowApi.PlayerData.IsInCloseRange)
                    {
                        Input.KeyPress(VirtualKeyCode.VK_2);
                        Helper.WaitSeconds(0.1);
                    }
                }
            }
            else
            {
                validTarget = WowApi.PlayerData.PlayerHasTarget &&
                              WowApi.PlayerData.TargetHealth == 100 &&
                              !WowApi.PlayerData.TargetInCombat &&
                              WowApi.PlayerData.TargetFaction == 0 &&
                              WowApi.PlayerData.IsInCloseRange;

                if (validTarget)
                {
                    Input.KeyPress(VirtualKeyCode.VK_2);
                    Helper.WaitSeconds(0.1);
                }
            }

            if (!validTarget)
            {
                Target.Act();
            }
        }