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
@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