tellomichmich / PokeNoxBot

Slow but safe Pokemon GO Bot
23 stars 19 forks source link

[Enhancement] Various Delay Modes #52

Open fairthese opened 8 years ago

fairthese commented 8 years ago

Operating in areas of dense gym population was causing the bot to click on the gyms repeatedly, wasting time and potentially flagging its activity. What I changed on my end was to add a global counter that when a gym is accidentally entered, gets set to 10. I then implemented a break on clicking on pokemon until the counter is once again 0. The counter is decremented by 1 every look around cycle. It's not a perfect solution to clicking on gyms, but it did at least usually let the bot leave the area the gym is in more quickly.

Another issue was running out of pokeballs, due to the often extremely lossy method of capturing (zubats, golbats, are among the worst offenders). Ideally it would be possible for the bot to train itself on certain ranges that work well for certain pokemon, enabling it to still miss throws, but not waste 10 or more balls on random throws to get there every time. I may try that method, though for the moment, I have done something similar as I did for gyms. When the bot encounters the condition of running out of pokeballs, I have it set another global counter where it will not engage pokemon until the counter reaches 0. During that time, it will still walk around, hatching eggs and looting pokestops, but accumulating a pokeball buffer again. While I have not implemented it yet, ideally, it would also have a list of rare pokemon it would preempt the mode for.

I am not skilled at Python, so I do not trust my code edits enough to submit them as-is. Hopefully this is informative at a number of workarounds I've personally done, to inspire some ideas.

Other things I may experiment with: Using an xposed module to smuggle more reliable data to the bot, trying to guess Pokemon species based on average color (to enable skipping undesireables) (depending on xposed module capabilities, may not be necessary), setting up a 'schedule' for the bot.

Dodo111 commented 8 years ago

I ended up getting way too much xp from pokestops and not enough stardust on my account so in order to get more of it I started experimenting. The way I'm doing it right now is by setting a rather small CheckRadius in config.json (25) and reducing the sleep time of the search function at line 1257 of PokeNoxBot.py:

time.sleep(2) #Default: 4

It's working pretty well so far for hatching eggs and farming stardust :)