-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Snipping improvements #5247
Snipping improvements #5247
Conversation
Dev merge to master
…atch it;Spawnpoint and encounter IDs are set/updated whether they're null/blank. This allows the bot to interact with crowd-sourced based apps, since mostly of them dont provide these info. This is one feeding app I forked and updated for this bot: https://github.com/YvesHenri/PogoLocationFeeder.
@YvesHenri, thanks for your PR! By analyzing the annotation information on this pull request, we identified @mhdasding, @Napator and @chrisle to be potential reviewers |
altitude? |
To snipe from http://maps.pikabot.org/ (social), just enable the 'enable_social' flag, but since it's kinda buggy & slow, you can alternatively use the application I posted above. This commit does not interfere with the old snipping system, instead its an improvement to easily use other third-party JSON results. |
@YvesHenri buggy and slow ? how did you test the social sniper ? |
|
||
exists = False | ||
nearby_pokemons = [] | ||
nearby_stuff = self.bot.get_meta_cell() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do you check the sniping pokemon ? You don't have it in the nearby list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check against what? If the nearby_pokemons list doesnt contain the target, exists will be kept false, meaning it doesnt or never existed (some feeders provide outdated data). The empty nearby_pokemons list gets extended at line 311, as we can see.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong, you won't have the pokemon in the nearby_pokemons list when encounter by sniping style.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you tell me why? I've been testing this for a whole day and results are impressive. Did you even test it?
@solderzzc I honestly dont know why as I havent really dove into the social code part, but if you use both methods, you'll see that social is fairly slower than this feeding app method. Also, by buggy I mean there are LOTS of improvements to be done to it and meanwhile the method above will do it. Anyways, the above changes should not impact on anything. My plan is to refactor this whole file to accept a certain JSON format (global) responses, no matter where you get it from (social, crowd-based websites etc), by being able to specify an address and maybe the corresponding JSON attribute names. |
@YvesHenri Social sniper isn't slow, but need keep slow by the reason you know. If you want to try, you can set |
@solderzzc Changing snipe_max_in_chain does not make social any faster. It does not change how frequent you get feeds. It just takes advantage of the data (doesnt matter if data came from social, or wherever else). What I'm talking about is how frequent social provides you info (and good ones), against the above app. Tell me whats faster, X reports from a single source (social), where X is the number of python bots (this one) with social enabled, or Y reports from multiple sources (multiple bots, multiple crowd-based apps etc), where Y is the number of bot users, legit players + crowd-based apps/websites and more? I don't get why it wouldn't be approved, since it doesnt interfere with the current snipping methods. I took care to leave everything as it is. Everything should work just like before this change. |
@YvesHenri Ok, let's leave the faster/slower argument aside. |
Ok, let me explain again. It checks whether the pokemon param still exists by looping the nearby_pokemon list (which is nothing but the meta cell's wild and non-wild pokemons info) by their IDs. That list gets populated at line 311, like I said above. If thats not what you're wondering, I then deffinitelly dont really know why you're so confused. |
I really want to know the API sequence difference. |
Feel free to reopen, let me close it for now. |
@solderzzc I believe he is calling the get_map_object api via this line: Which calls this code: That calls the find_close_cells(self, lat, lng) method, which contains the get_map_object api call. This change should allow sniping of pokemon which do not have encounter_ids, most online sources do not include the encouter_id. It will also protect against users sending malicious or incorrect data through the social feature by first verifying the pokemon exists. After reviewing the code, I'm going to go ahead and reopen the PR. |
@joelgreen There're two kinds of snipe:
|
walk to , or keep the car and run to ;-) |
For snipe type 2, the bot already supports teleport to pokemon if they have the encounter ID. But if the encounter id is missing or invalid the snipe fails, this will request the nearby map cells to get the correct encounter_id. Events are as follows:
This does not trigger a softban, and should have no effect on snipe detection (they know easily regardless). The only concern is to make sure not to request the map cells more than once every 10 seconds. I've been using similar logic to snipe since before the first hardbans. Since then none of my snipe accounts have been banned, but I expect this will ultimately lead to bans no matter what. If you want to keep map cell requests to a minimum, you could only request when the encounter id is missing, but you will still have to solve the case that the pokemon data is invalid. |
@joelgreen That's what I was concerning. We can't request map cell from long distance. Just like bit torrent, you can always cheat to the central tracker, but you can also ban the IP which spammed people. The broker core was already done based on mosca. I can share code with you if you want. |
@solderzzc If you trust the social source, then I would recommend for @YvesHenri to update this PR to only request map cells if the encounter_id is not present. This would make it so everything works the same for the social code, but allow for integration of online sources as well. |
@joelgreen Currently we only have thousands online, I have 3 millions pokemon location saved in one week. We can definitely introduce legit verification based on location/others report/etc.. but there's no spammer at the time. So at least for now, we can trust social source. Everyone contribute, that's the community. |
@solderzzc It would be interesting to have the bot check the map cells for pokemon from unverified IPs, then share back to the social. Use those results to verify or ban the source. It would only require a rare minority of snipes to actually request the cells. |
@solderzzc Sniping from the list used by the app @YvesHenri forked (http://pokeapi.pokesnipe.de/) these are some of my pokemon after one night of botting from level |
@joelgreen good night, talk to you more detail tomorrow. |
@solderzzc The whole snipping thing is dangerous, regardless what. The bot itself is dangerous. You know that (I hope). Requesting an invalid pokemon encounter/catch is not any safe. Snipping shall be fully refactored. Assuming most of targets are almost always farther than 1k, moving to it (and also picking forts) is just as pointless. Please don't close this for no reason. |
@YvesHenri Agreed, we need a credit system, you need change the PR to not get map data when using social sniper. |
@YvesHenri Can you refactor this to only request the map cells if theres no encounter_id by default, and allow a config option to always check the map cells, then resubmit? This should provide the most flexibility, while also not forcing users who trust the social data to request extra map cells. @solderzzc Like you mentioned, we need to request the map cells for pokemon from the map chat, and other maps, as well as online lists. This code will allow for that. |
@joelgreen The bot send two kinds of data, one to map-chat the other to the bot network. The copy send to map-chat will not have encounter-id, but there's encounter-id in the data send to bot network. |
Checking if target exists is only performed if data didnt come from the social feature.
Agreed. Fixed. |
Looks good for me. Just need resolve conflicts. |
Yves henri dev
@YvesHenri will submit another PR. |
* Non-social information (url) are now validated against expiration (exists). This also allows other crowd-based applications/sites to work this bot (https://github.com/YvesHenri/PokemonGo-Bot). Teleporting to target log is now yellow. * Fixes issue #5290
Snipping now makes sure the target still exists before attemping to catch it;
Spawnpoint and encounter IDs are set/updated whether they're null/blank. This allows the bot to interact with crowd-sourced based apps, since mostly of them dont provide these info, like this one I forked and updated for this bot: https://github.com/YvesHenri/PogoLocationFeeder.