Skip to content
This repository was archived by the owner on Jul 22, 2019. It is now read-only.

Added optional delays between transfer/evolve/drop and bot stop after reaching settable limits#1095

Merged
Sieberkev merged 31 commits into
jabbink:developfrom
alexlautenschlager:develop
Aug 24, 2016
Merged

Added optional delays between transfer/evolve/drop and bot stop after reaching settable limits#1095
Sieberkev merged 31 commits into
jabbink:developfrom
alexlautenschlager:develop

Conversation

@alexlautenschlager

@alexlautenschlager alexlautenschlager commented Aug 15, 2016

Copy link
Copy Markdown
Contributor

Issue #1047
#1078
#1064

Changes made:
Added optional delays between transfer/evolve/drop and optional bot timeouts, which now successfully terminate the application
Added option to never catch certain pokemon

@pashorizer

Copy link
Copy Markdown
Contributor

Should group the delay options into one single variable.

@alexlautenschlager

Copy link
Copy Markdown
Contributor Author

i thought about that @pashorizer , but evolution should f.e. take longer than transfer or dropping

@potpot59

Copy link
Copy Markdown
Contributor

👍

Comment thread config.properties.template Outdated
# Should the bot auto transfer duplicate pokemon
autotransfer=true

# Should the bot wait between each transfer and how long? -1 to disable, time to wait in MILIseconds (it will be randomized alittle around the given value)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

milliseconds

@alexlautenschlager

Copy link
Copy Markdown
Contributor Author

@jabbink thanks for checking, I have fixed those errors :)

fun addApplication (configurableApplicationContext: ConfigurableApplicationContext){
applicationList.add(configurableApplicationContext)
}
fun stopAllAplications (){

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applications

@alexlautenschlager

alexlautenschlager commented Aug 16, 2016

Copy link
Copy Markdown
Contributor Author

@muschter thanks, and as you see i took some ideas (with the ctx) from you.. I hope you dont mind. if this and your PR get merged, I can rework them to both depend on the same settings. F.e. adding a wait_time option, having -1 for ignoring, 0 for terminating, and any other value for waiting this amount of time

@meekzyr

meekzyr commented Aug 16, 2016

Copy link
Copy Markdown
Contributor

@AlexBoulyga I don't mind that at all, good work!

@FrancYescO

Copy link
Copy Markdown
Contributor

you committed altitude_cache.json file xD

@potpot59

Copy link
Copy Markdown
Contributor

Fail

Le dim. 21 août 2016 18:02, FrancYescO notifications@github.com a écrit :

you committed altitude_cache.json file xD


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#1095 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AK-b5im7iMeaMr8O_iJsOaR1AnHk4Vf5ks5qiHaGgaJpZM4JkfVt
.

Log.yellow("Evolving ${it.pokemonId.name} CP ${it.cp} IV ${it.getIvPercentage()}%")
val evolveResult = it.evolve()
Thread.sleep(300)
if( settings.evolveTimeDelay > 300){

@FrancYescO FrancYescO Aug 21, 2016

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm, this if is pretty useless if we already have 300 as default

also the Thread.sleep(300) few line down i think its useless if waittime is configurable

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no it is not. If someone specifies 0 as the evolve_time_delay, there will be no evolve time delay, which will mess with the stack evolution

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure? or it will evolve just too fast

@alexlautenschlager alexlautenschlager Aug 21, 2016

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was a bug issue, and someone fixed it with this time delay. The error was, when stack evolution was reached, there was a null exception. If you dont believe me, just look where the old line (Thread.sleep(300)) came from, and the issue will probably be linked to the PR

@alexlautenschlager

Copy link
Copy Markdown
Contributor Author

@FrancYescO because someone didnt add the altitude_cache.json to the .gitignore ;)

if (pokemon.isNotEmpty()) {
val catchablePokemon = pokemon.first()
if (settings.obligatoryTransfer.contains(catchablePokemon.pokemonId) && settings.desiredCatchProbabilityUnwanted == -1.0) {
if (settings.obligatoryTransfer.contains(catchablePokemon.pokemonId) && settings.desiredCatchProbabilityUnwanted == -1.0 || settings.neverCatchPokemon.contains(catchablePokemon.pokemonId)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

obligatory transfer also mean not catch?

@alexlautenschlager alexlautenschlager Aug 21, 2016

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those settings are not mine, however there is && between "obligatory transfer" and "desiredcatchprobability unwanted". This is from someone else and means, if the catchprobability of a pokemon is -1.0 dont catch it, and the desired_catch_probability_unwanted is meant for pokemon in the obligatory transfer list.
Thats why he uses both statements and &&

@alexlautenschlager

Copy link
Copy Markdown
Contributor Author

@FrancYescO @Sieberkev as you suggested, the bot now simply calls the stop function of the Bot.kt, not closing the application. However I have not removed the abortion code, as I thought that might come in handy (f.e. closing the application through the GUI) later on.

@alexlautenschlager

Copy link
Copy Markdown
Contributor Author

Im closing this AS everything I had in mind is done

@Sieberkev

Sieberkev commented Aug 24, 2016

Copy link
Copy Markdown
Collaborator

Thanks a lot for you contribution, I'm very excited to use these extra delays ^_^

@alexlautenschlager

Copy link
Copy Markdown
Contributor Author

@Sieberkev I have been using Them and still 2/3 bots got banned. However maybe because of other reasons. Anyways if they add captcha i believe this project is over

@Sieberkev

Copy link
Copy Markdown
Collaborator

The new API that jabbink is working on solves another set of problems (ex bundling requests instead of spamming them one by one) which makes it quite obvious this is a bot at this moment. But with your delays that makes it even more humanlike :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants