[Suggestion] Rename Pokemon
I have no idea if it is possible to rename the pokemon through the api but it would be nice to rename the caught pokemons with their IV value. There is no way of knowing the IV values of the pokemons after they are caught("it is also only possible through api"), so it would be awesome to have the values attached to them. For example an Eevee with 0.75 IV value could be renamed to "Eevee75" maybe?
Would be great, if its possible :+1:
If rename is possible, make also an "-ir, --initial_rename" command :)
Or even the pure IV values as ATK.DEF.STAM
Trying to make it work.. `
def rename_pokemon(self, pid, name):
self.api.nickname_pokemon(pokemon_id=pid, nickname="MyName")
response_dict = self.api.call()
print(response_dict)
`
I don't why I keep getting "{'NICKNAME_POKEMON': {'result': 3}}" which means ERROR_POKEMON_NOT_FOUND even tho I'm using the same ID that trasnfer_pokemon uses.
If someone can find why is not working it would be great :)
@GreWull id from pokemon_to_transfer[0]?
@julesferreira yes, tried to use that one.
Just to be sure I tried the same thing with "set_favorite_pokemon" (still using the same ID) and that Pokemon became "favoire" (yellow star) but the nickname function gave again result: 3 (pokemon not found)
def favorite_pokemon(self, pid):
self.api.set_favorite_pokemon(pokemon_id=pid, is_favorite=True)
response_dict = self.api.call()
print(response_dict)
pokemon_to_transfer = list(Set(self.count_pokemon_inventory()) - Set(id_list1))
# works without problem
self.favorite_pokemon(pokemon_to_transfer[0])
# returns pokemon not found
self.rename_pokemon(pokemon_to_transfer[0], "MyName")
GreWull what's your type() on pokemon_to_transfer[0]?
@julesferreira <type 'long'>
https://github.com/tejado/pgoapi/issues/59
@julesferreira found the problem. The ID type in the API was the wrong one. I don't know how to update the API.. but what I did was:
Open the file src\pgoapi\pgoapi\protos\POGOProtos\Networking\Requests\Messages_pb2.py Line 1395 (or search for "nicknamepokemonmessage"), there is "type=1", change it to "type=6".
Should work :)
Can you open a PR @GreWull and reference it here?