Example #1
0
        private async Task ReviveFossil(FossilCount count, CancellationToken token)
        {
            await Click(A, 1100, token).ConfigureAwait(false);
            await Click(A, 1300, token).ConfigureAwait(false);

            if (count.UseSecondOption1(FossilSpecies))
            {
                await Click(DDOWN, 300, token).ConfigureAwait(false);
            }
            await Click(A, 1300, token).ConfigureAwait(false);

            if (count.UseSecondOption2(FossilSpecies))
            {
                await Click(DDOWN, 300, token).ConfigureAwait(false);
            }
            await Click(A, 1200, token).ConfigureAwait(false);
            await Click(A, 1200, token).ConfigureAwait(false);

            await Click(A, 4000, token).ConfigureAwait(false);
            await Click(A, 1200, token).ConfigureAwait(false);
            await Click(A, 1200, token).ConfigureAwait(false);

            if (GameLang == LanguageID.French)
            {
                await Click(A, 800, token).ConfigureAwait(false);
            }
            await Click(A, 1200, token).ConfigureAwait(false);
            await Click(A, 4500, token).ConfigureAwait(false);

            Log("Getting fossil! Clearing destination slot.");
            await SetBoxPokemon(Blank, InjectBox, InjectSlot, token).ConfigureAwait(false);

            await Click(A, 2400, token).ConfigureAwait(false);
            await Click(A, 1800, token).ConfigureAwait(false);
        }
Example #2
0
        private async Task ReviveFossil(FossilCount count, CancellationToken token)
        {
            Log("Starting fossil revival routine...");
            if (GameLang == LanguageID.Spanish)
            {
                await Click(A, 0_900, token).ConfigureAwait(false);
            }

            await Click(A, 1_100, token).ConfigureAwait(false);

            // French is slightly slower.
            if (GameLang == LanguageID.French)
            {
                await Task.Delay(0_200, token).ConfigureAwait(false);
            }

            await Click(A, 1_300, token).ConfigureAwait(false);

            // Selecting first fossil.
            if (count.UseSecondOption1(Hub.Config.SWSH_Fossil.Species))
            {
                await Click(DDOWN, 0_300, token).ConfigureAwait(false);
            }
            await Click(A, 1_300, token).ConfigureAwait(false);

            // Selecting second fossil.
            if (count.UseSecondOption2(Hub.Config.SWSH_Fossil.Species))
            {
                await Click(DDOWN, 300, token).ConfigureAwait(false);
            }

            // A spam through accepting the fossil and agreeing to revive.
            for (int i = 0; i < 8; i++)
            {
                await Click(A, 0_400, token).ConfigureAwait(false);
            }

            // Safe to mash B from here until we get out of all menus.
            while (!await SWSHIsGiftFound(token).ConfigureAwait(false))
            {
                await Click(B, 0_400, token).ConfigureAwait(false);
            }
        }
Example #3
0
        private async Task ReviveFossil(FossilCount count, CancellationToken token)
        {
            Log("Starting fossil revival routine...");

            if (GameLang == LanguageID.Spanish)
            {
                await Click(A, 0_900, token).ConfigureAwait(false);
            }

            await Click(A, 1_100, token).ConfigureAwait(false);

            // French is slightly slower.
            if (GameLang == LanguageID.French)
            {
                await Task.Delay(0_200, token).ConfigureAwait(false);
            }

            await Click(A, 1_300, token).ConfigureAwait(false);

            // Selecting first fossil.
            if (count.UseSecondOption1(Hub.Config.Fossil.Species))
            {
                await Click(DDOWN, 0_300, token).ConfigureAwait(false);
            }
            await Click(A, 1_300, token).ConfigureAwait(false);

            // Selecting second fossil.
            if (count.UseSecondOption2(Hub.Config.Fossil.Species))
            {
                await Click(DDOWN, 300, token).ConfigureAwait(false);
            }

            // A spam through accepting the fossil and agreeing to revive.
            while (await ReadUntilPresent(await ParsePointer(giftpoke, token), 2_000, 0_200, token).ConfigureAwait(false) == null)
            {
                await Click(A, 0_400, token).ConfigureAwait(false);

                await Task.Delay(1_000, token).ConfigureAwait(false);
            }
        }