nopeanon / automated-holocure-fishing Goto Github PK
View Code? Open in Web Editor NEWAutomated Holocure Fishing Bot
License: GNU General Public License v3.0
Automated Holocure Fishing Bot
License: GNU General Public License v3.0
when i start downloading everything it says that there is an update to the program.
do i do it or no?
The first line of code seems to interfere with the Windows interpreter invocation:
#! C:\Users\minec\Documents\Python\holocure-fishing\fishing\Scripts\python.exe
I had to remove this line on my own in order to achieve proper execution.
References to image files:
"./img/ok.png" "./img/box.png"
For some unknown reason, I'm encountering errors on my computer. It's necessary to convert these references to absolute paths for them to work correctly. If anyone is aware of the underlying cause, please let me know.
Currently, the script's performance is unreliable, often failing to register the correct key inputs at the required times, resulting in undesirable outcomes.
I have a dual monitor setup and this doesn't work when I put my game on my 2nd monitor
scanning areas takes a bit of time and if the target is alread 90% on the scan region, it might miss and the next scan might miss the target completely when moving too fast
to make the scanning more reliable use a fast pixel scanner along the "line" to trigger the actual scan to have a higher hitrate and maybe even guess the speed of the pattern by calculating the distance between the pixel and the pattern location to perfectly hit the target with a second pixel trigger and timed delay, since we prepared the button we will only have to check for any change on the pixel and not check over a number of colors
Hi, I followed the video tutorial you have placed in the drive but I'm getting bash: pip: command not found error whenever I try to initiate the line. Anyway to solve this? I've already installed Python.
Hi,
The screen capture doesn't update when running. Restarting the script doesn't help. It update's when the program is closed or switching the capture to a different program. I tried reinstalling the environment and updating to python 3.11.5.
If I started the script before HoloCure, then it will capture something in the background.
I don't think the capture_game would leave any cache. But it seems like that way.
but kudos to @nopeAnon , @Hexus-One and everyone else contributing ... it works very well now
would have congratulated in any other way if possible :)
might wanna share how one could contact you for learning some more about what you have done there?
for my part pyautogui would be enough but the performance increase is great but i have a little trouble following the code in it's current state
this issue is based on the MSS branch
if we can detect if opencv is present there is another improvment to the image caching
pyscreeze will convert pillow images every time if they are not already converted
using pyautogui and subsequent pyscreeze, grabbing the image using the built in funtion already provides the adequate output format, when providing the images as pillow we waste that optimization
Thank you for the video tutorial, it worked perfectly until the last part, where after running
"$ python ./holocure_fishing.py"
Even though the file is obviously right there. About the only thing I can see is that the "\" and "/" are mixed, but the directory works fine, so I don't know why the inner folder is different.
it says cannot import name 'Platform' from 'platform'
When I am installing the code in Git like this:
$ pip install -r requirements.txt
I am getting this error:
bash: pip: command not found
I am probably just stupid or something so if I can have a small pointer, that would be appreciated :)
I have two problems.
first one is this "win32ui.error: The window handle is invalid." the code starts good but then shows some stuff then this idk what this means.
and the second one is that the script works like 60% of the time, it says that it did the key but it didn't do it in game and just misses the key completely then after missing the one it misses almost all of theme after.
Hello, sorry I am new to github. I had python installed already, but Windows couldn't find it, so I had to add my python.exe directory to environment variables: PATH. That worked okay, I got "pip" to work, but then when I try to run prepare.bat I get two errors.
The yellow error I tried to solve by doing "python -m pip install --upgrade pip". It seemed to update, I closed out the window, then ran it again and it still came up. Trying to upgrade pip again, it says "requirement already satisfied" and pip is already version 23.3.2.
As for the error in red I have no idea. Could you please help?
Hey! i know nothing about computers or coding in general, but following the drive video tutorial, i keep getting this error when trying to run the script
found keybinds
720p mode set
Traceback (most recent call last):
File "C:\Users\turle\Documents\AUTOFISHING\Automated-HoloCure-Fishing\holocure
_fishing.py", line 113, in
win = win32ui.CreateWindowFromHandle(hwndMain)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
win32ui.error: The window handle is invalid.
any idea why this could happen?
i think the problem was in A and D keys.. it's runnin, but somehow the game didn't respond to the command. i play on windowed 1280x720
can you make tutorial video so someone who doesn't know about python and coding like me can use it ?
Around 12.p.m, the program worked successfully, and the game did start to fish automatically, but there was a time response problem mentioned in other issues, but after the next update, the program did detect the symbol and successfully displayed wasd, but the game No response. I don't know why it happens.
So i tried a few of your methods and landed on VS Code, but it's just stuck in this state:
Then i tried to see what's wrong by changing Debug=False to Debug True... And it seemed to be working well, before i saw the Source window that popped out and turns out all it detected was the title screen
I tried restarting, turning off Nightlight, restored the keybinds to default but nothing seems to be working.... Do you have a solution for this? thanks
As the title says it isn't possible to use the script with Holocure on a second monitor.
Solution:
Add this bit of code on top
from PIL import ImageGrab
from functools import partial
ImageGrab.grab = partial(ImageGrab.grab, all_screens=True)
I am not sure if pyautogui would cache image.
If not this should save a little time for loading the needle images in every loop.
needles here include OK, box and arrow images.
The bot can't do good and miss some arrow what the probleme
Hi!
Thanks for a great project.
Unfortunately it didn't work for me out of the box :)
I'm on Windows 11 and with a big monitor (49 inch, 32:9 5120x1440p)
I've tried with different python versions and OpenCV versions too- as a lot of googling tells me that OpenCV 4.2 doesn't have any black screen issues.
Lies. All lies..
Not sure if my system specs matter or not, but I did see this was made for Windows 10.
Anyway, I enabled debug and I see the FPS counter, but the image capture has no relevant data in it.
It's just black.
When fishing there is no keybuttons pressed.
I know the output should show when buttons are pressed.
With regards to the black screen this post has helped me fix it.
BoboTiG/python-mss#180
The key is something to do with this line:
result = windll.user32.PrintWindow(hwnd, save_dc.GetSafeHdc(), 3)
I don't know if this has a performance impact, and to be honest I have no idea what this does.
However, changing the screencapture method out allowed the debug window to show some actual images of the game client.
After that I saw that nothing was triggering on the matchmaking.
I changed the screencapture to display the same coordinates that the matchmaking was using, and then it showed which area of the game the matchmaking was happening.
For me it seemed like the detection was happening on top of my monitor.
I checked older versions and found this "optimization" ;)
6ce9260
Reverting to the old matchmaking fixes the issue for me.
This could be related to my big monitor. Not sure.
I've tried different game resolutions as well, 480p, 720p and 1080p and they all work now.
I've got a running version now, which runs at about 30fps (rtx3080)
If I run the game in 640*480 then it's even faster and easily gets me to 250 consecutive fishes.
If I run it at higher resolutions I've found that at least one time I missed a button, but I still got the fish.
However, another problem is python crashes after 5-10 fish.
I believe it crashes because it fails to capture a screenshot - and then the code attempts to read/change a null variable.
I bet a simple test could allow such mishaps to occur without crashing, but I've never really touched Python before and it's not really something I am super interested in.
if (img has data){matchmaking}else{capture another screenshot}
Anyway, not wanting to dig further into the Python way of doing that I just modified the launch batch file.
:start
... python .....
goto start
The script starts up fast enough to continue fishing, and usually when it crashes it's when I'm waiting for a fish to bite - so... I guess it's good enough for me.
I'm not sure what the best way for me to share my code is, but let me know and I'll gladly do so if you want it.
Ps. Really great job here. Let me know if you want me to test something or want me to share my horrible code :)
Hello I have this problem when i try to use the code does anybody kbows why ?
PS C:\Users\kevin> & C:/Users/kevin/AppData/Local/Microsoft/WindowsApps/python3.11.exe c:/Users/kevin/OneDrive/Documents/Automated-HoloCure-Fishing-master/holocure_fishing.py
[ WARN:[email protected]] global loadsave.cpp:248 cv::findDecoder imread_('./img/360p/ok.png'): can't open/read file: check file path/integrity
[ WARN:[email protected]] global loadsave.cpp:248 cv::findDecoder imread_('./img/360p/space.png'): can't open/read file: check file path/integrity
[ WARN:[email protected]] global loadsave.cpp:248 cv::findDecoder imread_('./img/360p/left.png'): can't open/read file: check file path/integrity
[ WARN:[email protected]] global loadsave.cpp:248 cv::findDecoder imread_('./img/360p/right.png'): can't open/read file: check file path/integrity
[ WARN:[email protected]] global loadsave.cpp:248 cv::findDecoder imread_('./img/360p/up.png'): can't open/read file: check file path/integrity
[ WARN:[email protected]] global loadsave.cpp:248 cv::findDecoder imread_('./img/360p/down.png'): can't open/read file: check file path/integrity
Traceback (most recent call last):
File "c:\Users\kevin\OneDrive\Documents\Automated-HoloCure-Fishing-master\holocure_fishing.py", line 8, in
from imgproc import templates, masks
File "c:\Users\kevin\OneDrive\Documents\Automated-HoloCure-Fishing-master\imgproc.py", line 21, in
templates[name] = cv2.cvtColor(img, cv2.COLOR_BGRA2BGR)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cv2.error: OpenCV(4.8.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'
Hi! I have encountered a strange problem for that the script seems to be unable to Keydown any directional inputs besides enter, where the first try would result in KeyError, and then does not attempt at all afterwards, but only reacting to Fish Escape message / fish again
If the first key to hit was enter, it would register correctly, so it is only for the directional keys
saw this on github, i downloaded python on https://www.python.org/.
after opening the python file holocure_fishing it just closes right away.
how do i fix this
z key doesn't work, change to space instead, go from z to space, also very buggy on d and a
Getting an cv2.error: OpenCV(4.8.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor' when running the script, installed all the required files I believe.
I found (on Reddit) that pyautogui is too slow, and people use MSS for better performance
Every once and a while the program doesn't reenter fishing.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.