vncsms / Metin2FishBot

A bot to fish in METIN2
33 stars 14 forks source link

Pydirectinput does not work? #8

Closed hrabosh closed 2 years ago

hrabosh commented 2 years ago

Hello, I tried to setup it up and it looks great but I think pydirectinput does not work. It does not add bait to rod and even not throw the bait. I also tried to pydirenctinput.keyDown('esc') as a test if the menu will be opened and nothing happened. Can you help me please?

vncsms commented 2 years ago

Can you check if the execution is running as admin? Because the only way to the bot send a command to the game is if is running as admin.

hrabosh commented 2 years ago

Yes, I run it as administrator and in task manager it has elevated attribute. I recorded short video, link here https://youtu.be/84pPn8q3lKE

vncsms commented 2 years ago

What is the name of your game? That shows on the window.

hrabosh commented 2 years ago

METIN2 same as in constants.py - It is official metin2 server. Now I have this error in console error

vncsms commented 2 years ago

Did you move the exe from dist folder to the main folder?

hrabosh commented 2 years ago

My god. I am so sorry. Now I have read the last sentence of the manual When it's end move the executable file in the folder dist to the project's root. Sorry and thank you for help. Really great job

vncsms commented 2 years ago

Did work?

hrabosh commented 2 years ago

Yes, it works on official metin2 server. Now I will try to run it on a private server but I have to modify the code a bit because fishing window has different coordinations. The second problem is that on the private server the timing between opening fishing windows is different. Also on the private server sometimes there must be 3 click on fish, sometimes 6 clicks on fish and sometimes 5 clicks on fish. So I have to modify the code to work properly on the private server

vncsms commented 2 years ago

Nice.