Comments (10)
Started working on evolutionary transfers.
Keeps just as many as you need to evolve.
class Release : Task {
override fun run(context: Context?) {
val groupedPokemon = context!!.api.pokebank.pokemons.groupBy { it.pokemonId }
groupedPokemon.forEach {
val sorted = it.value.sortedByDescending { it.cp }
for ((index, pokemon) in sorted.withIndex()) {
when (pokemon.pokemonId.name) {
"RATTATA" -> if (index > pokemon.candy / 25) {
println("Going to transfer ${pokemon.pokemonId.name} with CP ${pokemon.cp} because you currently have ${pokemon.getCandy() / 25} evolutions pending")
pokemon.transferPokemon()
}
"PIDGEY" -> if (index > pokemon.candy / 12) {
println("Going to transfer ${pokemon.pokemonId.name} with CP ${pokemon.cp} because you currently have ${pokemon.getCandy() / 12} evolutions pending")
pokemon.transferPokemon()
}
"WEEDLE" -> if (index > pokemon.candy / 12) {
println("Going to transfer ${pokemon.pokemonId.name} with CP ${pokemon.cp} because you currently have ${pokemon.getCandy() / 12} evolutions pending")
pokemon.transferPokemon()
}
"CATERPIE" -> if (index > pokemon.candy / 12) {
println("Going to transfer ${pokemon.pokemonId.name} with CP ${pokemon.cp} because you currently have ${pokemon.getCandy() / 12} evolutions pending")
pokemon.transferPokemon()
}
else -> {
if (index > 0 && pokemon.cp < 50) {
println("Going to transfer ${pokemon.pokemonId.name} with CP ${pokemon.cp}")
pokemon.transferPokemon()
}
}
}
}
}
}
}
from pokemongobot.
Hi mroge009, could you please tell me where do I add your code? I'm a bit noob on code aswell so your help would be grateful. Thanks
from pokemongobot.
@bluebabyf1
Replace the code in your releasepokemon.kt with this if you want to use the same functionality.
It keeps Rattatas, pidgey, caterpies, and weedles but you can add others.
groupedPokemon.forEach {
val sorted = it.value.sortedByDescending { it.cp }
for ((index, pokemon) in sorted.withIndex()) {
var IV = ((pokemon.individualStamina + pokemon.individualAttack + pokemon.individualDefense) * 100) / 45
// never transfer highest rated Pokemon
// never transfer > maxCP, unless set in obligatoryTransfer
// stop releasing when pokemon is set in ignoredPokemon
when (pokemon.pokemonId.name) {
"RATTATA" -> if (index > pokemon.candy / 25) {
println("Going to transfer ${pokemon.pokemonId.name} with CP ${pokemon.cp} because you currently have ${pokemon.getCandy() / 25} evolutions pending")
pokemon.transferPokemon()
}
"PIDGEY", "WEEDLE", "CATERPIE" -> if (index > pokemon.candy / 12) {
println("Going to transfer ${pokemon.pokemonId.name} with CP ${pokemon.cp} because you currently have ${pokemon.getCandy() / 12} evolutions pending")
pokemon.transferPokemon()
}
else -> {
if (index > 0 && (pokemon.cp < maxCP || obligatoryTransfer.contains(pokemon.pokemonId.name)) &&
(!ignoredPokemon.contains(pokemon.pokemonId.name)) && IV < 80) {
println("Going to transfer ${pokemon.pokemonId.name} with CP ${pokemon.cp} and IV ${IV}")
pokemon.transferPokemon()
}
}
}
}
}
In terms of an IDE I am using InteliJ IDEA and just pulled from the GIT repo
from pokemongobot.
I think now is a good time to implement this, because the bot is kind of good now, and you get to level 20 easily. But from that onwards, progress is rather slow.
So a mode to fram 12 candy evolution pkmn & mass evolving in combination with a lucky egg would be really nice.
from pokemongobot.
I wrote an "auto evolve" feature in PR #163
from pokemongobot.
I might suggest the following parameters for "evolve_mode" if you would..
- On connection, loop through inventory to determine possible / current evolutions.
- Establish current_evolutions via:
-
(((pokemon_candy / required_candy) + pokemon_candy) / required_candy) / pokemon_type_quantity
- possible_evolutions are for each pokemon that has an excess of candy over quantity of pokemon.
- Provide configuration for the following:
- require_luckyEgg : Only evolve if lucky egg is active.
- required_evolutions : Evolutions needed to begin evolving if require_luckyEgg is active.
- This number should not exceed 60 to represent non-bot capabilities (avoid ban).
- pokemon_to_evolve : Only these pokemon will be evolved.
- build_pokedex : Evolve to higher tiers to add new pokedex registries as needed.
- Evolved Pokemon should follow prior configuration requirements for IV/CP.
from pokemongobot.
Mixed with the evolution multipliers could calculate if it is at best moment to evolve no?
Any progress on this yet?
I'd help but I'm not good enough with java 😢
from pokemongobot.
Well, @miguel, you can help by giving the formula for the computation and
explain the criteria. Someone will then use this to implement the
fonctionality...
2016-08-11 22:34 GMT+02:00 Miguel [email protected]:
Mixed with the evolution multipliers could calculate if it is at best
moment to evolve no?
Any progress on this yet?
I'd help but I'm not good enough with java 😢—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#5 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACFENxkZIavRT64Ekns1HeHl8TTKDwZLks5qe4dwgaJpZM4JQzeC
.
from pokemongobot.
We would need an array then that contains floats with the multiplication value
it would be an expected value, the actual could be higher or lower but still
Then we have a table that contains the max cp of a certain pokemon at your level
If pokemons CP is at least 75% of its maximum possible (so if say Pikachu could have 1000 CP minimum CP to evolve will be 750) this can be set by user though
We then calculate what its expected CP will be from that array using the pokemons ID as an index in both tables, if that CP is higher than amount set up by user for auto transfer, and all limits existing like max amount etc... proceed to evolve if its IV was a desirable one
Also in the table having final evolutions with a value of 0 (not NULL) so that even if there is a bug trying to evolve them it wont since 0 CP is always unwanted
from pokemongobot.
I only mention IV at the end because people might want to evolve pokemon even if they have low IV so IV check here will be in theory unrelated to unwanted IV check from captures for auto transfer
Another extra implement might be actually checking in the pokedex if they have the pokemon or not also so as to give it a certain priority
from pokemongobot.
Related Issues (20)
- Encounter failed with result HOT 3
- run a few hours then get this error message then after that not catch any pokemon HOT 1
- System hangs up HOT 4
- error message popup then the whole night hang there HOT 1
- bot not starting "Exception in Thread default" HOT 1
- [Question] Is it safe to open the bot after the latest update? HOT 9
- Im guessing this bot is dead HOT 2
- [Question] Pokefarmer Hash Service HOT 1
- Bot doing fine, getting this error everytime HOT 4
- Exception in thread "default" HOT 3
- Getting profile data from pogo server..Unexpected response envelope status received: SESSION_INVALIDATED HOT 1
- I cannot find the solution anywhere. Please help HOT 1
- Bot gets stuck in a loop of DOWNLOAD_SETTINGS & GET_INVENTORY HOT 1
- [BUG?] Bot can't get player HOT 1
- ..
- Can't start bot, I think it's a language problem
- Can't start the bot, I think it's a language problem HOT 1
- Can't start the bot
- when getting profile data from pogo server HOT 4
- Stuck on getting profile data
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pokemongobot.