Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] Pokeball Farm if no pokeball. #12

Closed
necrozis opened this issue Jul 21, 2016 · 5 comments
Closed

[Suggestion] Pokeball Farm if no pokeball. #12

necrozis opened this issue Jul 21, 2016 · 5 comments

Comments

@necrozis
Copy link
Contributor

necrozis commented Jul 21, 2016

    if pokeballs = 0:
        farm pokestops until pokeballs >= [some number] then continue hunting
@eggins
Copy link
Contributor

eggins commented Jul 21, 2016

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 :)

@necrozis
Copy link
Contributor Author

Add Pokemon Names code to Pull.
Edit this to "[Suggestion] Pokeball Farm if no pokeball."

@necrozis necrozis changed the title [Suggestion] Printed Data [Suggestion] Pokeball Farm if no pokeball. Jul 21, 2016
@eggins
Copy link
Contributor

eggins commented Jul 21, 2016

@necrozis just merged the pokemon name pulling.

Currently working on company website. Will come back to pokemon shortly.

@necrozis
Copy link
Contributor Author

necrozis commented Jul 21, 2016

@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)

@CharlesVu
Copy link

There will be the need to discard potions/revives/berries as well as the inventory might fill with these.

solderzzc pushed a commit that referenced this issue Sep 2, 2016
hoanghuynh pushed a commit to hoanghuynh/PokemonGo-Bot that referenced this issue Sep 28, 2016
* Add windows 64 bit encryption dll

* Use platform.architecture
Jcolomar pushed a commit that referenced this issue Jul 19, 2017
nbq pushed a commit that referenced this issue Oct 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants