PokemonGoF / PokemonGo-Bot

The Pokemon Go Bot, baking with community.
MIT License
3.87k stars 1.54k forks source link

MoveToMapPokemon: Moving towards but not capturing it #3605

Closed pietjuh closed 8 years ago

pietjuh commented 8 years ago

Expected Behavior

Capturing a pokemon after the message "Encountered pokemon" appears.

Actual Behavior

Walking towards the next pokemon:

[13:57:29] Moving towards Slowpoke, 0.01km, left (6 minutes, 30 seconds) [13:57:29] Encountered Pokemon: Slowpoke [13:57:30] Skipping Recycling of Items. 51 space left in bag. [13:57:30] Moving towards Poliwag, 0.67km, left (9 minutes, 21 seconds)

Your config.json (remove your credentials and any other private info)

{
  "tasks": [
    {
      "type": "UpdateTitleStats",
      "config": {
        "min_interval": 1,
        "stats": [
          "login",
          "uptime",
          "km_walked",
          "level_stats",
          "xp_earned",
          "xp_per_hour"
        ],
        "terminal_log": true,
        "terminal_title": false
      }
    },
    {
      "type": "HandleSoftBan"
    },
    {
      "type": "CollectLevelUpReward"
    },
    {
      "type": "IncubateEggs",
      "config": {
        "longer_eggs_first": true
      }
    },
    {
      "type": "TransferPokemon"
    },
    {
      "type": "EvolvePokemon",
      "config": {
        "evolve_all": "none",
        "first_evolve_by": "cp",
        "evolve_above_cp": 500,
        "evolve_above_iv": 0.8,
        "logic": "or",
        "evolve_speed": 20,
        "use_lucky_egg": false
      }
    },
    {
      "type": "RecycleItems",
      "config": {
        "min_empty_space": 15,
        "item_filter": {
          "Pokeball": {
            "keep": 100
          },
          "Potion": {
            "keep": 10
          },
          "Super Potion": {
            "keep": 20
          },
          "Hyper Potion": {
            "keep": 30
          },
          "Revive": {
            "keep": 30
          },
          "Razz Berry": {
            "keep": 100
          }
        }
      }
    },
    {
      "type": "CatchVisiblePokemon"
    },
    {
      "type": "CatchLuredPokemon"
    },
    {
      "type": "SpinFort"
    },
    {
      "type": "MoveToMapPokemon",
      "config": {
        "address": "http://localhost:8001",
        "max_distance": 500,
        "min_time": 60,
        "min_ball": 50,
        "prioritize_vips": true,
        "snipe": true,
        "snipe_high_prio_only": true,
        "snipe_high_prio_threshold": 600,
        "update_map": true,
        "mode": "priority",
        "map_path": "raw_data",
        "catch": {
          "==========Legendaries==========": 0,
          "Aerodactyl": 1000,
          "Snorlax": 1000,
          "Articuno": 1000,
          "Zapdos": 1000,
          "Moltres": 1000,
          "Dratini": 1000,
          "Dragonair": 1000,
          "Dragonite": 1000,
          "Mewtwo": 1000,
          "Mew": 1000,
          "==========Region Locked==========": 0,
          "Farfetch'd": 1000,
          "Kangaskhan": 1000,
          "Mr. Mime": 1000,
          "Tauros": 1000,
          "==========Very Rare==========": 0,
          "Lapras": 900,
          "Electabuzz": 900,
          "Magmar": 900,
          "Ditto": 900,
          "==========Starters==========": 0,
          "Bulbasaur": 400,
          "Ivysaur": 600,
          "Venusaur": 1000,
          "Charmander": 400,
          "Charmeleon": 600,
          "Charizard": 1000,
          "Squirtle": 400,
          "Wartortle": 600,
          "Blastoise": 1000,
          "Pikachu": 600,
          "Raichu": 1000,
          "==========Semi Rare==========": 0,
          "Porygon": 200,
          "Scyther": 200,
          "Jynx": 200,
          "==========Uncommon==========": 0,
          "Omanyte": 150,
          "Omastar": 500,
          "Seel": 300,
          "Dewgong": 500,
          "Grimer": 200,
          "Muk": 500,
          "Shellder": 200,
          "Cloyster": 500,
          "Gastly": 200,
          "Haunter": 500,
          "Gengar": 1000,
          "Onix": 600,
          "Drowzee": 600,
          "Hypno": 600,
          "Vulpix": 200,
          "Ninetales": 600,
          "Paras": 100,
          "Parasect": 500,
          "Growlithe": 200,
          "Arcanine": 700,
          "Tentacool": 200,
          "Tentacruel": 500,
          "Mankey": 150,
          "Primeape": 500,
          "Clefairy": 150,
          "Clefable": 500,
          "Jigglypuff": 150,
          "Wigglytuff": 500,
          "Venonat": 100,
          "Venomoth": 500,
          "Diglett": 200,
          "Dugtrio": 500,
          "Meowth": 250,
          "Persian": 500,
          "Psyduck": 150,
          "Golduck": 500,
          "Geodude": 100,
          "Graveler": 500,
          "Golem": 800,
          "Eevee": 200,
          "Vaporeon": 800,
          "Jolteon": 800,
          "Flareon": 800,
          "Kabuto": 150,
          "Kabutops": 500,
          "Magikarp": 150,
          "Gyarados": 800,
          "Pinsir": 150,
          "Ponyta": 200,
          "Rapidash": 500,
          "Slowpoke": 200,
          "Slowbro": 500,
          "Magnemite": 250,
          "Magneton": 500,
          "Krabby": 100,
          "Kingler": 500,
          "Voltorb": 200,
          "Electrode": 500,
          "Exeggcute": 250,
          "Exeggcutor": 500,
          "Cubone": 300,
          "Marowak": 800,
          "Hitmonlee": 400,
          "Hitmonchan": 400,
          "Lickitung": 500,
          "Koffing": 200,
          "Weezing": 500,
          "Rhyhorn": 200,
          "Rhydon": 500,
          "Chansey": 800,
          "Tangela": 300,
          "Horsea": 200,
          "Seadra": 600,
          "Goldeen": 150,
          "Seaking": 500,
          "Staryu": 200,
          "Starmie": 800,
          "==========T1 Evolvers==========": 0,
          "Caterpie": 10,
          "Metapod": 10,
          "Butterfree": 500,
          "Weedle": 10,
          "Kakuna": 10,
          "Beedrill": 500,
          "Pidgey": 10,
          "Pidgeotto": 10,
          "Pidgeot": 300,
          "==========T2 Evolvers==========": 0,
          "Nidoran F": 10,
          "Nidorina": 10,
          "Nidoqueen": 10,
          "Nidoran M": 10,
          "Nidorino": 10,
          "Nidoking": 10,
          "Oddish": 100,
          "Gloom": 200,
          "Vileplume": 600,
          "Poliwag": 200,
          "Poliwhirl": 400,
          "Poliwrath": 800,
          "Abra": 300,
          "Kadabra": 600,
          "Alakazam": 800,
          "Machop": 150,
          "Machoke": 400,
          "Machamp": 800,
          "Bellsprout": 100,
          "Weepinbell": 400,
          "Victreebel": 800,
          "==========Trash==========": 0,
          "Rattata": 10,
          "Raticate": 10,
          "Spearow": 10,
          "Fearow": 10,
          "Ekans": 10,
          "Arbok": 10,
          "Sandshrew": 10,
          "Sandslash": 10,
          "Zubat": 10,
          "Golbat": 10,
          "Doduo": 10,
          "Dodrio": 10
        }
      }
    }
  ],
  "map_object_cache_time": 5,
  "forts": {
    "avoid_circles": true,
    "max_circle_size": 50
  },
  "websocket_server": false,
  "walk": 4,
  "action_wait_min": 1,
  "action_wait_max": 4,
  "debug": false,
  "test": false,
  "health_record": true,
  "location_cache": true,
  "distance_unit": "km",
  "reconnecting_timeout": 15,
  "evolve_captured": "NONE",
  "catch_randomize_reticle_factor": 1,
  "catch_randomize_spin_factor": 1,
  "logging_color": true,
  "catch": {
    "any": {
      "catch_above_cp": 0,
      "catch_above_iv": 0,
      "logic": "or"
    },
    "// Pokemons with example": {
      "always_catch": true
    },
    "// Gets filtered with release parameters": {},
    "// Legendary pokemons (Goes under S-Tier)": {},
    "Lapras": {
      "always_catch": true
    },
    "Moltres": {
      "always_catch": true
    },
    "Zapdos": {
      "always_catch": true
    },
    "Articuno": {
      "always_catch": true
    },
    "// S-Tier pokemons (if pokemon can be evolved into tier, list the representative)": {},
    "Mewtwo": {
      "always_catch": true
    },
    "Dragonite": {
      "always_catch": true
    },
    "Snorlax": {
      "always_catch": true
    },
    "// Mew evolves to Mewtwo": {},
    "Mew": {
      "always_catch": true
    },
    "Arcanine": {
      "always_catch": true
    },
    "Vaporeon": {
      "always_catch": true
    },
    "Gyarados": {
      "always_catch": true
    },
    "Exeggutor": {
      "always_catch": true
    },
    "Muk": {
      "always_catch": true
    },
    "Weezing": {
      "always_catch": true
    },
    "Flareon": {
      "always_catch": true
    },
    "// Growlithe evolves to Arcanine": {},
    "Growlithe": {
      "always_catch": true
    },
    "// Dragonair evolves to Dragonite": {},
    "Dragonair": {
      "always_catch": true
    },
    "// Grimer evolves to Muk": {},
    "Grimer": {
      "always_catch": true
    },
    "// Magikarp evolves to Gyarados": {},
    "Magikarp": {
      "always_catch": true
    },
    "// Exeggcute evolves to Exeggutor": {},
    "Exeggcute": {
      "always_catch": true
    },
    "// Eevee evolves to many versions, like Vaporeon, Flareon": {},
    "Eevee": {
      "always_catch": true
    },
    "// A-Tier pokemons": {},
    "Slowbro": {
      "always_catch": true
    },
    "Victreebel": {
      "always_catch": true
    },
    "Machamp": {
      "always_catch": true
    },
    "Poliwrath": {
      "always_catch": true
    },
    "Clefable": {
      "always_catch": true
    },
    "Nidoking": {
      "always_catch": true
    },
    "Venusaur": {
      "always_catch": true
    },
    "Charizard": {
      "always_catch": true
    },
    "Golduck": {
      "always_catch": true
    },
    "Nidoqueen": {
      "always_catch": true
    },
    "Vileplume": {
      "always_catch": true
    },
    "Blastoise": {
      "always_catch": true
    },
    "Omastar": {
      "always_catch": true
    },
    "Aerodactyl": {
      "always_catch": true
    },
    "Golem": {
      "always_catch": true
    },
    "Wigglytuff": {
      "always_catch": true
    },
    "Dewgong": {
      "always_catch": true
    },
    "Ninetales": {
      "always_catch": true
    },
    "Magmar": {
      "always_catch": true
    },
    "Kabutops": {
      "always_catch": true
    },
    "Electabuzz": {
      "always_catch": true
    },
    "Starmie": {
      "always_catch": true
    },
    "Jolteon": {
      "always_catch": true
    },
    "Rapidash": {
      "always_catch": true
    },
    "Pinsir": {
      "always_catch": true
    },
    "Scyther": {
      "always_catch": true
    },
    "Tentacruel": {
      "always_catch": true
    },
    "Gengar": {
      "always_catch": true
    },
    "Hypno": {
      "always_catch": true
    },
    "Pidgeot": {
      "always_catch": true
    },
    "Rhydon": {
      "always_catch": true
    },
    "Seaking": {
      "always_catch": true
    },
    "Kangaskhan": {
      "always_catch": true
    }
  },
  "release": {
    "any": {
      "keep_best_cp": 5
    }
  },
  "vips": {
    "Any pokemon put here directly force to use Berry & Best Ball to capture, to secure the capture rate!": {},
    "any": {
      "catch_above_cp": 1200,
      "catch_above_iv": 0.9,
      "logic": "or"
    },
    "Lapras": {},
    "Moltres": {},
    "Zapdos": {},
    "Articuno": {},
    "// S-Tier pokemons (if pokemon can be evolved into tier, list the representative)": {},
    "Mewtwo": {},
    "Dragonite": {},
    "Snorlax": {},
    "// Mew evolves to Mewtwo": {},
    "Mew": {},
    "Arcanine": {},
    "Vaporeon": {},
    "Gyarados": {},
    "Exeggutor": {},
    "Muk": {},
    "Weezing": {},
    "Flareon": {}
  }
}

