Hyperclaw79 / PokeBall-SelfBot-Poketwo-Autocatcher

This specific selfbot was designed to automatically catch pokemon spawned on Discord by Poketwo bot. It also offers other utility functions to automate features like trading, releasing, id search, etc. Currently the autocatcher is powered by AI making it possible to autocatch pokemons on multiple bots like PokeTwo, PokeRealm, etc.
MIT License
336 stars 400 forks source link

[Breaking Bug] Invalid hashes for Pokemon names. #87

Closed chriserit closed 6 years ago

chriserit commented 6 years ago

using the bot by a while, today after running for an hour it encountered this problem. any idea how to fix it?

Traceback (most recent call last): File "C:\Users\chris\AppData\Local\Programs\Python\Python36\lib\site-packages\discord\client.py", line 220, in _run_event await coro(*args, **kwargs) File "C:\Users\chris\Downloads\dedbot-master\PokeBall-SelfBot-master\pokeball.py", line 175, in on_message name = await self.match(emb.image.url.split('?')[0]) File "C:\Users\chris\Downloads\dedbot-master\PokeBall-SelfBot-master\pokeball.py", line 115, in match return self.pokenames[m] KeyError: 'dc84ca26a358631d26cf9d786433f7f4'

VirtueSuzuya commented 6 years ago

I have this issue too and i found what is causing it. Miles (the creator of pokecord) updated the spawn messages to make them more secure as to try and prevent autocatching bots. You'll hate to wait and see if Hyperclaw79, or anyone else, can find a work around for this update.

Hyperclaw79 commented 6 years ago

Unfortunately, the timing couldn't be worse. :/ I am traveling atm and can't work on it till Saturday Eve. Sorry for the inconvenience and stay patient. 😥

leadheadfred commented 6 years ago

I just wouldve got mine working as well lmao

crunchiboi commented 6 years ago

allg Hyperclaw79 you helped us quite abit so enjoy traveling while it lasts have fun :D

leadheadfred commented 6 years ago

A heads up in case you didnt know. The pokecord catcher which this was based off works so that might help you to fix the issue, and the message with the pokemon now reads wiid (captial i) sometimes instead of wild. E: maybe not i think it got taken down? bot no longer works and cant find it on github

Hyperclaw79 commented 6 years ago

The pokecord catcher which this was based off works @leadheadfred Yes, I am aware of the changes on that repo (I am a contributer there lol). But as of now, I am researching on a faster and simpler method to achieve this.

message with the pokemon now reads wiid (captial i) sometimes instead of wild

ah! This one is a valuable info. Thanks for the find.

leadheadfred commented 6 years ago

I didnt find it, somebody over on the other bots issue page did, but its deleted so i cant really give credit

MateeTheGod commented 6 years ago

It might also be good to note that they're sometimes tilted image

leadheadfred commented 6 years ago

Yeah, it seems theyre always tilted by the same amount, but they could be a small difference which is unnoticeable. direction of rotation changes tho

Hyperclaw79 commented 6 years ago

As of now, xKynn is out of options too, so the other repo has been closed (temporarily?). This is a huge breaking issue which is hard to fix, so it might take very long. Like @MateeTheGod pointed out, the rotation is a simple but huge change that affects hashing and any other methods I could think of. @leadheadfred Even if the tilt amount is same, he can easily change that in the future update.

As of now, I could only think up Reverse Image APIs that would require the users to obtain a token. But the rate limits and pricing will become an issue.

For now, the autocatcher is officially non-functional.

Please use the other commands meanwhile. I highly suggest getting the Premium Version and using the Autodueler instead. With the introduction of marketplace on PokeCord, it's better to farm credits and buy the pokemons instead of relying on the spawns.

MateeTheGod commented 6 years ago

Sucks for me cause im dirt poor

BeemoBeemo commented 6 years ago

There is a fun thing you can still do with it tho, dm me if you wanna know

BeemoBeemo commented 6 years ago

it might get patched if I say it in here

leadheadfred commented 6 years ago

i want to know but dont know how to pm lol so can you pm me?

BeemoBeemo commented 6 years ago

i dont think pm'ing is possible here lmao

BeemoBeemo commented 6 years ago

