Code Monkey home page Code Monkey logo

Comments (9)

sssnakeke avatar sssnakeke commented on June 12, 2024 3

It's working perfectly fine on my end. If you're having timing issues, that could be due to how time.sleep is set up when you first cloned it. I had to readjust the values myself since I was originally using a diff rod (the original values worked pretty well on the gold rod). I also noticed a bit of spam from the input itself when it would mistime itself, then it would try to correct itself, but by then the note would have passed, and you end up notelocking and failing the catch, so just add another sleep after button down at line 67

from automated-holocure-fishing.

nopeAnon avatar nopeAnon commented on June 12, 2024 1

This dictionary appears to have a naming error:

button = { 'spacebar':0x20, }

It should be corrected to:

button = { 'space':0x20, }

Fixed

so just add another sleep after button down at line 67

Ok, that fixes things by a lot.

from automated-holocure-fishing.

nopeAnon avatar nopeAnon commented on June 12, 2024

I forgot to remove that line. Its gone now. I have also changed the images to absolute path and finally made the program read your config file to get your key binds.
For the reliability, I have intensified the search area for now (searching for every pixel now). I'm still experimenting for the best way to detect it.

from automated-holocure-fishing.

SkyMistFA avatar SkyMistFA commented on June 12, 2024

i dont know why....
bug-2
[ WARN:[email protected]] global loadsave.cpp:248 cv::findDecoder imread_('./img/ok.png'): can't open/read file: check file path/integrity [ WARN:[email protected]] global loadsave.cException in thread Thread-1 (continue_fishing): pp:248 cv::findDecoder imread_('./img/box.png'): can't open/read file: check file path/integrity Traceback (most recent call last): File "C:\Users\skyof\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 1038, in _bootstrap_inner Traceback (most recent call last): File "e:\Automated\holocure_fishing.py", line 151, in <module> fishing() File "e:\Automated\holocure_fishing.py", line 91, in fishing self.run() hit_area = pyautogui.locateOnScreen("./img/box.png", confidence=0.6) File "C:\Users\skyof\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 975, in run ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\skyof\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyautogui\__init__.py", line 172, in wrapper self._target(*self._args, **self._kwargs) return wrappedFunction(*args, **kwargs) File "e:\Automated\holocure_fishing.py", line 76, in continue_fishing ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ if pyautogui.locateOnScreen("./img/ok.png", confidence=0.6): File "C:\Users\skyof\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyautogui\__init__.py", line 210, in locateOnScreen ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\skyof\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyautogui\__init__.py", line 172, in wrapper return pyscreeze.locateOnScreen(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ return wrappedFunction(*args, **kwargs) File "C:\Users\skyof\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyscreeze\__init__.py", line 378, in locateOnScreen ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\skyof\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyautogui\__init__.py", line 210, in locateOnScreen retVal = locate(image, screenshotIm, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\skyof\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyscreeze\__init__.py", line 356, in locate return pyscreeze.locateOnScreen(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ points = tuple(locateAll(needleImage, haystackImage, **kwargs)) File "C:\Users\skyof\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyscreeze\__init__.py", line 378, in locateOnScreen ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\skyof\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyscreeze\__init__.py", line 205, in _locateAll_opencv retVal = locate(image, screenshotIm, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\skyof\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyscreeze\__init__.py", line 356, in locate needleImage = _load_cv2(needleImage, grayscale) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\skyof\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyscreeze\__init__.py", line 167, in _load_cv2 points = tuple(locateAll(needleImage, haystackImage, **kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ raise IOError( File "C:\Users\skyof\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyscreeze\__init__.py", line 205, in _locateAll_opencv OSError: Failed to read ./img/box.png because file is missing, has improper permissions, or is an unsupported or invalid format needleImage = _load_cv2(needleImage, grayscale) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\skyof\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyscreeze\__init__.py", line 167, in _load_cv2 raise IOError( OSError: Failed to read ./img/ok.png because file is missing, has improper permissions, or is an unsupported or invalid format
However, after changing to absolute paths, no errors are encountered.

from automated-holocure-fishing.

nopeAnon avatar nopeAnon commented on June 12, 2024

Can you run dir. It seems like it can't find ok.png nor box.png. Have you properly downloaded/clone the project? Such as using git clone https://github.com/nopeAnon/Automated-HoloCure-Fishing.git or downloading it by zip

from automated-holocure-fishing.

SkyMistFA avatar SkyMistFA commented on June 12, 2024

This dictionary appears to have a naming error:

button = { 'spacebar':0x20, }

It should be corrected to:

button = { 'space':0x20, }

Otherwise, it will result in an error message:

Traceback (most recent call last): File "E:\Automated\holocure_fishing.py", line 151, in <module> fishing() File "E:\Automated\holocure_fishing.py", line 137, in fishing press(press_button) File "E:\Automated\holocure_fishing.py", line 69, in press win.SendMessage(win32con.WM_KEYDOWN, button[button_key], 0)

from automated-holocure-fishing.

SkyMistFA avatar SkyMistFA commented on June 12, 2024

I have downloaded the complete ZIP file.
bug-3

from automated-holocure-fishing.

SkyMistFA avatar SkyMistFA commented on June 12, 2024

The script often fails, seemingly due to slow input. Holocure is being run in a 1280x720 windowed mode.
fail

from automated-holocure-fishing.

SkyMistFA avatar SkyMistFA commented on June 12, 2024

Thank you so much. After adding an additional sleep on line 67, the script runs very smoothly.

from automated-holocure-fishing.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.