Skip to content

Conversation

Jasperrr91
Copy link
Contributor

Short Description:
At the moment, you need to specify how many PokeBalls, GreatBalls, UltraBalls and MasterBalls you want to keep. Preferably you only want MasterBalls, but if you set Pokeballs to 0; you'll need to spin tons of pokestops before finally getting MasterBalls to catch a pokemon.

A better system would be to just set the total amount of Balls you want. This script allows you to do that. Simply update your config to:
{ "type": "RecycleItems", "config": { "item_filter": { "101": { "keep" : 0 }, "102": { "keep" : 0 }, "103": { "keep" : 25 }, "104": { "keep" : 25 }, "201": { "keep" : 25 }, "701": { "keep" : 50 } }, "balls": 200 }

Then when you have 10 normal PokeBalls and 190 GreatBalls and a pokestop gives you 3 GreatBalls; the bot will discard 3 normal Pokeballs.

So to summarize: this PR makes sure you'll have the best PokeBalls available.

Todo:

  • Update config examples

@douglascamata
Copy link
Member

@Jasperrr91 this needs to come with better pokeball choice logics, otherwise ppl will just get a full inventory and never use better balls.

@Jasperrr91
Copy link
Contributor Author

@douglascamata true, it's not giving you the full benefit because any normal pokeballs will be used first. But it's giving you a small benefit nonetheless. So I think it's best to open a new PR to maximise the benefits of this hack.

@ghost
Copy link

ghost commented Aug 2, 2016

Could we make it so the Order of the items in RecycleItems config item_filter would determine which items to keep (prioritizing).

Mine would look like this

      "type": "RecycleItems",
            "config": {
              "item_filter": {
                  "Ultraball":        { "keep" : 300 },
                  "Razz Berry":     { "keep" : 100 }, 
                  "Max Revive":    { "keep" : 15 },
                  "Max Potion":    { "keep" : 15 },
                  "Greatball":        { "keep" : 200 },
                  "Hyper Potion":   { "keep" : 75 },
                  "Super Potion":   { "keep" : 0 },
                  "Revive":             { "keep" : 15 },
                  "Potion":             { "keep" : 0 }, 
                  "Pokeball":          { "keep" : 75 }
              }
            }
    },

So with a limit of 450 items I would have 300 Ultra Balls, 100 Berries, and 50 Great Balls (I'm only lvl 23).

@douglascamata
Copy link
Member

@Kassius509: dicts have no order.

@Jasperrr91
Copy link
Contributor Author

@Kassius509 the script compares each item's inventory count to their respective filter setting.

@adrianoresende
Copy link

@bstpierr @douglascamata please aprove this feature ;)

@k4n30
Copy link
Contributor

k4n30 commented Aug 14, 2016

@Jasperrr91 this merge is severly outdated. How do you want to proceed?

@BriceSD
Copy link
Member

BriceSD commented Aug 15, 2016

Merged #4005. We have this feature now.

@BriceSD BriceSD closed this Aug 15, 2016
hoanghuynh pushed a commit to hoanghuynh/PokemonGo-Bot that referenced this pull request Sep 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants