Beispiel #1
0
        private static async Task <bool> SpellCheck(SpellData ability, GameObject tar, bool reqs)
        {
            uint[] roleSkills = { 7560, 7563, 7564, 7565, 7566, 7545, 7542, 7543, 7546, 7547, 7548, 7549, 7863,
                                  7541, 7544, 7531, 7532, 7533, 7534, 7535, 7536, 7537, 7538, 7539, 7540, 7567, 7568, 7569, 7570,
                                  7571, 7572, 7558, 7559, 7561, 7562, 7550, 7551, 7552, 7553, 7554, 7555, 7556, 7557 };

            if (tar == null || !ActionManager.HasSpell(ability.LocalizedName) || (Me.ClassLevel < ability.LevelAcquired && !roleSkills.Contains(ability.Id)))
            {
                return(false);
            }

            if (BotManager.Current.IsAutonomous && !RoutineManager.IsAnyDisallowed(CapabilityFlags.Facing) && DateTime.Now > _facingLimiter && Target != null && !Me.IsFacing(Target))
            {
                _facingLimiter = DateTime.Now.AddSeconds(1);
                tar.Face();
            }

            if (!MainSettingsModel.Instance.UseCastorQueue)
            {
                if (!ActionManager.CanCast(ability, tar))
                {
                    return(false);
                }
            }

            if (MainSettingsModel.Instance.UseCastorQueue)
            {
                if (!ActionManager.CanCastOrQueue(ability, tar))
                {
                    return(false);
                }
            }

            if (ability.Cooldown != TimeSpan.Zero)
            {
                return(false);
            }

            if (!MovementManager.IsMoving || ability.AdjustedCastTime <= TimeSpan.Zero)
            {
                return(reqs);
            }

            if (!BotManager.Current.IsAutonomous)
            {
                return(false);
            }

            Navigator.PlayerMover.MoveStop();
            return(reqs);
        }
Beispiel #2
0
        public override async Task <bool> Combat()
        {
            if (!Common_Utils.InActiveInstance() || Target == null)
            {
                return(false);
            }

            if (BotManager.Current.IsAutonomous && !RoutineManager.IsAnyDisallowed(CapabilityFlags.Movement))
            {
                if (await Movement.MovementComposite().ExecuteCoroutine())
                {
                    return(false);
                }
            }

            if (Me.IsCasting)
            {
                return(await DodgeManager.DodgeThis(Me.SpellCastInfo.SpellData, CurrentTarget, CastedAura, IsDot, IsBuff, IsHealingSpell));
            }

            Logger.DebugLog("Pulsing Combat");

            switch (MainSettingsModel.Instance.CurrentRoutine)
            {
            case "Barret":
                return(await BarretRotation.Combat());

            case "Beatrix":
                return(await BeatrixRotation.Combat());

            case "Cecil":
                return(await CecilRotation.Combat());

            case "Cyan":
                return(await CyanRotation.Combat());

            case "Edward":
                return(await EdwardRotation.Combat());

            case "Eiko":
                return(await EikoRotation.Combat());

            case "Elayne":
                return(await ElayneRotation.Combat());

            case "Freya":
                return(await FreyaRotation.Combat());

            case "Mikoto":
                if (HealTarget() != null)
                {
                    return(await MikotoRotation.Heal());
                }
                return(await MikotoRotation.Combat());

            case "Paine":
                return(await PaineRotation.Combat());

            case "Remiel":
                if (HealTarget() != null)
                {
                    return(await MikotoRotation.Heal());
                }
                return(await RemielRotation.Combat());

            case "Sabin":
                return(await SabinRotation.Combat());

            case "Shadow":
                return(await ShadowRotation.Combat());

            case "Surito":
                if (HealTarget() != null)
                {
                    return(await MikotoRotation.Heal());
                }
                return(await SuritoRotation.Combat());

            case "Vivi":
                return(await ViviRotation.Combat());
            }

            return(false);
        }
Beispiel #3
0
        public override async Task <bool> Pull()
        {
            if (!Common_Utils.InActiveInstance() || Target == null)
            {
                return(false);
            }

            if (BotManager.Current.IsAutonomous && !RoutineManager.IsAnyDisallowed(CapabilityFlags.Movement))
            {
                if (await Movement.MovementComposite().ExecuteCoroutine())
                {
                    return(false);
                }
            }

            if (!OpenerEnabled)
            {
                if (Me.IsCasting)
                {
                    var waitUntilCombatTime = TimeSpan.FromMilliseconds(Math.Min(Me.SpellCastInfo.SpellData.AdjustedCastTime.TotalMilliseconds, 2500));

                    if (await DodgeManager.DodgeThis(Me.SpellCastInfo.SpellData, CurrentTarget, CastedAura, IsDot, IsBuff, IsHealingSpell))
                    {
                        await Coroutine.Wait(waitUntilCombatTime, () => Me.InCombat);
                    }
                    return(true);
                }

                if (CombatHelper.LastSpell != null && CombatHelper.LastTarget != Me)
                {
                    await Heal();
                    await CombatBuff();
                    await Combat();

                    var waitUntilCombatTime = TimeSpan.FromMilliseconds(Math.Min(CombatHelper.LastSpell.AdjustedCastTime.TotalMilliseconds, 2500));

                    await Coroutine.Wait(waitUntilCombatTime, () => Me.InCombat);

                    return(true);
                }
            }

            Logger.DebugLog("Pulsing Pull");

            switch (MainSettingsModel.Instance.CurrentRoutine)
            {
            case "Barret":
                return(await BarretRotation.Pull());

            case "Beatrix":
                return(await BeatrixRotation.Pull());

            case "Cecil":
                return(await CecilRotation.Pull());

            case "Cyan":
                return(await CyanRotation.Pull());

            case "Edward":
                return(await EdwardRotation.Pull());

            case "Eiko":
                return(await EikoRotation.Pull());

            case "Elayne":
                return(await ElayneRotation.Pull());

            case "Freya":
                return(await FreyaRotation.Pull());

            case "Mikoto":
                return(await MikotoRotation.Pull());

            case "Paine":
                return(await PaineRotation.Pull());

            case "Remiel":
                return(await RemielRotation.Pull());

            case "Sabin":
                return(await SabinRotation.Pull());

            case "Shadow":
                return(await ShadowRotation.Pull());

            case "Surito":
                return(await SuritoRotation.Pull());

            case "Vivi":
                return(await ViviRotation.Pull());
            }

            return(false);
        }