Basically he removes all your pokemon when you use the catcher when it chooses the wrong pokemon, he probably changed the codes and some are traps that will get your account

BeemoBeemo commented 6 years ago

I'll put it up for a few sec

leadheadfred commented 6 years ago

my pokemon seem to still be there

BeemoBeemo commented 6 years ago

Don't use the catcher then, it'll remove you to the point where you have to pick again

leadheadfred commented 6 years ago

@Hyperclaw79 would it be possible to count the number of pixels of each colour instead of trying to match the specific picture? very few pokemon would have exactly the same amount of exactly the same coloured pixels. IDK how hard that would be to code though

BeemoBeemo commented 6 years ago

he basically trapped certain codes this bot uses, and I'm pretty sure he might even be checking this thread

leadheadfred commented 6 years ago

Thats a good point actually. i wonder if theres a place we can privately suggest stuff (ik theres his discord but he said not to use that)

chriserit commented 6 years ago

for deformation and rotation this should be pretty useful to fix the problem http://image-match.readthedocs.io/en/latest/start.html

also is there no way to use google search by image? if you use that, google always find the name of the pokemon and even add the text " pokemon name pokemon" to the search bar (like "pokemon ekans", "pokemon eevee" ecc). at that point it should be easy to let the bot say the name.

Hyperclaw79 commented 6 years ago

for deformation and rotation this should be pretty useful to fix the problem http://image-match.readthedocs.io/en/latest/start.html

Seems interesting, I'll look into it. 👍

also is there no way to use google search by image? if you use that, google always find the name of the pokemon and even add the text " pokemon name pokemon" to the search bar (like "pokemon ekans", "pokemon eevee" ecc). at that point it should be easy to let the bot say the name.

Google Search API requires getting the access token and boy, even for a dev, it is a painful procedure to set it up.

LoganRogers1337 commented 6 years ago

I have a suggestion for this. Maybe you could save the images for each spawn and connect them to the catch messages for them, so if a Mewtwo spawns for example, the bot detects that the tilted Mewtwo picture is the same as the tilted Mewtwo picture it has, and then sends the [prefix]catch Mewtwo message. It's probably gonna be hard making this, since you need to see and download every pokemon picture, but you could alsp try to find how much the pokemon are tilted and tilt them yourself. You could also use a spam bot to find all of them.

Considering this would take a long time, you could release one that only works for legendaries meanwhile.

Hyperclaw79 commented 6 years ago

It is not easy for a computer to compare two images like we do. There is a lot of underlying things involved. What I am working on more or less has something along these lines.

xElfenlied commented 6 years ago

just want to note that there is no reason to keep the progress or what exactly you r working on as secret... as many others here who know a little bit about codeing probably looked into the code to find out how things r working so did miles probably... in the end: as soon as there is a public release is out miles will see how to work around it in the code...

and if you make the whole catcher premium he even may buy it just to prevent cheating... so i'd suggest only to spread it to trusted ppl even tho it is sad to work on such a code and not beeing allowed to share it :/

and another note for everyone: pixel count dosn't work as the degre of tilt could be diffrent and as the pics get tilted the amount of pixels is changeing too... finding out the url of the spawns is even dangerous for the bots as if the urls get changed to other pokemons the bot will notic that u want to catch a compleatly diffrent pokemon which probably only a bot would do as the human has no way to know to which pokemon the url belonged befor... and if that is noticed the pokecord account will be resetted... and about rehashing the old data to fit the new data which miles can easiely change i have no idear about it as this is the topic where i pretty much sleept the most in school xD

anyway i hope i'll be able to download your code and and look how you worked around the recent changes :) wish you good success and fun while codeing <3

Hyperclaw79 commented 6 years ago

no reason to keep the progress or what exactly you r working on as secret...

No comments until the next announcement. :3

sad to work on such a code and not beeing allowed to share it

Ikr!

wish you good success and fun while codeing <3

Thanks 😄

LoganRogers1337 commented 6 years ago

Seems the tilt is gone now, so reverse searching images could probably help now.

Hyperclaw79 commented 6 years ago

Fixed it finally in the Premium Version!

Since it is troublesome to patch the autocatcher every time, it will now become a Premium Only feature.