Ejemplo n.º 1
0
		protected override async Task<bool> IncreaseChance(GatherCollectableTag tag)
		{
			var level = Core.Player.ClassLevel;
			if (Core.Player.CurrentGP >= 100 && tag.GatherItem.Chance < 95)
			{
				if (level >= 23 && GatheringManager.SwingsRemaining == 1)
				{
					return await tag.Cast(Ability.IncreaseGatherChanceOnce15);
				}

				return await tag.Cast(Ability.IncreaseGatherChance15);
			}

			if (Core.Player.CurrentGP >= 50 && tag.GatherItem.Chance < 100)
			{
				if (level >= 23 && GatheringManager.SwingsRemaining == 1)
				{
					return await tag.Cast(Ability.IncreaseGatherChanceOnce15);
				}

				return await tag.Cast(Ability.IncreaseGatherChance5);
			}

			return true;
		}
        int IGetOverridePriority.GetOverridePriority(GatherCollectableTag tag)
        {
            if (tag.IsUnspoiled())
            {
                // We need 5 swings to use this rotation
                if (GatheringManager.SwingsRemaining < 5)
                {
                    return -1;
                }
            }

            if (tag.IsEphemeral())
            {
                // We need 4 swings to use this rotation
                if (GatheringManager.SwingsRemaining < 4)
                {
                    return -1;
                }
            }


            // if we have a collectable && the collectable value is greater than or equal to 345: Priority 345
            if (tag.CollectableItem != null && tag.CollectableItem.Value >= 345)
            {
                return 345;
            }

            return -1;
        }
        public override async Task<bool> ExecuteRotation(GatherCollectableTag tag)
        {
            if (Core.Player.CurrentGP >= 300 && GatheringManager.SwingsRemaining > 4)
            {
                await tag.Cast(Ability.IncreaseGatherQuality30);
                await base.ExecuteRotation(tag);

                if (tag.GatherItem.Chance == 100 && Core.Player.CurrentGP >= 300 && GatheringManager.SwingsRemaining == 5)
                {
                    await Wait();

                    if (!tag.GatherItem.TryGatherItem())
                    {
                        return false;
                    }

                    await tag.Cast(Ability.AdditionalAttempt);
                }

                return true;
            }

            // Approx 30 gp or more between running to nodes, we are basically capped here so just use 100 gp
            if (Core.Player.CurrentGP >= Core.Player.MaxGP - 30)
            {
                await tag.Cast(Ability.IncreaseGatherQuality10);
                return true;
            }

            return true;
        }
        public override async Task<bool> ExecuteRotation(GatherCollectableTag tag)
        {
            var level = Core.Player.ClassLevel;

            if (GatheringManager.SwingsRemaining > 4 ||
                ShouldForceUseRotation(tag, level))
            {
                if (Core.Player.CurrentGP >= 500 && level >= 40)
                {
                    await tag.Cast(Ability.IncreaseGatherYield2);
                    return await base.ExecuteRotation(tag);
                }

                if (Core.Player.CurrentGP >= 400 && level >= 30 && (level < 40 || Core.Player.MaxGP < 500))
                {
                    await tag.Cast(Ability.IncreaseGatherYield);
                    return await base.ExecuteRotation(tag);
                }

                if (Core.Player.CurrentGP >= 300 && level >= 25 && (level < 30 || Core.Player.MaxGP < 400))
                {
                    await Wait();

                    if (!tag.GatherItem.TryGatherItem())
                    {
                        return false;
                    }

                    await tag.Cast(Ability.AdditionalAttempt);
                    return await base.ExecuteRotation(tag);
                }
            }

            return true;
        }
        private async Task<bool> DoRotation(GatherCollectableTag tag)
        {
            // 96-180 with min perception
            // 138-259 with max perception
            await tag.Cast(Ability.DiscerningEye);
            await tag.Cast(Ability.InstinctualAppraisal);
            
            if (CurrentRarity < 240)
            {
                var perception = Core.Player.Stats.Perception;

                // Methodical range is 80-115
                // Discerning methodical is 120-172
                if (Core.Player.CurrentGP >= 200)
                {
                    // TODO: not complete
                }

                await Methodical(tag);
            }

            await IncreaseChance(tag);

            return true;
        }
