[Suggestion] Pokeball Farm if no pokeball.
if pokeballs = 0:
farm pokestops until pokeballs >= [some number] then continue hunting
I've come in to go through and remove all massive JSON dumps - this is still a WIP and no where near ready.
I'm slowly going through and doing what I can. More than welcome to help out! I can merge updates in if you have done anything :)
Add Pokemon Names code to Pull. Edit this to "[Suggestion] Pokeball Farm if no pokeball."
@necrozis just merged the pokemon name pulling.
Currently working on company website. Will come back to pokemon shortly.
@eggins, this code store how many balls of each type in your inventory.
api.get_player().get_inventory()
inventory_req = api.call()
inventory_dict = inventory_req['responses']['GET_INVENTORY']['inventory_delta']['inventory_items']
pokeBalls = {1:0,2:0,3:0}
#print('Response dictionary: \n\r{}'.format(json.dumps(response_dict['responses']['GET_INVENTORY']['inventory_delta'])))
for item in inventory_dict:
try:
if item['inventory_item_data']['item']['item'] == 1:
#print('Poke Ball count: ' + str(item['inventory_item_data']['item']['count']))
pokeBalls[1] = item['inventory_item_data']['item']['count']
if item['inventory_item_data']['item']['item'] == 2:
#print('Great Ball count: ' + str(item['inventory_item_data']['item']['count']))
pokeBalls[2] = item['inventory_item_data']['item']['count']
if item['inventory_item_data']['item']['item'] == 3:
#print('Ultra Ball count: ' + str(item['inventory_item_data']['item']['count']))
pokeBalls[3] = item['inventory_item_data']['item']['count']
except:
continue
print(pokeBalls)
There will be the need to discard potions/revives/berries as well as the inventory might fill with these.