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

[Suggestion] Rename Pokemon

Open seratkurtulus opened this issue 10 years ago • 11 comments

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?

seratkurtulus avatar Jul 23 '16 15:07 seratkurtulus

Would be great, if its possible :+1:

d-magiera avatar Jul 23 '16 16:07 d-magiera

If rename is possible, make also an "-ir, --initial_rename" command :)

d-magiera avatar Jul 23 '16 16:07 d-magiera

Or even the pure IV values as ATK.DEF.STAM

J102030 avatar Jul 23 '16 17:07 J102030

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 :)

ghost avatar Jul 23 '16 18:07 ghost

@GreWull id from pokemon_to_transfer[0]?

julesferreira avatar Jul 23 '16 18:07 julesferreira

@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")

ghost avatar Jul 23 '16 18:07 ghost

GreWull what's your type() on pokemon_to_transfer[0]?

julesferreira avatar Jul 23 '16 18:07 julesferreira

@julesferreira <type 'long'>

ghost avatar Jul 23 '16 18:07 ghost

https://github.com/tejado/pgoapi/issues/59

julesferreira avatar Jul 25 '16 03:07 julesferreira

@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 :)

ghost avatar Jul 25 '16 10:07 ghost

Can you open a PR @GreWull and reference it here?

dmateusp avatar Jul 25 '16 10:07 dmateusp