Code Monkey home page Code Monkey logo

automated-holocure-fishing's People

Contributors

daecatt avatar hexus-one avatar mindforger avatar nopeanon avatar rastorguevia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

automated-holocure-fishing's Issues

i need help

when i start downloading everything it says that there is an update to the program.
do i do it or no?

Issues with Smooth Execution

The first line of code seems to interfere with the Windows interpreter invocation:
#! C:\Users\minec\Documents\Python\holocure-fishing\fishing\Scripts\python.exe
2023-08-20 112832
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.

suggestion: add pixel scanning after detecting to trigger scanning

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

Stuck

After installing everything I stand infront of the pond and open holocure_fishing.py and all it does is this, I tried to wait for a bit and nothing happens.
image

bash: pip: command not found Issue

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.

Screen Capture does not update

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.
image
If I started the script before HoloCure, then it will capture something in the background.
image
I don't think the capture_game would leave any cache. But it seems like that way.

not an issue

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

more improvement if we can assure opencv is present

this issue is based on the MSS branch

return Image.frombytes('RGB', im.size, im.bgra, 'raw', 'BGRX').tobytes()

if we can detect if opencv is present there is another improvment to the image caching

https://github.com/asweigart/pyscreeze/blob/eeca245a135cf171c163b3691300138518efa64e/pyscreeze/__init__.py#L197

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

Invalid format? Can't open/read file

Thank you for the video tutorial, it worked perfectly until the last part, where after running

"$ python ./holocure_fishing.py"

I got the following:
image

image

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.

Question

I have met the Requirements, but after opening holocure_fishing.py, it just jumped out of cmd and closed it very quickly, then opened holocure and tried to fish automatically, but it didn’t work.
image
And this is what VScode displayed.

pip: command not found or python was not found

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 :)

pressing enter only

i don't know why but my program just pressed enter button only, so it's not working
image

there is an issue with the code.

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.

Error - could not find a version that satisfies the requirements.

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.
image

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?

Window handle invalid

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?

A and D issue

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

game not responding issue

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.
image

False detect

So i tried a few of your methods and landed on VS Code, but it's just stuck in this state:
Screenshot (7589)
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
Screenshot (7590)
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

blackscreen debug, no matches- Win11 32:9 5120x1440p

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:

If Special K is running, this number is 3. If not, 1

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 :)

Color problems maybe ?

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'

KeyError for buttons except enter

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

KeyError

OpenCV error

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.

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.