var myPokemon = await session.Inventory.GetPokemons();
var pokemonssuitable = myPokemon.Where(i => !i.DeployedFortId.Any());
var pokemons = pokemonssuitable.OrderByDescending(x => x.Cp).ThenBy(n => n.StaminaMax).Take(3);
var pokemonToDeploy = pokemons.First();
[B]var deployResponse = await session.Client.Fort.FortDeployPokemon(currentFortData.Id, pokemonToDeploy.Id);[/B]//This code here deploys, the above is selecting the right pokemon.
[B]var collectResponse = await session.Client.Player.CollectDailyDefenderBonus();[/B]//This line collects the coins, below is the response.
if (collectResponse.Result == CollectDailyDefenderBonusResponse.Types.Result.Success)
{
Console.WriteLine($"Coin collect response: \n{collectResponse.ToString()}");
session.EventDispatcher.Send(new EventCollectedCoins
{
Coins = collectResponse.CurrencyAwarded.FirstOrDefault()
});
}
var pokeStops = mapObjects.Item1.MapCells.SelectMany(i => i.Forts)
.Where(
i =>
[B] i.Type == FortType.Gym[/B] || (i.Type == FortType.Checkpoint &&
i.CooldownCompleteTimestampMs < DateTime.UtcNow.ToUnixTime()) &&
( // Make sure PokeStop is within max travel distance, unless it's set to 0.
LocationUtils.CalculateDistanceInMeters(
session.Settings.DefaultLatitude, session.Settings.DefaultLongitude,
i.Latitude, i.Longitude) < session.LogicSettings.MaxTravelDistanceInMeters ||
session.LogicSettings.MaxTravelDistanceInMeters == 0)
);
return pokeStops.ToList();
//This will allow you to find gyms with necrobot..
Copyright © 2024, NextGenUpdate.
All Rights Reserved.