Originally posted by pokestallone1
Yes please tell us, There was a tutorial about this not so long ago, But I think its deleted.
for Necro bot you can add to
Inventory.cs something like:
Originally posted by another user
public async Task<IEnumerable<PokemonData>> GetUnusedEggs(int limit)
{
var myEggs = await GetEggs();
var eggs = myEggs.Where(x=> !x.EggIncubatorId.Any() && !x.DeployedFortId.Any()).ToList();
return eggs.OrderBy(x=>x.EggKmWalkedTarget).Take(limit > eggs.Count() ? eggs.Count() : limit);
}
i havn't tested, but that should get all useable egg Id's so you can deploy them ie:
Originally posted by another user
if(CurrentFort.Type == FortType.Gym)
{
//TODO: Add some other checks..
//Choose a suitable egg..
var eggs = await session.Inventory.GetUnusedEggs(3);
var eggsToDeploy = eggs.First();
// Deploy to gym
var deployResponse = await session.Client.Fort.FortDeployPokemon(CurrentFort.Id, eggsToDeploy.Id);
//TODO: Add response messages..
}
That's some basic code that mite get you started.. if the pokeball thing works, it wouldn't be to hard to try that either.....