Example #1
0
        public override void FindTarget()
        {
            WaypointFollower.FollowWaypoints(true);

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

            // Found a target
            if (Api.PlayerData.PlayerHasTarget)
            {
                bool validEnemy = Api.PlayerData.TargetHealthPercentage > 99.9 &&
                                  !Api.PlayerData.TargetInCombat &&
                                  !Api.PlayerData.IsTargetPlayer &&
                                  Api.PlayerData.IsInFarRange &&
                                  !Api.PlayerData.IsInCloseRange;

                if (validEnemy && Api.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);
                }
            }
        }
Example #2
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 = Api.PlayerData.PlayerHasTarget &&
                          Api.PlayerData.TargetHealthPercentage > 99.9 &&
                          !Api.PlayerData.TargetInCombat &&
                          Api.PlayerData.TargetFaction == 0 &&
                          Api.PlayerData.IsInCloseRange;

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

            if (m_Resetwaypoints)
            {
                WaypointFollower.SetWaypoints(m_WalkWaypoints);

                m_Resetwaypoints = false;
            }

            WaypointFollower.FollowWaypoints(false);
        }
Example #4
0
        private static void Revive()
        {
            if (m_NoDead)
            {
                return;
            }

            if (m_InitializeAction)
            {
                List <Waypoint> reviveWaypoints = new List <Waypoint>();

                reviveWaypoints.AddRange(m_ReviveWaypoints);
                reviveWaypoints.AddRange(m_PathWaypoints);

                WaypointFollower.SetWaypoints(reviveWaypoints);

                Helper.WaitSeconds(3.5);
                Input.MoveMouseTo(XReviveButtonLocation, YReviveButtonLocation);
                Helper.WaitSeconds(RegisterDelay);
                Input.LeftClick();

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

                m_InitializeAction = false;
            }

            WaypointFollower.FollowWaypoints(true);

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

            if (Api.PlayerData.PlayerHealth > 1)
            {
                WaypointFollower.StopFollowingWaypoints();
                TransitionState(ActionMode.RegenerateVitals);
                m_ReviveSw.Stop();
                m_Resetwaypoints = true;

                Helper.WaitSeconds(1);
            }
        }
Example #5
0
        public override void FindTarget()
        {
            WaypointFollower.FollowWaypoints(true);

            if (PoisonMain.CanCastSpell && ApplyPoison)
            {
                WaypointFollower.StopFollowingWaypoints();
                Helper.WaitSeconds(1.0);
                PoisonMain.CastSpell();
                Helper.WaitSeconds(4.5);
                PoisonOff.CastSpell();
                Helper.WaitSeconds(4.5);
                Input.RightClick();
                return;
            }

            if (!FriendlyFlag && DontThrow)
            {
                Input.KeyPress(VirtualKeyCode.VK_P);
                Helper.WaitSeconds(Automater.RegisterDelay);
            }

            if (Api.PlayerData.IsTargetPlayer && !FriendlyFlag && DontThrow)
            {
                FriendlyTimer.Start();
                FriendlyFlag = true;
            }

            CheckFindMode();
            bool validTarget;

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

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

                validTarget = Api.PlayerData.PlayerHasTarget &&
                              Api.PlayerData.TargetHealthPercentage > 99.9 &&
                              !Api.PlayerData.TargetInCombat &&
                              Api.PlayerData.TargetFaction == 0 &&
                              Api.PlayerData.IsInFarRange &&
                              !Api.PlayerData.IsInCloseRange &&
                              Throw.CanCastSpell;

                if (validTarget)
                {
                    WaypointFollower.StopFollowingWaypoints();

                    Helper.WaitSeconds(1);
                    Throw.CastSpell();
                    Helper.WaitSeconds(2.5);
                }
            }
            else if (FindTargetMode == RogueFindTargetMode.Throw)
            {
                validTarget = Api.PlayerData.PlayerHasTarget &&
                              Api.PlayerData.TargetHealthPercentage > 99.9 &&
                              !Api.PlayerData.TargetInCombat &&
                              Api.PlayerData.TargetFaction == 0 &&
                              Api.PlayerData.IsInFarRange &&
                              !Api.PlayerData.IsInCloseRange &&
                              Throw.CanCastSpell;

                if (validTarget)
                {
                    WaypointFollower.StopFollowingWaypoints();

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

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

                validTarget = Api.PlayerData.PlayerHasTarget &&
                              Api.PlayerData.TargetHealthPercentage > 99.9 &&
                              !Api.PlayerData.TargetInCombat &&
                              Api.PlayerData.TargetFaction == 0 &&
                              Api.PlayerData.IsInCloseRange;

                if (validTarget)
                {
                    if (Api.PlayerData.IsInCloseRange)
                    {
                        Input.KeyPress(VirtualKeyCode.VK_2);
                        Helper.WaitSeconds(0.1);
                    }
                }
            }
            else
            {
                validTarget = Api.PlayerData.PlayerHasTarget &&
                              Api.PlayerData.TargetHealthPercentage > 99.9 &&
                              !Api.PlayerData.TargetInCombat &&
                              Api.PlayerData.TargetFaction == 0 &&
                              Api.PlayerData.IsInCloseRange;

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

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