Ejemplo n.º 6
0
        public virtual async Task<bool> Gather(GatherCollectableTag tag)
        {
            while (tag.Node.CanGather && GatheringManager.SwingsRemaining > 0 && Behaviors.ShouldContinue)
            {
                await Wait();

                if (GatheringManager.GatheringCombo == 4 && GatheringManager.SwingsRemaining > 0)
                {
                    await tag.Cast(Ability.IncreaseGatherChanceQuality100);

                    await Wait();
                }

                if (!await tag.ResolveGatherItem())
                {
                    return false;
                }

                var swingsRemaining = GatheringManager.SwingsRemaining - 1;

                if (!tag.GatherItem.TryGatherItem())
                {
                    return false;
                }

                var ticks = 0;
                while (swingsRemaining != GatheringManager.SwingsRemaining && ticks < 60 && Behaviors.ShouldContinue)
                {
                    await Coroutine.Yield();
                    ticks++;
                }
            }

            return true;
        }
        int IGetOverridePriority.GetOverridePriority(GatherCollectableTag tag)
        {
            if (tag.IsUnspoiled())
            {
                // We need 5 swings to use this rotation
                if (GatheringManager.SwingsRemaining < 5)
                {
                    return -1;
                }
            }

            if (tag.IsEphemeral())
            {
                // We need 4 swings to use this rotation
                if (GatheringManager.SwingsRemaining < 4)
                {
                    return -1;
                }
            }

            // if we have a collectable Priority 79
            if (tag.CollectableItem != null && tag.CollectableItem.Value <= 0)
            {
                return 79;
            }

            return -1;
        }
		public override async Task<bool> ExecuteRotation(GatherCollectableTag tag)
		{
			await Methodical(tag);

			await IncreaseChance(tag);

			return true;
		}
        int IGetOverridePriority.GetOverridePriority(GatherCollectableTag tag)
        {
            if (tag.IsEphemeral() || tag.IsUnspoiled())
            {
                return -1;
            }

            return 8000;
        }
Ejemplo n.º 10
0
		public override async Task<bool> ExecuteRotation(GatherCollectableTag tag)
		{
			if (Core.Player.CurrentGP >= 500)
			{
				await tag.Cast(Ability.IncreaseGatherYield2);
			}

			return await base.ExecuteRotation(tag);
		}
Ejemplo n.º 11
0
        protected virtual IGatheringRotation ResolveInternalGatheringRotation(GatherCollectableTag tag)
        {
            if (tag.IsUnspoiled())
            {
                return GatherCollectableTag.Rotations["Unspoiled"];
            }

            return GatherCollectableTag.Rotations["RegularNode"];
        }
        public override async Task<bool> ExecuteRotation(GatherCollectableTag tag)
        {
            if (Core.Player.ClassLevel > 50)
            {
                return await DoRotation(tag);
            }

            return await DoLevel50Rotation(tag);
        }
		int IGetOverridePriority.GetOverridePriority(GatherCollectableTag tag)
		{
			if (tag.GatherItem.IsUnknown || (tag.IsUnspoiled() && tag.GatherItem.Chance == 25))
			{
				return int.MaxValue;
			}

			return -1;
		}
Ejemplo n.º 14
0
		int IGetOverridePriority.GetOverridePriority(GatherCollectableTag tag)
		{
			if (tag.IsUnspoiled() && tag.CollectableItem == null)
			{
				return 8000;
			}

			return -1;
		}
Ejemplo n.º 15
0
        public virtual async Task<bool> Prepare(GatherCollectableTag tag)
        {
            if (Core.Player.HasAura((int)AbilityAura.CollectorsGlove))
            {
                return await tag.Cast(Ability.CollectorsGlove);
            }

            return true;
        }
Ejemplo n.º 16
0
		int IGetOverridePriority.GetOverridePriority(GatherCollectableTag tag)
		{
			// if we have a collectable && the collectable value is greater than or equal to 115: Priority 115
			if (tag.CollectableItem != null && tag.CollectableItem.Value >= 115)
			{
				return 115;
			}

			return -1;
		}
        int IGetOverridePriority.GetOverridePriority(GatherCollectableTag tag)
        {
            // if we have a collectable && the collectable value is greater than or equal to 240: Priority 240
            if (tag.CollectableItem != null && tag.CollectableItem.Value >= 240)
            {// Not complete
                //return 240;
            }

            return -1;
        }
		public override async Task<bool> Prepare(GatherCollectableTag tag)
		{
			// TODO: how much gathering to 1 hit?  needs to be added into this logic.
			if (Core.Player.CurrentGP >= 500)
			{
				await tag.Cast(Ability.Toil);
			}

			return await base.Prepare(tag);
		}
		public override async Task<bool> Prepare(GatherCollectableTag tag)
		{
			var unknownItems = GatheringManager.GatheringWindowItems.Where(i => i.IsUnknownChance() && i.Amount > 0).ToArray();

			if (tag.IsUnspoiled() && Core.Player.CurrentGP >= 550 && unknownItems.Length > 1)
			{
				await tag.Cast(Ability.Toil);
			}

			return await base.Prepare(tag);
		}
        public override async Task<bool> ExecuteRotation(GatherCollectableTag tag)
        {
            // TODO: Make dynamic rotation
            await DiscerningMethodical(tag);
            await DiscerningMethodical(tag);
            await DiscerningMethodical(tag);

            await IncreaseChance(tag);

            return true;
        }