Steps to Reproduce

Run the task MoveToMapPokemon and let it walk towards a pokemon

Other Information

OS: Windows 10 Git Commit: 9ae1b785f0836d8769d011626d2bc071ed338bff Python Version: 2.7.12

lmondry commented 8 years ago

Do you have enough pokeballs and enough space in your bag to add another pokemon ?

pietjuh commented 8 years ago

Yeah, I've got plenty, like 120 balls and only 98 pokemon so far. If it encounters another pokemon on the way, it does catch that one

Tagada22 commented 8 years ago

Same problems for me

cliffalbert commented 8 years ago

Please post full log, usually pokemons can already be captured at distances more then 0.01km, it probably already got snatched up, the bot only selects the next pokemon if the timelimit is exceeded or if it is at the exact location.

pmquan commented 8 years ago

Below is an example that you could catch the pokemon before arrived.

2016-08-11 12:12:10,179 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_move_towards] Moving towards Charmander, 0.06km, left (4 minutes, 55 seconds)
2016-08-11 12:12:12,272 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_move_towards] Moving towards Charmander, 0.05km, left (4 minutes, 53 seconds)
2016-08-11 12:12:14,346 [PokemonCatchWorker] [INFO] [pokemon_appeared] **A wild Charmander appeared!** [CP 331] [Potential 0.24] [A/D/S 0/9/2]
2016-08-11 12:12:17,037 [PokemonCatchWorker] [INFO] [threw_berry] Threw a Razz Berry! Catch rate with Pokeball is now: 23.19
2016-08-11 12:12:17,318 [PokemonCatchWorker] [INFO] [threw_pokeball] Used Pokeball, with chance 23.19 (89 left)
2016-08-11 12:12:17,547 [PokemonCatchWorker] [INFO] [pokemon_caught] Captured Charmander! [CP 331] [Potential 0.24] [0/9/2] [+210 exp]
2016-08-11 12:12:17,548 [PokemonCatchWorker] [INFO] [gained_candy] You now have 402 Charmander candy!
2016-08-11 12:12:23,181 [TransferPokemon] [INFO] [keep_best_release] Keeping best 1 Charmander, based on iv
2016-08-11 12:12:23,531 [TransferPokemon] [INFO] [pokemon_release] Exchanged Charmander [CP 331] [IV 0.24] for candy.
2016-08-11 12:12:37,003 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_move_towards] Moving towards Charmander, 0.05km, left (4 minutes, 28 seconds)
2016-08-11 12:12:38,696 [UpdateLiveStats] [INFO] [log_stats] xxx | Uptime : 0:21:45 | 1.05km walked | Level 32 (963,809 / 1,250,000, 77%) | +19,760 XP | 54,519 XP/h
2016-08-11 12:12:40,930 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_move_towards] Moving towards Charmander, 0.04km, left (4 minutes, 25 seconds)
2016-08-11 12:12:42,492 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_move_towards] Moving towards Charmander, 0.03km, left (4 minutes, 23 seconds)
2016-08-11 12:12:44,987 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_move_towards] Moving towards Charmander, 0.02km, left (4 minutes, 21 seconds)
2016-08-11 12:12:46,534 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_move_towards] Moving towards Charmander, 0.01km, left (4 minutes, 19 seconds)
2016-08-11 12:12:46,698 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_encounter] Encountered Pokemon: Charmander
smfbrooks commented 8 years ago

