/// <summary> /// Auto accepts/completes quests. /// </summary> /// <returns></returns> private bool ExecuteAutoAcceptQuests() { // Auto accept quest if (JournalAccept.IsOpen) { JournalAccept.Accept(); return(true); } // Auto complete quest if (JournalResult.IsOpen) { if (!JournalResult.ButtonClickable) { JournalResult.SelectSlot(0); } if (JournalResult.ButtonClickable) { JournalResult.Complete(); return(true); } } return(false); }
/// <summary> /// Clicks Accept Quest once available. /// </summary> private static async Task <bool> HandleJournalAccept() { if (!JournalAccept.IsOpen) { return(false); } while (JournalAccept.IsOpen) { JournalAccept.Accept(); await Common.Sleep(50); if (!JournalAccept.IsOpen) { break; } } return(true); }
private static async Task <bool> HelpersMethod() { if (MainSettingsModel.Instance.UseAutoCutscene) { if (QuestLogManager.InCutscene) { if (AgentCutScene.Instance.CanSkip && !SelectString.IsOpen) { AgentCutScene.Instance.PromptSkip(); if (await Coroutine.Wait(600, () => SelectString.IsOpen)) { SelectString.ClickSlot(0); await Coroutine.Sleep(1000); } } } } if (MainSettingsModel.Instance.AutoSprint && ActionManager.IsSprintReady && MovementManager.IsMoving) { ActionManager.Sprint(); } if (MainSettingsModel.Instance.UseAutoTalk) { if (Core.Me.IsAlive) { if (SelectYesno.IsOpen) { SelectYesno.ClickYes(); } } if (Talk.DialogOpen) { Talk.Next(); } //if (Request.IsOpen) //{ // Logger.ATBLog("Handing over any item(s) in your Key Items."); // foreach (var s in InventoryManager.GetBagByInventoryBagId(InventoryBagId.KeyItems)) // { // s.Handover(); // Logger.ATBLog(s.EnglishName); // await Coroutine.Wait(250, () => Request.HandOverButtonClickable); // if (Request.HandOverButtonClickable) { break; } // } // // Logger.ATBLog("Handing over any item(s) in your Inventory."); // foreach (var s in InventoryManager.FilledSlots) // { // s.Handover(); // Logger.ATBLog(s.EnglishName); // await Coroutine.Wait(250, () => Request.HandOverButtonClickable); // if (Request.HandOverButtonClickable) { break; } // } // // if (Request.HandOverButtonClickable) { Request.HandOver(); } // // Logger.ATBLog("Handing over any item(s) in your Armory."); // foreach (var s in InventoryManager.FilledArmorySlots) // { // s.Handover(); // Logger.ATBLog(s.EnglishName); // await Coroutine.Wait(250, () => Request.HandOverButtonClickable); // if (Request.HandOverButtonClickable) { break; } // } // // if (Request.HandOverButtonClickable) { Request.HandOver(); } // else { await Coroutine.Wait(3000, () => !Request.IsOpen); } //} } if (MainSettingsModel.Instance.UseAutoQuest) { if (JournalAccept.IsOpen) { JournalAccept.Accept(); } if (JournalResult.IsOpen) { JournalResult.Complete(); } } return(false); }
private async Task <bool> HandleWindows() { while (WindowsOpen()) { if (SelectString.IsOpen) { if (DialogOption > -1) { SelectString.ClickSlot((uint)DialogOption); } SelectString.ClickLineEquals(QuestName); await Coroutine.Sleep(100); } if (SelectIconString.IsOpen) { if (DialogOption > -1) { SelectIconString.ClickSlot((uint)DialogOption); } SelectIconString.ClickLineEquals(QuestName); await Coroutine.Sleep(100); } if (SelectYesno.IsOpen) { SelectYesno.ClickYes(); await Coroutine.Sleep(100); } if (Request.IsOpen) { var items = InventoryManager.FilledInventoryAndArmory.ToArray(); for (int i = 0; i < ItemIds.Length; i++) { BagSlot item; if (RequiresHq[i]) { item = items.FirstOrDefault(z => z.RawItemId == ItemIds[i] && z.IsHighQuality && !usedSlots.Contains(z)); } else { item = items.FirstOrDefault(z => z.RawItemId == ItemIds[i] && !usedSlots.Contains(z)); } item.Handover(); usedSlots.Add(item); } usedSlots.Clear(); Request.HandOver(); await Coroutine.Sleep(100); } if (JournalResult.IsOpen) { if (JournalResult.ButtonClickable) { JournalResult.Complete(); } if (hasRewards) { JournalResult.SelectSlot(RewardSlot); } await Coroutine.Sleep(100); } if (JournalAccept.IsOpen) { JournalAccept.Accept(); await Coroutine.Sleep(100); } if (Talk.DialogOpen) { Talk.Next(); await Coroutine.Sleep(100); } if (QuestLogManager.InCutscene) { if (AgentCutScene.Instance.CanSkip && !SelectString.IsOpen) { AgentCutScene.Instance.PromptSkip(); if (await Coroutine.Wait(600, () => SelectString.IsOpen)) { SelectString.ClickSlot(0); await Coroutine.Sleep(1000); } } } await Coroutine.Yield(); } return(QuestLogManager.InCutscene || Core.Player.HasTarget); }