Comments (9)
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.
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.
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.
i dont know why....
[ 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.
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.
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.
I have downloaded the complete ZIP file.
from automated-holocure-fishing.
The script often fails, seemingly due to slow input. Holocure is being run in a 1280x720 windowed mode.
from automated-holocure-fishing.
Thank you so much. After adding an additional sleep on line 67, the script runs very smoothly.
from automated-holocure-fishing.
Related Issues (20)
- Using MSS for better performance. HOT 2
- Doesnt work in 2nd screen HOT 20
- Preload the needle images to dict and access them using needle and prepared as key
- Window handle invalid HOT 1
- more improvement if we can assure opencv is present HOT 5
- there is an issue with the code. HOT 2
- not an issue HOT 2
- i need help HOT 2
- Occasionally it stops HOT 2
- Screen Capture does not update HOT 5
- OpenCV error HOT 3
- blackscreen debug, no matches- Win11 32:9 5120x1440p HOT 3
- pressing enter only HOT 2
- False detect HOT 2
- bash: pip: command not found Issue HOT 1
- Stuck HOT 2
- cv2 and numpy HOT 1
- Color problems maybe ? HOT 8
- import Platform error HOT 2
- Error - could not find a version that satisfies the requirements. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from automated-holocure-fishing.