-
Notifications
You must be signed in to change notification settings - Fork 444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Botting #86
Comments
detection of bad network conditions or session-key changes by server with auto-reconnect after timeout -> miss |
I believe your evolution candies are listed in your inventory as well in the dictionary of the pokemon.
Could you help me out how to trigger egg incubation ? |
@dnsBlah they are listed in dictionary of pokemons but they all are 0 apparently when you walk it... thanks for the pokemon_family data... that will work Egg Incubation - the proto is slightly wrong as checked (at least time last time I checked). Notice I have "repeated" whereas what's checked in is "optional". @tejado doesn't provide the .proto files here (not sure why) so it won't be an easy fix for you guys - but that fix is only necessary if you want to incubate multiple eggs at the same time.
Below should explain how to use incubators (the code is using my structure, but should give you an idea of how to use it).
|
@ztukaz - regarding sessions, honestly I'm not super familiar with that. @tejado might honestly know better as this would be a API library / networking / connectivity issue. What I know is from here: |
@Nostrademous Or is that the reason why I need a other proto to request the inventory? or just try all 9 eggs until positive result? |
@dnsBlah With both those checks you can then record pokemon['id'] as a valid egg for incubation. That is the 'id' you pass as the 2nd argument to api.use_item_egg_incubator() Also, looks liek POGO fixed the "repeated" 20 hrs ago.... heh, didnt' realize. |
Hi @Nostrademous
(I have 9 eggs *max ofcourse) All 9 look like this, but I'm walking 1.
See what I mean :) But, yet, I don't see a link between the incubator and the egg's |
@dnsBlah I just verified and I guess it changed, you are right, 'km' stuff no longer listed for active eggs. If you try to incubate an egg already in use it will return a RESPONSE with: If you get that, just try a different egg:
|
<3 thank you! |
It also seems like that the incubators are not shown in the inventory list... |
@dnsBlah are you using ITEM_ID=902 for the "extra incubators"? Will have to check if they show up or not, I don't really care actually as when I use incubators I enumerate them differently. |
I'm guessing i have it working now.. However I don't get unique id's from my item: 902 |
|
Did you imported in this project manually? |
@Nostrademous |
@dnsBlah glad you got it working :) I just recently added mass evolving capability to my bot with the use of a Lucky Egg (if I can do more than 125 evolutions at once). This required tracking proper candy and candy requirements (which I do now). Also added level-up detection and level-up-prize gathering. Leveled a brand new account to level 22 in under 12 hours - played by bot from level 1 on (without the use of any evolution or lucky-egg). |
@Nostrademous With StartGymBattle I get always status = 3 and empty results
|
@Nostrademous Please share the level-up-prize gathering. :-D |
@ztukaz tackling gyms next - haven't started yet @dnsBlah - for leveling use the LEVEL_UP_REWARDS call and you must supply your current level (which you can obtain from Inventory ItemData PlayerStats. The response message will have all the info you need, and unlocked new items which you can now start getting at pokestops. |
@ztukaz isn't status_code 3 stating that it is a NEUTRAL GYM? Meaning you can't attack it as no one owns it? |
That's so cool! I now get AWARED_ALREADY Any idea when this is called in the real game? Thanks! |
@ztukaz @tejado
Printing the request I see:
and printing the gym_proto result:
|
@Nostrademous I was waiting for you for the same problem, but still didn't get out |
@tejado @ztukaz so I get it to work sometimes. The fix is modifying the StartGymBattleMessage() protobuf. the defender_id needs to be fixed64. However it fails at time when the defender_id happens to be larger than int64 but still smaller than uint64. Python by default treats everything as signed.. but I checked your rpc_api and you use "setattr()" in the _build_sub_requests() function which is pass by reference.. so I am not sure what the issue is. However, there is a pattern for me. For IDs larger than int64 but still 8-bytes I get no reponse payload from server. This also happens for me in Incense-based Pokemon encounters. |
I'm just getting responses like:
Which are not good I guess status 3? Or I will need the request_id to perform AttackGymMessage <-> Response for the actual battle I guess According to the responses it should be, ERROR_GYM_NEUTRAL ? @Nostradamous where exactly do you change what in the request message ? |
@dnsBlah if you go into the /pgoapi/protos/POGOProtos_src/Networking/Requests/Messages/StartGymBattleMessage.proto you need to change the defending_id from uint64 to fixed64 then you need to recompile the proto using "protoc" which you need to have installed of version 3.0.0b4 |
Ahhh I need to do that before compiling it!? awesome ;-) but its not always working, however using the same defender, so that part has nothing to do with the fixed64, it's fine I guess Guess its a matter of a loop now |
@Nostrademous can you show some examples of running / reading forts from map_objects (i keep getting a weird error, at work now so can't supply it at this time)? |
You need bigger delay's... You can only call map_objects per 5 seconds. |
@joshk6656 did @dnsBlah comments help you? It's hard to tell what your errors were. If you are not getting good fort data from map_objects it's probably b/c you are soft-banned for teleporting too much. Otherwise it is fairly straight forward. |
Fixed Incense Encounters (catch them all now - reference for fix: AeonLucid/POGOProtos#124 Added support for detecting and catching Lured Pokemon at Lured Pokestops (just check the fort details -> modifiers -> item_id == 501 and check fort.lure_info.lure_expires_timestamp_ms to know if it is lured and for how long). Then use the DiskEncounterMessage and pass the fort.lure_info.fort_id as the spawnpoint_id to the CatchPokemonMessage. |
in the field attack_actions used in api.attack_gym ( gym_id , battle_id, attack_actions, last_retrieved_actions, player_latitude, player_longitude)
|
@Nostrademous if you can tell how to build actions to I'm using:
and as result:
But server didn't accept them, so they are not appear in |
@ztukaz and @Nihisil Haven't gotten there yet... I can start gym battle's now, but haven't written code to do the actual fight yet. Instead I spent my time fixing lures/incense encounters, and writing code to auto-deploy pokemon to gyms that belong to my team but don't have full membership saturation (low hanging fruit for getting into a gym). Also track IV stats of pokemon now. I will work on battles next, although any bugs I find trump that. Also, had a friend implement a webserver to track my bot and all info I want (example below). |
@Nostrademous got it, I'm looking forward to hear update from you about gym battles. If I will be able to fix it, I will let you know what I did. Also, maybe do you have a dump of official app traffic? |
@Nihisil would be much appreciated if you share what you did if you get it working Regarding web-server - i don't dump any official traffic... the webserver runs from my own bot and uses only bot data. I just download a package with all the pokemon icons and use google's map api to draw pokestops and pokemon on them. All blue circles are pokestops, those that are connected are the path I plan on taking (calculated using some advanced traveling salesman algorithm), the pokemon appear where I find/catch them. |
@Nostrademous got it. I was interested in official traffic, because of required attributes to attack gym :) Your webversion looking great, btw. |
That web integration is crazy! wow @Nihisil I guess we'll need to use the data/battleaction to setup and retreive actions |
@dnsBlah yeah, I have sent latest action. I tried different ways to send |
Currently I'm in the need to resolve my status_code 3 on numerous requests. |
@ztukaz
This happend randomly in getMapObjects, useItemCapture, capturePokemon Sometimes it's fixed, most times it doesnt, also seems location related... |
Making progress here - bunch of things needed to be done first. First - need to heal my pokemon that I am trying to fight with. If you submit your attacker list but one isn't full health you will get a bad payload return from server. Implementing this now. |
Okay, getting far enough to have my first AttackGymMessage accepted... I have realized the first message you send after StartGymBattle must be essentially blank. I basically send a AttackGym() with only gym_id, battle_id and player lat/lng. Server replies with a valid "Active Attacker" and "Active Defender" information with health.. as well as Battle Log info with server timestamp (so we can synchronize actions as your time might have skew) and target_index information I can use in following attacks. This info is the same as in StartGymBattle() but at least I know it's somewhat working. |
@Nostrademous was you able to put your attack message to the server? So you send message and it appears in the battle_log. I send first request with empty attack actions list after this I'm trying to send a new attack message in loop, each one second. So, each second I'm getting response ATTACK_GYM, and I'm trying to use this information to send my next message. But server didn't apply my actions. If you did it and server accept your actions, can you please send to me example of code with your attack_actions? I wonder what attributes do you use. |
@tejado I think the issue currently is that you don't support RPC requests where a "nested list/dictionary" type is passed when building outgoing requests in your API library. For AttackGym we need to supply a "repeated BattleAction" list and you currently only handle dictionaries, lists and base type but not lists of more complicated types, etc EDIT: in reality I think we need to pass "repeated class<RpcSub.BattleAction>" objects |
I believe rpc_api.py needs to be refined to handle a list of BattleActions. Something like: NOTE - COMPLETELY UNTESTED CODE
|
Made a separate issue based on the what I believe is preventing this API library from properly attacking gyms. |
@Nostrademous maybe this will help AeonLucid/POGOProtos#112 when api will start to work again. |
I cloned a while ago from @tejado and have been working on implementing features... Got to say things are going well and I'm willing to answer questions people have, but not willing to copy/paste source code since it would lead to more questions and at this point I'm divergent from the current code base by several revisions (some of them structural).
I do not claim to have the best or most advanced bot, but it does what I want it to do... it just leveled a brand new test account from lvl 1 -> 20 in under a day (servers were stable).
Here is what I have figured out thus far:
** catching uses curve balls and probably a "too" high chance of excellent throws
** catching uses appropriate level of pokeball based on difficulty of pokemon
** catching uses razz berries as necessary based of difficulty of pokemon
Feel free to ask questions, but like I said, I won't be releasing code or copy/pasting solutions, but can help with proto formats.
The text was updated successfully, but these errors were encountered: