Skip to content

Instantly share code, notes, and snippets.

@AmJustS
Last active July 12, 2023 23:00
Show Gist options
  • Save AmJustS/d1eff6b0f78a48d99868c224e5dbbaaf to your computer and use it in GitHub Desktop.
Save AmJustS/d1eff6b0f78a48d99868c224e5dbbaaf to your computer and use it in GitHub Desktop.
Destiny 2 AHK 1.1 Fishing Macro (Press F2 to start/stop) - also need to download ShinsImageScanClass https://github.com/Spawnova/ShinsImageScanClass
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance Force
#Include ShinsImageScanClass.ahk
Scan := new ShinsImageScanClass
Pause
F2::
Pause
Toggle := !Toggle
if (Toggle)
{
SetTimer, PressE, 100
} else
{
SetTimer, PressE, Off
SetTimer, Scan, Off
}
return
PressE:
SetTimer, PressE, Off
Sleep, 2000
Send, {e Down}
Sleep, 2500
Send, {e Up}
SetTimer, Scan, 30
return
Scan:
If (scan.PixelCountregion(16777215,894,738,10,15) > 5)
{
SendInput, e
SetTimer, Scan, Off
Count += 1
; Anti AFK measures
If Count = 20
{
Sleep, 5000
SendInput, {a Down}
Sleep, 200
SendInput, {a Up}
Sleep, 200
SendInput, {d Down}
Sleep, 200
SendInput, {d Up}
Sleep, 200
SendInput, {LButton}
Count = 0
}
SetTimer, PressE, 100
}
Return
F4::
;ExitApp
@AmJustS
Copy link
Author

AmJustS commented Jun 5, 2023

1440p, changed it to 1080p and same issue. If I pause and unpause again it casts and doesn't catch.
Make sure your settings resolution is 1080p and so is your in-game resolution

image

Try opening it by right clicking and clicking open.
Show me what this screen is for you.

image

@woabii
Copy link

woabii commented Jun 5, 2023

I'm not able to even run the script, every time I start it shows this
ahkissues

@woabii
Copy link

woabii commented Jun 5, 2023

I've tried using V1.1 but it just gives this error
ahkissues2

@D2professionalfisherman
Copy link

ShinsImageScanClass.ahk

image

My nvidia is set to 1920x1080 and my ingame is 1920x1080. Still just press F2 to unpause, it casts and then dies.

image

Did I type this properly?

@hoduyanh5555
Copy link

Does it work on nessus ?

@AmJustS
Copy link
Author

AmJustS commented Jun 7, 2023

Does it work on nessus ?

No reason it wouldn't

@AmJustS
Copy link
Author

AmJustS commented Jun 7, 2023

ShinsImageScanClass.ahk

image

My nvidia is set to 1920x1080 and my ingame is 1920x1080. Still just press F2 to unpause, it casts and then dies.

image

Did I type this properly?

That looks good, it's just paused. You gotta unpause it.

@hoduyanh5555
Copy link

This require v1.1, after installed v1.1, it's require v2+(I installed both). This script don't want me run it

@woabii
Copy link

woabii commented Jun 8, 2023

yeah i'm having the same issue and they haven't replied yet

@Sniffx
Copy link

Sniffx commented Jun 12, 2023

It works superb, good job!!!

PS: To help figure if you are capturing the right zone of the screen (the "(E)" in "(E) Perfect Catch"), this function can be appended to the end of the script.
Cast manually ur fishing rod and when "(E) Perfect Catch" appears, press F6. It will create an image called DestinyFishingTest.png in "C:"
Replace the "10, 15" in the function below to something like "150, 150" to get a bigger captured image.

F6::
Path:= "C:\DestinyFishingTest"
Scan.SaveImage(Path,894,738,10,15)
return

@Sniffx
Copy link

Sniffx commented Jun 23, 2023

It works so well that I adapted it to use it in a small window + virtual control so you can use your PC while you fish:
https://gist.github.com/Sniffx/da7b3eb0e13211eb15a9114c89674ebe

@AmJustS
Copy link
Author

AmJustS commented Jun 23, 2023

It works so well that I adapted it to use it in a small window + virtual control so you can use your PC while you fish: https://gist.github.com/Sniffx/da7b3eb0e13211eb15a9114c89674ebe

Thank you :D, your code looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment