PokemonGo-Bot icon indicating copy to clipboard operation
PokemonGo-Bot copied to clipboard

Bot does not seek out the next pokestop.

Open JSchwerberg opened this issue 10 years ago • 9 comments

Expected Behavior

Bot would move towards closest pokestop, in an attempt to spin.

Actual Behavior

Bot seems to just sit still, not doing anything.

[15:03:32] PokemonGO Bot v1.0 [15:03:32] No config argument specified, checking for /configs/config.json [15:03:32] Configuration initialized [15:03:32] [15:03:32] Location Found: Sunset Park, Las Vegas, NV [15:03:32] GeoPosition: (36.065649, -115.111595, 0) [15:03:32] [15:03:32] [x] Parsing cached location... [15:03:32] [15:03:32] [x] Last location flag used. Overriding passed in location [15:03:32] [x] Last in-game location was set as: (36.06480700621842, -115.1119281070248, 0) [15:03:32] [15:03:32] Attempting login to Pokemon Go. [15:03:33] Login to Pokemon Go successful. [15:03:34] [15:03:34] --- Junaos --- [15:03:34] Level: 21 (Next Level: 23325 XP) (Total: 311675 XP) [15:03:34] Pokemon Captured: 1246 | Pokestops Visited: 1252 [15:03:34] Pokemon Bag: 96/250 [15:03:34] Items: 351/350 [15:03:34] Stardust: 164517 | Pokecoins: 0 [15:03:34] PokeBalls: 44 | GreatBalls: 49 | UltraBalls: 50 [15:03:34] RazzBerries: 100 | BlukBerries: 0 | NanabBerries: 0 [15:03:34] LuckyEgg: 3 | Incubator: 5 | TroyDisk: 5 [15:03:34] Potion: 10 | SuperPotion: 25 | HyperPotion: 25 [15:03:34] Incense: 8 | IncenseSpicy: 0 | IncenseCool: 0 [15:03:34] Revive: 25 | MaxRevive: 0 [15:03:34] [15:03:34] [15:03:36] Starting PokemonGo Bot.... [15:03:37] [x] Next egg incubates in 0.38 km [15:03:37] Using lucky egg ... you have 3

Steps to Reproduce

Full config here: https://gist.github.com/JSchwerberg/a6420aebc5596d56b79c0dd3d641434d

Other Information

OS: Ubuntu 14.04.4 LTS Git Commit: cc3e9545d65fe764602ebb73f557cd797038b374

JSchwerberg avatar Jul 31 '16 19:07 JSchwerberg

also make sure to disable use of lucky egg and set walking speed to 15

I have the same problem, for now I just keep the task FollowSpiral in.

sgitkene avatar Jul 31 '16 19:07 sgitkene

@sgitkene With "FollowSpiral" in, it just walks away from the next pokestop as in #2107 and #2089. The fix that was listed in #2089 was to remove FollowSpiral. Is there a different option? :-1:

JSchwerberg avatar Jul 31 '16 19:07 JSchwerberg

@JSchwerberg I am trying to find last commit that worked without the spiral, no luck as of now :/

sgitkene avatar Jul 31 '16 19:07 sgitkene

HA! I just noticed what might be the problem... my item bag is full.

JSchwerberg avatar Jul 31 '16 19:07 JSchwerberg

#2058 this far there is already a problem...

Huh Imma check my bag as well. That would make sense.

sgitkene avatar Jul 31 '16 19:07 sgitkene

The problem here is that you have full inventory.

[15:03:34] Items: 351/350

You can fix changing those lines:

pokemongo_bot/cell_workers/move_to_fort.py:

     def work(self):
-        if not self.should_run():
-            return WorkerResult.SUCCESS
+        # if not self.should_run():
+            # return WorkerResult.SUCCESS

pokemongo_bot/cell_workers/spin_fort.py:

 class SpinFort(BaseTask):
     def should_run(self):
-        return self.bot.has_space_for_loot()
+        return True #self.bot.has_space_for_loot()

     def work(self):
         fort = self.get_fort_in_range()
@@ -93,6 +93,7 @@ class SpinFort(BaseTask):
                                     seconds_since_epoch)))
             elif spin_result == 4:
                 logger.log("Inventory is full", 'red')
+                self.bot.fort_timeouts[fort["id"]] = (time.time() + 300) * 1000  # Don't spin for 5m
             else:
                 logger.log("Unknown spin result: " + str(spin_result), 'red')

This way, you can force the bot to spin every time.

matheussampaio avatar Jul 31 '16 19:07 matheussampaio

yep, bag was full. thx @matheussampaio for the fix.

sgitkene avatar Jul 31 '16 19:07 sgitkene

Thanks @matheussampaio but I'm not sure why the default setting is to not do anything if inventory is full. You still get xp for spinning even if you don't get anything.

fil676 avatar Aug 01 '16 04:08 fil676

@fil676 Me neither.

matheussampaio avatar Aug 01 '16 05:08 matheussampaio