Tishj / VortexBot

Bot used to automate a wide range of tasks in pokemon-vortex. Written in Python using Selenium, Pickle, requests and lxml
3 stars 5 forks source link

Script stuck #7

Open Giovanni55913 opened 3 years ago

Giovanni55913 commented 3 years ago

Hi,

I currently have an issue with the script. It seems that the script gets stuck on checking the pokeballs. It comesback with a couple off errors, but does not go on. Could you help me with this ?

evTools listening on ws://127.0.0.1:62817/devtools/browser/ed177697-d8ac-4840-b99f-80ae6b34891b File "C:\Project\vortexbot.py", line 813, in if any (player.items[ball] == None or player.items[ball] < config['restock'][ball]['min'] for ball in ['Poké Ball', 'Great Ball', 'Ultra Ball']): File "C:\Project\vortexbot.py", line 813, in if any (player.items[ball] == None or player.items[ball] < config['restock'][ball]['min'] for ball in ['Poké Ball', 'Great Ball', 'Ultra Ball']): KeyError: 'Poké Ball' PS C:\Project> [19160:23748:0820/174104.000:ERROR:device_event_log_impl.cc(214)] [17:41:03.999] USB: usb_device_handle_win.cc:1048 Failed to read descriptor from node connection: Een apparaat dat op het systeem is aangesloten, werkt niet. (0x1F) [19160:23748:0820/174104.004:ERROR:device_event_log_impl.cc(214)] [17:41:04.003] Bluetooth: bluetooth_adapter_winrt.cc:1073 Getting Default Adapter failed. [19160:23748:0820/174104.005:ERROR:device_event_log_impl.cc(214)] [17:41:04.004] USB: usb_device_handle_win.cc:1048 Failed to read descriptor from node connection: Een apparaat dat op het systeem is aangesloten, werkt niet. (0x1F) py .\vortexbot.py C:\Project\vortexbot.py:744: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. config = yaml.load(f)

DevTools listening on ws://127.0.0.1:52998/devtools/browser/37af66ba-00a4-4aa2-a35a-9da257735eca PS C:\Project> py .\vortexbot.py C:\Project\vortexbot.py:744: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. config = yaml.load(f)

DevTools listening on ws://127.0.0.1:59679/devtools/browser/f6e4503d-878e-4e3f-87ae-26f0e4e865f5 Traceback (most recent call last): File "C:\Project\vortexbot.py", line 813, in if any (player.items[ball] == None or player.items[ball] < config['restock'][ball]['min'] for ball in ['Poké Ball', 'Great Ball', 'Ultra Ball']): File "C:\Project\vortexbot.py", line 813, in if any (player.items[ball] == None or player.items[ball] < config['restock'][ball]['min'] for ball in ['Poké Ball', 'Great Ball', 'Ultra Ball']): KeyError: 'Poké Ball' PS C:\Project> [23956:22828:0820/174254.099:ERROR:device_event_log_impl.cc(214)] [17:42:54.099] USB: usb_device_handle_win.cc:1048 Failed to read descriptor from node connection: Een apparaat dat op het systeem is aangesloten, werkt niet. (0x1F) [23956:22828:0820/174254.103:ERROR:device_event_log_impl.cc(214)] [17:42:54.103] Bluetooth: bluetooth_adapter_winrt.cc:1073 Getting Default Adapter failed. [23956:22828:0820/174254.104:ERROR:device_event_log_impl.cc(214)] [17:42:54.105] USB: usb_device_handle_win.cc:1048 Failed to read descriptor from node connection: Een apparaat dat op het systeem is aangesloten, werkt niet. (0x1F)

tolgahantunc commented 3 years ago

Same here. I edited the code and made unavailable to run (the tool skips that part), so Key Error is not occurring and tool continues running. The bot move in a map automatically. However, this time I am getting a different error, the tool doesn't catch any pokemon automatically, you need to watch your screen and click Battle button manually when you want to catch a pokemon.

I am not saying that the fix I did is a REAL fix, we need help from the developer of the tool.

Cheers

Tishj commented 2 years ago

Key Error is occuring because of the python version most likely Just took a look at the bot yesterday, and it seems PokemonVortex have changed the code for the game in such a way that it's now impossible to retrieve 'encounter' information

In more detail: The Phaser object (in essence; the game engine they're using) has been wrapped in a Proxy that traps every 'get' call based on the type of variable that you try to retrieve:

So to retrieve the current encounter, we were using Phaser.Display.Canvas.CanvasPool.pool[2].parent.scene.encounterProfile.encounter to get the data, which now tells us nothing whatsoever

Tishj commented 2 years ago

TL;DR

The 'catch' functionality is dead :(

iambibhas commented 2 years ago

not the ideal solution, but one way to get out of this broken feature could be to hit the catch button on every encounter and then scrape the details. i know it breaks the smoothness of the whole functionality. But it's better than it not working at all. Apart from that, and running OCR on the map every second, can't think of anything else.