Ejemplo n.º 21
0
		protected bool ShouldForceUseRotation(GatherCollectableTag tag, uint level)
		{
			if (!tag.GatherItemIsFallback && ((level < 50 && tag.NodesGatheredAtMaxGp > 4) || tag.NodesGatheredAtMaxGp > 6))
			{
				tag.Logger.Info("Using Gp since we have gathered {0} nodes at max Gp.", tag.NodesGatheredAtMaxGp);

				return true;
			}

			return false;
		}
        public override async Task<bool> Prepare(GatherCollectableTag tag)
        {
            if (tag.IsUnspoiled()
                && Core.Player.CurrentGP >= 550
                && GatheringManager.GatheringWindowItems.Count(i => i.Chance == 25 && i.Amount > 0) > 1)
            {

                await tag.Cast(Ability.Toil);
            }
            
            return await base.Prepare(tag);
        }
        private async Task AppraiseAndRebuff(GatherCollectableTag tag)
        {
            await Impulsive(tag);

            if (HasDiscerningEye)
            {
                await tag.Cast(Ability.SingleMind);
            }
            else
            {
                await tag.Cast(Ability.DiscerningEye);
            }
        }
        public override async Task<bool> ExecuteRotation(GatherCollectableTag tag)
        {
            await tag.Cast(Ability.DiscerningEye);

            await AppraiseAndRebuff(tag);
            await AppraiseAndRebuff(tag);

            await Methodical(tag);

            await IncreaseChance(tag);

            return true;
        }
        private async Task<bool> DoLevel50Rotation(GatherCollectableTag tag)
        {
            // 240-345 collectability
            await Methodical(tag);
            await Methodical(tag);
            await Methodical(tag);

            if (Core.Player.CurrentGP >= 300)
            {
                await tag.Cast(Ability.AdditionalAttempt);    
            }
            
            return true;
        }
Ejemplo n.º 26
0
        protected bool ShouldForceUseRotation(GatherCollectableTag tag, uint level)
        {
            if (!tag.GatherItemIsFallback && ((level < 50 && tag.NodesGatheredAtMaxGp > 4) || tag.NodesGatheredAtMaxGp > 6))
            {
                Logging.Write(
                    Colors.Chartreuse,
                    "GatherCollectable: Using Gp since we have gathered {0} nodes at max Gp.",
                    tag.NodesGatheredAtMaxGp);

                return true;
            }

            return false;
        }
        int IGetOverridePriority.GetOverridePriority(GatherCollectableTag tag)
        {
            if (tag.CollectableItem != null)
            {
                return -1;
            }

            if (tag.GatherIncrease == GatherIncrease.Yield
                || (tag.GatherIncrease == GatherIncrease.Auto && Core.Player.ClassLevel >= 40))
            {
                return 9001;
            }

            return -1;
        }
Ejemplo n.º 28
0
		int IGetOverridePriority.GetOverridePriority(GatherCollectableTag tag)
		{
			// Don't use unless ward increases item yield.
			if (!DoesWardIncreaseItemYield(tag))
			{
				return -1;
			}

			if (!tag.GatherItem.IsUnknown && tag.GatherItem.ItemId < 20)
			{
				return 10000;
			}

			return -1;
		}
Ejemplo n.º 29
0
        int IGetOverridePriority.GetOverridePriority(GatherCollectableTag tag)
        {
            // Only override if the item name ends with ' map'
            if (!tag.GatherItem.ItemData.EnglishName.EndsWith(" map", StringComparison.InvariantCultureIgnoreCase))
            {
                return -1;
            }

            // Only override if we dont' have this map in our inventory
            if (tag.GatherItem.ItemData.ItemCount() > 0)
            {
                return -1;
            }

            return 10000;
        }
        int IGetOverridePriority.GetOverridePriority(GatherCollectableTag tag)
        {
            // We need 5 swings to use this rotation
            if (GatheringManager.SwingsRemaining < 5)
            {
                return -1;
            }

            // if we have a collectable && the collectable value is greater than or equal to 570: Priority 570
            if (tag.CollectableItem != null && tag.CollectableItem.Value >= 570)
            {
                return 570;
            }

            return -1;
        }