Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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;
        }