PokemonGoBot icon indicating copy to clipboard operation
PokemonGoBot copied to clipboard

Use highest inventory ball each time.

Open wartickler opened this issue 10 years ago • 7 comments

I would like to always use the highest ball type when I catch so that I can be sure to capture each pokemon. If I have the mega-power-ball use that one else use the next-not-so-mega-power-ball, etc.

wartickler avatar Jul 22 '16 14:07 wartickler

There are some algoritms scaling the Pokeball usage based on Pokemon CP. Maybe we'll be getting something like that soon.

leontada avatar Jul 22 '16 14:07 leontada

I think that would require a massive amount of research and code implementation. You would have to define each pokemon and determine when each one crosses the threshold into needing another ball type. Do you agree? Would my approach be simpler to code?

wartickler avatar Jul 22 '16 14:07 wartickler

@wartickler A simpler method would be choosing a ball based on the CP of pokemon. so if its over 300 then the bot uses a master ball and if its over 500 use ultra etc.

leadboots5 avatar Jul 22 '16 20:07 leadboots5

I've got a pull request where you can set the default (as per the current one), and have the ability to override what pokeball you'd use to for specific types of pokemon.

Also, if you don't have the preferred pokeball at the time (say you saw mew and you set it up to use master ball, and you don't have a master ball in your inventory), it'll try use the next strongest ball.

Have a look and see if that would help.

https://github.com/jabbink/PokemonGoBot/pull/106

mmastika avatar Jul 23 '16 06:07 mmastika

👍 Sigh. I think at minimum a system to use best ball + rasberry for ignored_pokemon or for those over 1000 CP. The flee ratio seems high for those :(

23 Jul 18:20:39: Found pokemon DRAGONITE 23 Jul 18:20:39: Encountered pokemon DRAGONITE with CP 1522 23 Jul 18:20:39: Capture of DRAGONITE failed with status : CATCH_FLEE

cleftfairy avatar Jul 24 '16 01:07 cleftfairy

Trying to get this to work in CatchOneNearbyPokemon.kt, but don't understand the syntax for setting usedPokeball to MASTER_BALL, i've tried lots of variations but not familiar enough with java. Thanks!

                val preferred_ball = settings.preferredBall
                // seeing if we can default to MASTER_BALL if pokemon is set to ignore transfer
                // later upgrade this to do so if CP > 900 ? 
                // then add these as options to settings
                val ignoredPokemon = settings.ignoredPokemon
                if (!ignoredPokemon.contains(catchablePokemon.pokemonId.name)) {
                    val usedPokeball = settings.pokeballItems.MASTER_BALL
                } 
                var item = ctx.api.inventories.itemBag.getItem(preferred_ball)

cleftfairy avatar Jul 24 '16 04:07 cleftfairy

Old issue, forgot to close. Bot uses a "sophisticated" catch algorithm for a week already.

jabbink avatar Aug 01 '16 09:08 jabbink