Beispiel #1
0
        public void Run(CancellationToken cancellationToken)
        {
            if (_session.LogicSettings.UseNearActionRandom)
            {
                HumanRandomActionTask.Execute(_session, cancellationToken).Wait(cancellationToken);
            }
            else
            {
                if (_session.LogicSettings.EvolveAllPokemonAboveIv || _session.LogicSettings.EvolveAllPokemonWithEnoughCandy ||
                    _session.LogicSettings.UseLuckyEggsWhileEvolving || _session.LogicSettings.KeepPokemonsThatCanEvolve)
                {
                    EvolvePokemonTask.Execute(_session, cancellationToken).Wait(cancellationToken);
                }
                if (_session.LogicSettings.AutomaticallyLevelUpPokemon)
                {
                    LevelUpPokemonTask.Execute(_session, cancellationToken).Wait(cancellationToken);
                }
                if (_session.LogicSettings.UseLuckyEggConstantly)
                {
                    UseLuckyEggConstantlyTask.Execute(_session, cancellationToken).Wait(cancellationToken);
                }
                if (_session.LogicSettings.UseIncenseConstantly)
                {
                    UseIncenseConstantlyTask.Execute(_session, cancellationToken).Wait(cancellationToken);
                }
                if (_session.LogicSettings.TransferDuplicatePokemon)
                {
                    TransferDuplicatePokemonTask.Execute(_session, cancellationToken).Wait(cancellationToken);
                }
                if (_session.LogicSettings.TransferWeakPokemon)
                {
                    TransferWeakPokemonTask.Execute(_session, cancellationToken).Wait(cancellationToken);
                }
                if (_session.LogicSettings.RenamePokemon)
                {
                    RenamePokemonTask.Execute(_session, cancellationToken).Wait(cancellationToken);
                }
                if (_session.LogicSettings.AutoFavoritePokemon)
                {
                    FavoritePokemonTask.Execute(_session, cancellationToken).Wait(cancellationToken);
                }

                RecycleItemsTask.Execute(_session, cancellationToken).Wait(cancellationToken);
                GetPokeDexCount.Execute(_session, cancellationToken).Wait(cancellationToken);

                if (_session.LogicSettings.UseEggIncubators)
                {
                    UseIncubatorsTask.Execute(_session, cancellationToken).Wait(cancellationToken);
                }
            }

            if (_session.LogicSettings.UseGpxPathing)
            {
                FarmPokestopsGpxTask.Execute(_session, cancellationToken).Wait(cancellationToken);
            }
            else
            {
                FarmPokestopsTask.Execute(_session, cancellationToken).Wait(cancellationToken);
            }
        }
Beispiel #2
0
        public async Task <IState> Execute(ISession session, CancellationToken cancellationToken)
        {
            if (session.LogicSettings.UseNearActionRandom)
            {
                await HumanRandomActionTask.Execute(session, cancellationToken);
            }
            else
            {
                if (session.LogicSettings.EvolveAllPokemonAboveIv || session.LogicSettings.EvolveAllPokemonWithEnoughCandy ||
                    session.LogicSettings.UseLuckyEggsWhileEvolving || session.LogicSettings.KeepPokemonsThatCanEvolve)
                {
                    await EvolvePokemonTask.Execute(session, cancellationToken);
                }
                if (session.LogicSettings.UseEggIncubators)
                {
                    await UseIncubatorsTask.Execute(session, cancellationToken);
                }
                if (session.LogicSettings.TransferDuplicatePokemon)
                {
                    await TransferDuplicatePokemonTask.Execute(session, cancellationToken);
                }
                if (session.LogicSettings.UseLuckyEggConstantly)
                {
                    await UseLuckyEggConstantlyTask.Execute(session, cancellationToken);
                }
                if (session.LogicSettings.UseIncenseConstantly)
                {
                    await UseIncenseConstantlyTask.Execute(session, cancellationToken);
                }

                await GetPokeDexCount.Execute(session, cancellationToken);

                if (session.LogicSettings.RenamePokemon)
                {
                    await RenamePokemonTask.Execute(session, cancellationToken);
                }
                if (session.LogicSettings.AutoFavoritePokemon)
                {
                    await FavoritePokemonTask.Execute(session, cancellationToken);
                }

                await RecycleItemsTask.Execute(session, cancellationToken);

                if (session.LogicSettings.AutomaticallyLevelUpPokemon)
                {
                    await LevelUpPokemonTask.Execute(session, cancellationToken);
                }
            }

            if (session.LogicSettings.UseGpxPathing)
            {
                await FarmPokestopsGpxTask.Execute(session, cancellationToken);
            }
            else
            {
                await FarmPokestopsTask.Execute(session, cancellationToken);
            }

            return(this);
        }
Beispiel #3
0
        public async Task <IState> Execute(ISession session, CancellationToken cancellationToken)
        {
            if (session.LogicSettings.UseNearActionRandom)
            {
                await HumanRandomActionTask.Execute(session, cancellationToken);
            }
            else
            {
                if (session.LogicSettings.UseEggIncubators)
                {
                    await UseIncubatorsTask.Execute(session, cancellationToken);
                }
                if (session.LogicSettings.TransferDuplicatePokemon)
                {
                    await TransferDuplicatePokemonTask.Execute(session, cancellationToken);
                }
                if (session.LogicSettings.UseLuckyEggConstantly)
                {
                    await UseLuckyEggConstantlyTask.Execute(session, cancellationToken);
                }
                if (session.LogicSettings.UseIncenseConstantly)
                {
                    await UseIncenseConstantlyTask.Execute(session, cancellationToken);
                }

                GetPokeDexCount.Execute(session, cancellationToken);

                if (session.LogicSettings.RenamePokemon)
                {
                    await RenamePokemonTask.Execute(session, cancellationToken);
                }

                await RecycleItemsTask.Execute(session, cancellationToken);

                if (session.LogicSettings.AutomaticallyLevelUpPokemon)
                {
                    await LevelUpPokemonTask.Execute(session, cancellationToken);
                }
            }

            await SelectBuddyPokemonTask.Execute(session, cancellationToken);


            if (session.LogicSettings.UseGpxPathing)
            {
                await FarmPokestopsGpxTask.Execute(session, cancellationToken);
            }
            else
            {
                await FarmPokestopsTask.Execute(session, cancellationToken);
            }

            return(this);
        }