Last active
July 12, 2023 23:00
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
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
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
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.