public override async Task <bool> Gather(ExGatherTag tag) { tag.StatusText = "Gathering items"; while (tag.Node.CanGather && GatheringManager.SwingsRemaining > tag.SwingsRemaining && Behaviors.ShouldContinue) { await Wait(); if (Core.Player.CurrentGP >= 100 && GatheringManager.MaxSwings > 4) { if (Core.Player.ClassLevel >= 68) { await tag.Cast(Ability.IncreaseGatherYieldOnce2); await Wait(); } else if (Core.Player.ClassLevel >= 24) { await tag.Cast(Ability.IncreaseGatherYieldOnce); await Wait(); } } if (GatheringManager.GatheringCombo == 4 && GatheringManager.SwingsRemaining > tag.SwingsRemaining) { 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(); } } tag.StatusText = "Gathering items complete"; return(true); }
public override async Task <bool> Gather(ExGatherTag tag) { tag.StatusText = "Gathering items"; while (tag.Node.CanGather && GatheringManager.SwingsRemaining > tag.SwingsRemaining && Behaviors.ShouldContinue) { await Wait(); if (GatheringManager.GatheringCombo == 4 && GatheringManager.SwingsRemaining > tag.SwingsRemaining) { await tag.Cast(Ability.IncreaseGatherChanceQuality100); await tag.Cast(Ability.IncreaseGatherYieldOnce); await Wait(); } // No way to tell if we missed the first swing afaik... so we have to check if we have a combo of 0 anytime after the second swing. if (GatheringManager.GatheringCombo == 0 && GatheringManager.SwingsRemaining < 5 && !Core.Player.HasAura(220)) { await tag.Cast(Ability.IncreaseGatherQuality10); } 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(); } } tag.StatusText = "Gathering items complete"; return(true); }
public virtual async Task<bool> Gather(ExGatherTag tag) { tag.StatusText = "Gathering items"; while (tag.Node.CanGather && GatheringManager.SwingsRemaining > tag.SwingsRemaining && Behaviors.ShouldContinue) { await Wait(); if (Memory.Gathering.HqChain == 2 && GatheringManager.SwingsRemaining > tag.SwingsRemaining) { await tag.Cast(Ability.Luck); await Wait(); } if (GatheringManager.GatheringCombo == 4 && GatheringManager.SwingsRemaining > tag.SwingsRemaining) { 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(); } } tag.StatusText = "Gathering items complete"; return true; }
public virtual async Task <bool> Gather(ExGatherTag tag) { tag.StatusText = "Gathering items"; while (tag.Node.CanGather && GatheringManager.SwingsRemaining > tag.SwingsRemaining && Behaviors.ShouldContinue) { await Wait(); if (GatheringManager.HqGatheringCombo == 2 && GatheringManager.SwingsRemaining > tag.SwingsRemaining) { await tag.Cast(Ability.Luck); await Wait(); } if (GatheringManager.GatheringCombo == 4 && GatheringManager.SwingsRemaining > tag.SwingsRemaining) { 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(); } } tag.StatusText = "Gathering items complete"; return(true); }
public override async Task<bool> Gather(ExGatherTag tag) { tag.StatusText = "Gathering items"; while (tag.Node.CanGather && GatheringManager.SwingsRemaining > tag.SwingsRemaining && Behaviors.ShouldContinue) { await Wait(); if (GatheringManager.GatheringCombo == 4 && GatheringManager.SwingsRemaining > tag.SwingsRemaining) { await tag.Cast(Ability.IncreaseGatherChanceQuality100); await tag.Cast(Ability.IncreaseGatherYieldOnce); await Wait(); } // No way to tell if we missed the first swing afaik... so we have to check if we have a combo of 0 anytime after the second swing. if (GatheringManager.GatheringCombo == 0 && GatheringManager.SwingsRemaining < 5 && !Core.Player.HasAura(220)) { await tag.Cast(Ability.IncreaseGatherQuality10); } 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(); } } tag.StatusText = "Gathering items complete"; return true; }
public override async Task <bool> ExecuteRotation(ExGatherTag tag) { if (!tag.Node.IsUnspoiled()) { if (!(GatheringManager.SwingsRemaining > 4 && Core.Player.CurrentGP >= 250 && level >= 77)) { return(true); } await tag.Cast(Ability.PickClean); await IncreaseChance(tag); await Wait(); return(true); } var endlessToil = tag.GatherItem.Level <= 60 ? 0 : 1; double YieldsLeft() { if (GatheringManager.MaxSwings == GatheringManager.SwingsRemaining) { return(Math.Min(GatheringManager.MaxSwings - endlessToil, Math.Max(0, (Core.Player.CurrentGP + (GatheringManager.MaxSwings - (endlessToil + 1)) * 5) / 100))); } else { return(Math.Min(GatheringManager.SwingsRemaining, Math.Max(0, (Core.Player.CurrentGP + (GatheringManager.SwingsRemaining - 1) * 5) / 100))); } } var bountifulYield = tag.GatherItem.Level <= 70 ? 3 : 2; int pickCleanYield; if (tag.GatherItem.Level <= 50) { pickCleanYield = 3; } else { pickCleanYield = tag.GatherItem.Level <= 70 ? 2 : 1; } await IncreaseChance(tag); await Wait(); if (Core.Player.CurrentGP >= 250 && level >= 77) { var adjustedGp = YieldsLeft() - Math.Truncate(YieldsLeft()); var pickCleanBonus = adjustedGp >= 0.50 && adjustedGp <= 0.99 ? 1 : 0; if (pickCleanYield * (GatheringManager.MaxSwings - endlessToil) > bountifulYield * (3 - pickCleanBonus)) { await tag.Cast(Ability.PickClean); await Wait(); } } double uncappedYields = Math.Floor((Core.Player.CurrentGP + (GatheringManager.MaxSwings - (endlessToil + 1)) * 5) / 100d); if (Core.Player.CurrentGP >= 500 && level >= 40) { if (((GatheringManager.MaxSwings - endlessToil) * 2) + (uncappedYields - 5) >= bountifulYield * Math.Floor(YieldsLeft())) { await tag.Cast(Ability.IncreaseGatherYield2); await Wait(); } } bool usedVigorForce = false; while (tag.Node.CanGather && GatheringManager.SwingsRemaining > 0 && Behaviors.ShouldContinue) { await Wait(); if (!usedVigorForce && GatheringManager.GatheringCombo == 4 && GatheringManager.SwingsRemaining > 0 && ((tag.GatherItem.HqChance > 0 && tag.GatherItem.HqChance < 100) || tag.GatherItem.Chance < 100)) { await tag.Cast(Ability.IncreaseGatherChanceQuality100); usedVigorForce = true; await Wait(); } if (Core.Player.CurrentGP >= 100 && level >= 68 && (tag.GatherItem.HqChance == 100 || GatheringManager.SwingsRemaining <= YieldsLeft()) && !Core.Player.HasAura(1286)) { await tag.Cast(Ability.IncreaseGatherYieldOnce2); await Coroutine.Wait(2000, () => Core.Player.HasAura(1286)); await Wait(); } double counsels = Math.Floor(YieldsLeft() + 0.1); if (Core.Player.CurrentGP >= 10 && level >= 67 && tag.GatherItem.HqChance > 0 && tag.GatherItem.HqChance < 100 && YieldsLeft() >= counsels && !Core.Player.HasAura(1262)) { await tag.Cast(Ability.IncreaseGatherQualityRandom); await Coroutine.Wait(2000, () => Core.Player.HasAura(1262)); await Wait(); } if (!await tag.ResolveGatherItem()) { return(false); } if (!tag.GatherItem.TryGatherItem()) { return(false); } await Coroutine.Yield(); } return(true); }
public override async Task <bool> ExecuteRotation(ExGatherTag tag) { if (Core.Player.CurrentGP >= 300 && level >= 63 && tag.GatherItem.HqChance < 100) { if (tag.GatherItem.HqChance >= 90) { await tag.Cast(Ability.IncreaseGatherQuality10); await Wait(); } else { await tag.Cast(Ability.IncreaseGatherQuality30100); await Wait(); } await IncreaseChance(tag); await Wait(); } double YieldsLeft() { return(Math.Min(GatheringManager.SwingsRemaining, Math.Max(0, (Core.Player.CurrentGP + GatheringManager.SwingsRemaining * 5) / 100))); } var bountifulYield = tag.GatherItem.Level <= 70 ? 3 : 2; double uncappedYields = Math.Floor((Core.Player.CurrentGP + (GatheringManager.MaxSwings - 1) * 5) / 100d); if (Core.Player.CurrentGP >= 500 && level >= 40) { if ((GatheringManager.MaxSwings * 2) + (uncappedYields - 5) >= bountifulYield * Math.Floor(YieldsLeft())) { await tag.Cast(Ability.IncreaseGatherYield2); await Wait(); } } bool usedVigorForce = false; while (tag.Node.CanGather && GatheringManager.SwingsRemaining > 0 && Behaviors.ShouldContinue) { await Wait(); if (!usedVigorForce && GatheringManager.GatheringCombo == 4 && GatheringManager.SwingsRemaining > tag.SwingsRemaining && ((tag.GatherItem.HqChance > 0 && tag.GatherItem.HqChance < 100) || tag.GatherItem.Chance < 100)) { await tag.Cast(Ability.IncreaseGatherChanceQuality100); usedVigorForce = true; } if (Core.Player.CurrentGP >= 100 && level >= 68 && (tag.GatherItem.HqChance == 100 || GatheringManager.SwingsRemaining <= YieldsLeft()) && !Core.Player.HasAura(1286)) { await tag.Cast(Ability.IncreaseGatherYieldOnce2); await Coroutine.Wait(2000, () => Core.Player.HasAura(1286)); await Wait(); } //double counsels = Math.Floor(YieldsLeft() + 0.1); //if (Core.Player.CurrentGP >= 10 && level >= 67 && tag.GatherItem.HqChance > 0 && tag.GatherItem.HqChance < 100 && YieldsLeft() >= counsels && !Core.Player.HasAura(1262)) //{ // await tag.Cast(Ability.IncreaseGatherQualityRandomOnce); // await Coroutine.Wait(2000, () => Core.Player.HasAura(1262)); // await Wait(); //} if (!await tag.ResolveGatherItem()) { return(false); } if (!tag.GatherItem.TryGatherItem()) { return(false); } await Coroutine.Yield(); } return(true); }