Also, I think encountering pokemon along the way may take up enough time for the targeted pokemon to despawn before you arrive. I'm almost certain I have witnessed this.

crvfts commented 8 years ago

I get this error as well. It happens for me when I have zero berries or zero great balls. Bot won't even go into capture mode with Pidgeys. I've duplicated this issue for myself several times now and the error occurs when Great Balls or berries are zero.

smfbrooks commented 8 years ago

@crvfts check this case https://github.com/PokemonGoF/PokemonGo-Bot/blob/d7cb7df27516b588252a767260176f92586489fa/pokemongo_bot/cell_workers/move_to_map_pokemon.py#L255

ghost commented 8 years ago

Its same here

pietjuh commented 8 years ago

Its fixed now for me, the same problem was described in another issue, the solution was to shuffle the order of the tasks, set the MoveToMapPokemon above the catchPokemon tasks and the move to fort task.

Edit: Guess I cheered too soon:


2016-08-12 18:20:24,938 [UpdateLiveStats] [INFO] [log_stats]  | Uptime : 2:11:02 | 5.51km walked | Level 19 (39,535 / 50,000, 79%) | +26,480 XP | 12,124 XP/h
2016-08-12 18:20:27,361 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_move_towards] Moving towards Horsea, 0.28km, left (3 minutes, 24 seconds)
2016-08-12 18:20:29,013 [UpdateLiveStats] [INFO] [log_stats]  | Uptime : 2:11:06 | 5.51km walked | Level 19 (39,535 / 50,000, 79%) | +26,480 XP | 12,118 XP/h
2016-08-12 18:20:30,630 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_move_towards] Moving towards Horsea, 0.26km, left (3 minutes, 21 seconds)
2016-08-12 18:20:32,799 [UpdateLiveStats] [INFO] [log_stats]  | Uptime : 2:11:10 | 5.51km walked | Level 19 (39,535 / 50,000, 79%) | +26,480 XP | 12,112 XP/h
2016-08-12 18:20:35,134 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_move_towards] Moving towards Horsea, 0.24km, left (3 minutes, 16 seconds)
2016-08-12 18:20:36,730 [UpdateLiveStats] [INFO] [log_stats]  | Uptime : 2:11:14 | 5.51km walked | Level 19 (39,535 / 50,000, 79%) | +26,480 XP | 12,106 XP/h
2016-08-12 18:20:38,628 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_move_towards] Moving towards Horsea, 0.22km, left (3 minutes, 13 seconds)
2016-08-12 18:20:40,765 [UpdateLiveStats] [INFO] [log_stats]  | Uptime : 2:11:18 | 5.51km walked | Level 19 (39,535 / 50,000, 79%) | +26,480 XP | 12,100 XP/h
2016-08-12 18:20:42,640 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_move_towards] Moving towards Horsea, 0.20km, left (3 minutes, 9 seconds)
2016-08-12 18:20:44,750 [UpdateLiveStats] [INFO] [log_stats]  | Uptime : 2:11:22 | 5.51km walked | Level 19 (39,535 / 50,000, 79%) | +26,480 XP | 12,094 XP/h
2016-08-12 18:20:47,157 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_move_towards] Moving towards Horsea, 0.18km, left (3 minutes, 4 seconds)
2016-08-12 18:20:49,871 [UpdateLiveStats] [INFO] [log_stats]  | Uptime : 2:11:27 | 5.51km walked | Level 19 (39,535 / 50,000, 79%) | +26,480 XP | 12,086 XP/h
2016-08-12 18:20:51,589 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_move_towards] Moving towards Horsea, 0.16km, left (3 minutes, 0 seconds)
2016-08-12 18:20:53,653 [UpdateLiveStats] [INFO] [log_stats]  | Uptime : 2:11:31 | 5.51km walked | Level 19 (39,535 / 50,000, 79%) | +26,480 XP | 12,080 XP/h
2016-08-12 18:20:55,125 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_updated_map] Updated PokemonGo-Map to 52.6933967136, 6.18382516776
2016-08-12 18:20:56,167 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_move_towards] Moving towards Horsea, 0.14km, left (2 minutes, 55 seconds)
2016-08-12 18:20:58,479 [UpdateLiveStats] [INFO] [log_stats]  | Uptime : 2:11:36 | 5.51km walked | Level 19 (39,535 / 50,000, 79%) | +26,480 XP | 12,073 XP/h
2016-08-12 18:21:00,845 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_move_towards] Moving towards Horsea, 0.12km, left (2 minutes, 51 seconds)
2016-08-12 18:21:02,496 [UpdateLiveStats] [INFO] [log_stats]  | Uptime : 2:11:40 | 5.51km walked | Level 19 (39,535 / 50,000, 79%) | +26,480 XP | 12,066 XP/h
2016-08-12 18:21:04,548 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_move_towards] Moving towards Horsea, 0.10km, left (2 minutes, 47 seconds)
2016-08-12 18:21:06,584 [UpdateLiveStats] [INFO] [log_stats]  | Uptime : 2:11:44 | 5.51km walked | Level 19 (39,535 / 50,000, 79%) | +26,480 XP | 12,060 XP/h
2016-08-12 18:21:08,328 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_move_towards] Moving towards Horsea, 0.08km, left (2 minutes, 43 seconds)
2016-08-12 18:21:09,953 [UpdateLiveStats] [INFO] [log_stats]  | Uptime : 2:11:47 | 5.51km walked | Level 19 (39,535 / 50,000, 79%) | +26,480 XP | 12,055 XP/h
2016-08-12 18:21:12,127 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_move_towards] Moving towards Horsea, 0.06km, left (2 minutes, 39 seconds)
2016-08-12 18:21:14,479 [UpdateLiveStats] [INFO] [log_stats]  | Uptime : 2:11:52 | 5.51km walked | Level 19 (39,535 / 50,000, 79%) | +26,480 XP | 12,048 XP/h
2016-08-12 18:21:16,131 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_move_towards] Moving towards Horsea, 0.03km, left (2 minutes, 35 seconds)
2016-08-12 18:21:16,480 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_encounter] Encountered Pokemon: Horsea
2016-08-12 18:21:16,483 [MoveToFort] [INFO] [moving_to_fort] Moving towards pokestop Zittende Man - 0.35km
2016-08-12 18:21:17,957 [UpdateLiveStats] [INFO] [log_stats]  | Uptime : 2:11:55 | 5.51km walked | Level 19 (39,535 / 50,000, 79%) | +26,480 XP | 12,043 XP/h
2016-08-12 18:21:19,667 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_move_towards] Moving towards Eevee, 1.10km, left (1 minute, 51 seconds)
crvfts commented 8 years ago

@keugnu with master from 5 days ago and as well with current master i have set ALL pokemon as VIP as well as setting the threshold low enough (current master) so all pokemon are sniped and i still have this issue. with older master the bot simply encounters and then exits, will current master it encounters, exits, and then walks to that same pokemon. if i set all pokemon with same priority number the bot just paces as new pokemon appear and are closer but i expected that to happen.

k4n30 commented 8 years ago

OP issue is solved