private async Task GoToBarracksTask() { Navigator.PlayerMover = new SlideMover(); Navigator.NavigationProvider = new ServiceNavigationProvider(); // Not in Barracks Log($"Moving to Barracks"); await GrandCompanyHelper.InteractWithNpc(GCNpc.Entrance_to_the_Barracks); await Coroutine.Wait(5000, () => SelectYesno.IsOpen); await Buddy.Coroutines.Coroutine.Sleep(500); if (ff14bot.RemoteWindows.SelectYesno.IsOpen) { Log($"Selecting Yes."); ff14bot.RemoteWindows.SelectYesno.ClickYes(); } await Coroutine.Wait(5000, () => CommonBehaviors.IsLoading); while (CommonBehaviors.IsLoading) { Log($"Waiting for zoning to finish..."); await Coroutine.Wait(-1, () => (!CommonBehaviors.IsLoading)); } _isDone = true; }
private async Task GcExpeditionResultTask() { Navigator.PlayerMover = new SlideMover(); Navigator.NavigationProvider = new ServiceNavigationProvider(); //Inside Barracks await Navigation.OffMeshMoveInteract(GameObjectManager.GetObjectByNPCId(GrandCompanyHelper.GetNpcByType(GCNpc.Squadron_Sergeant))); GameObjectManager.GetObjectByNPCId(GrandCompanyHelper.GetNpcByType(GCNpc.Squadron_Sergeant)).Interact(); await Coroutine.Wait(10000, () => GcArmyExpeditionResult.Instance.IsOpen); GcArmyExpeditionResult.Instance.Close(); _isDone = true; }
private async Task JoinCommandMission(int Index) { Navigator.PlayerMover = new SlideMover(); Navigator.NavigationProvider = new ServiceNavigationProvider(); //Inside Barracks await Navigation.OffMeshMoveInteract(GameObjectManager.GetObjectByNPCId(GrandCompanyHelper.GetNpcByType(GCNpc.Squadron_Sergeant))); GameObjectManager.GetObjectByNPCId(GrandCompanyHelper.GetNpcByType(GCNpc.Squadron_Sergeant)).Interact(); await Coroutine.Wait(10000, () => Talk.DialogOpen); if (!Talk.DialogOpen) { await Navigation.OffMeshMoveInteract(GameObjectManager.GetObjectByNPCId(GrandCompanyHelper.GetNpcByType(GCNpc.Squadron_Sergeant))); GameObjectManager.GetObjectByNPCId(GrandCompanyHelper.GetNpcByType(GCNpc.Squadron_Sergeant)).Interact(); } while (Talk.DialogOpen) { Talk.Next(); await Coroutine.Wait(1000, () => !Talk.DialogOpen); await Coroutine.Wait(1000, () => Talk.DialogOpen); await Coroutine.Yield(); } await Coroutine.Wait(10000, () => SelectString.IsOpen); await Buddy.Coroutines.Coroutine.Sleep(500); { Log($"Choosing Command Missions"); ff14bot.RemoteWindows.SelectString.ClickSlot(0); } await Coroutine.Wait(10000, () => GcArmyCapture.Instance.IsOpen); { GcArmyCapture.Instance.SelectDuty(Index); GcArmyCapture.Instance.Commence(); } await Coroutine.Wait(5000, () => ContentsFinderConfirm.IsOpen); await Buddy.Coroutines.Coroutine.Sleep(500); if (ff14bot.RemoteWindows.ContentsFinderConfirm.IsOpen) { Log($"Commencing Duty."); ff14bot.RemoteWindows.ContentsFinderConfirm.Commence(); await Coroutine.Wait(10000, () => CommonBehaviors.IsLoading); if (CommonBehaviors.IsLoading) { await Coroutine.Wait(-1, () => !CommonBehaviors.IsLoading); } } Log($"Should be in duty"); var director = ((ff14bot.Directors.InstanceContentDirector)DirectorManager.ActiveDirector); if (director != null) { if (director.TimeLeftInDungeon >= new TimeSpan(1, 30, 0)) { Log($"Barrier up"); await Coroutine.Wait(-1, () => director.TimeLeftInDungeon < new TimeSpan(1, 29, 58)); } } else { Log($"Director is null"); } Log($"Should be ready"); _isDone = true; }
public static async Task HandInExpert() { if (GCExpertSettings.Instance.Craft && ConditionParser.ItemCount((uint)GCExpertSettings.Instance.ItemId) == 0) { return; } if (!GrandCompanySupplyList.Instance.IsOpen) { await GrandCompanyHelper.InteractWithNpc(GCNpc.Personnel_Officer); await Coroutine.Wait(5000, () => SelectString.IsOpen); if (!SelectString.IsOpen) { Log("Window is not open...maybe it didn't get to npc?"); } SelectString.ClickSlot(0); await Coroutine.Wait(5000, () => GrandCompanySupplyList.Instance.IsOpen); if (!GrandCompanySupplyList.Instance.IsOpen) { Log("Window is not open...maybe it didn't get to npc?"); } } if (GrandCompanySupplyList.Instance.IsOpen) { await GrandCompanySupplyList.Instance.SwitchToExpertDelivery(); await Coroutine.Sleep(3000); /* * var bools = GrandCompanySupplyList.Instance.GetTurninBools(); * var windowItemIds = GrandCompanySupplyList.Instance.GetTurninItemsIds(); * var required = GrandCompanySupplyList.Instance.GetTurninRequired(); * var maxSeals = Core.Me.MaxGCSeals();*/ //var items = Core.Memory.ReadArray<GCTurninItem>(Offsets.GCTurnin, Offsets.GCTurninCount); int i = 0; int count = GrandCompanySupplyList.Instance.GetNumberOfTurnins();//ConditionParser.ItemCount((uint) GCExpertSettings.Instance.ItemId); if (count > 0) { for (var index = 0; index < count; index++) { //var item = windowItemIds[index]; //Log($"{index}"); GrandCompanySupplyList.Instance.ClickItem(0); await Coroutine.Wait(1000, () => SelectYesno.IsOpen); if (SelectYesno.IsOpen) { SelectYesno.Yes(); } await Coroutine.Wait(5000, () => GrandCompanySupplyReward.Instance.IsOpen); GrandCompanySupplyReward.Instance.Confirm(); await Coroutine.Wait(5000, () => GrandCompanySupplyList.Instance.IsOpen); i += 1; await Coroutine.Sleep(500); } } if (GrandCompanySupplyList.Instance.IsOpen) { GrandCompanySupplyList.Instance.Close(); await Coroutine.Wait(5000, () => SelectString.IsOpen); if (SelectString.IsOpen) { SelectString.ClickSlot((uint)(SelectString.LineCount - 1)); } } /*if (Core.Me.GCSeals() > 200) * { * await GrandCompanyShop.BuyKnownItem(21072, (int) (Core.Me.GCSeals() / 200)); * }*/ } }
public async static Task DoGCDailyTurnins() { Navigator.PlayerMover = new SlideMover(); Navigator.NavigationProvider = new ServiceNavigationProvider(); var items = Core.Memory.ReadArray <GCTurninItem>(Offsets.GCTurnin, Offsets.GCTurninCount); /* * foreach (var item in items) * { * Logging.Write(item.ItemID); * }*/ if (!items.Any(i => i.CanHandin)) { Log("All done."); return; } string lisbethOrder = await GetGCSupplyList(); if (lisbethOrder == "") { Log("Not Calling lisbeth."); } else { //Log(lisbethOrder); Log("Calling lisbeth"); if (!await Lisbeth.ExecuteOrders(lisbethOrder)) { Log("Lisbeth order failed, Dumping order to GCSupply.json"); using (StreamWriter outputFile = new StreamWriter("GCSupply.json", false)) { await outputFile.WriteAsync(lisbethOrder); } } else { Log("Lisbeth order should be done"); } } items = Core.Memory.ReadArray <GCTurninItem>(Offsets.GCTurnin, Offsets.GCTurninCount); if (!items.Any(i => i.CanHandin && InventoryManager.FilledSlots.Any(j => j.RawItemId == i.ItemID && !j.HasMateria() && j.Count >= i.ReqCount))) { Log("No items available to hand in"); return; } if (!GrandCompanySupplyList.Instance.IsOpen) { await GrandCompanyHelper.InteractWithNpc(GCNpc.Personnel_Officer); await Coroutine.Wait(5000, () => SelectString.IsOpen); if (!SelectString.IsOpen) { Log("Window is not open...maybe it didn't get to npc?"); return; } SelectString.ClickSlot(0); await Coroutine.Wait(5000, () => GrandCompanySupplyList.Instance.IsOpen); if (!GrandCompanySupplyList.Instance.IsOpen) { Log("Window is not open...maybe it didn't get to npc?"); return; } } if (GrandCompanySupplyList.Instance.IsOpen) { await GrandCompanySupplyList.Instance.SwitchToSupply(); await HandleCurrentGCWindow(); await GrandCompanySupplyList.Instance.SwitchToProvisioning(); await HandleCurrentGCWindow(); GrandCompanySupplyList.Instance.Close(); await Coroutine.Wait(5000, () => SelectString.IsOpen); if (SelectString.IsOpen) { SelectString.ClickSlot((uint)(SelectString.LineCount - 1)); } } }