-
-
Save A2TC-YT/4c2564442e2c60792e322a0dadfbec09 to your computer and use it in GitHub Desktop.
#SingleInstance, Force | |
SendMode Input | |
SetWorkingDir, %A_ScriptDir% | |
global 1080p := 0 | |
MsgBox, ***READ BEFORE USING***`nMake sure you are on 7 brightness, chromatic abberation is off, and hud opacity is max. Make sure you have interact bound to "E". Press F3 to start and F4 to stop. Does NOT work on Nessus. | |
InputBox, 1080p, Resolution, If your computer monitor resolution is 1440p enter 0`nIf your computer monitor is 1080p enter 1 | |
pToken := Gdip_Startup() | |
F3:: | |
{ | |
coords := "1243|971|37|21" | |
width := 37 | |
height := 21 | |
threshold := 0.16 | |
if (1080p) | |
{ | |
coords := "932|728|27|16" | |
width := 27 | |
height := 16 | |
threshold := 0.12 | |
} | |
Loop, | |
{ | |
loop, | |
{ | |
pBitmap := Gdip_BitmapFromScreen(coords) | |
pWhite := simpleColorCheck(pBitmap, width, height) | |
Gdip_DisposeImage(pBitmap) | |
if (pWhite >= threshold) | |
Break | |
} | |
Send, {e down} | |
Sleep, 800 | |
Send, {e Up} | |
DllCall("mouse_event",uint,1,int,-300,int,0,uint,0,int,0) | |
Sleep, 200 | |
DllCall("mouse_event",uint,1,int,300,int,0,uint,0,int,0) | |
Send, {d Down} | |
Sleep, 100 | |
Send, {d Up} | |
Sleep, 100 | |
Send, {a Down} | |
Sleep, 100 | |
Send, {a Up} | |
} | |
} | |
Return | |
simpleColorCheck(pBitmap, w, h) | |
{ | |
x := 0 | |
y := 0 | |
white := 0 | |
total := 0 | |
loop %h% | |
{ | |
loop %w% | |
{ | |
color := (Gdip_GetPixel(pBitmap, x, y) & 0x00F0F0F0) | |
if (color == 0xF0F0F0) | |
white += 1 | |
total += 1 | |
x+= 1 | |
} | |
x := 0 | |
y += 1 | |
} | |
pWhite := white/total | |
return pWhite | |
} | |
F4::Reload | |
#Include %A_ScriptDir%\Gdip_all.ahk |
Fine, guess I'll help you guys
Yea I’m slow too I guess cause I did exactly what was stated and this time drop the library file in the folder with the fishing script and same error. I’m not sure if the library script even runs for me since it’s not showing it’s running in taskbar. P.s. I’m new to all this
The script won't run if it catches an error, hence why it doesn't show up in your taskbar. To fix the error you're getting you need to copy the file path that leads to your Gdip_all.ahk and paste it after #include. It should look something like #include C:\users\username\whatever you saved it in\Gdip_all.ahk
For all those asking how to speed it up, you can't. The script is just slow. If you want something more reliable then try mine https://gist.github.com/AmJustS/d1eff6b0f78a48d99868c224e5dbbaaf
Thanks you A2TC-YT. I used your fishing macro and mixed it with your Tabbed-Out-AFK so I can fish in a tiny Destiny window while I do anything else in my PC, and it works in Nexus flawlessly just relaxing the threshold comparing condition!
Thanks you A2TC-YT. I used your fishing macro and mixed it with your Tabbed-Out-AFK so I can fish in a tiny Destiny window while I do anything else in my PC, and it works in Nexus flawlessly just relaxing the threshold comparing condition!
By 'relax' in this case, do you mean increase or decrease the value? (Or feel free to just share your threshold values outright, lol)
This is my version of A2TC-YT script. Maybe it is useful for somebody else: https://gist.github.com/Sniffx/ee5ae43d42894a6499c24b66586cc10c
This is my version of A2TC-YT script. Maybe it is useful for somebody else: https://gist.github.com/Sniffx/ee5ae43d42894a6499c24b66586cc10c
Works great! Thanks
I wonder if this works instead of a virt gamepad:
https://www.autohotkey.com/board/topic/7927-send-a-macro-to-an-inactive-window/
As far as I know/tried to do: You can't send keyboard commands to an inactive Destiny 2 window and you can't only capture a Destiny 2 window (it comes black. Whole monitor screen must be captured), so you can't interact with a non visible/non focused Destiny window.
Only way I know to interact with a non focused Destiny window (thanks to A2TC-YT scripts) is with virtual gamepads.
I guess that stuff can't be done to avoid cheats like aimbots.
ControlSend
Yeah, that's how its done, but I guess D2 ignores those
Hey, I've never programmed anything in my whole life so I have potentially dumb questions for you. Is the script supposed to be constantly sending D>A>E and mouse movements before the prompt to catch the fish has come up? Because that is what it's doing on my end. If I start the script and open my chat it types D>A>E about every second and the cursor does its movements. Or is this unintentional and a symptom of the macro detecting (pWhite >= threshold) constantly? I'm not sure why it would be detecting any white because my entire character is black without any white and I've tried standing in the water vs the dock and nothing works. I've set my game to 60 fps and recorded it and it catches before the prompt even pops up because it's constantly sending D>A>E. I've tried changing my monitor brightness and contrast in 1/10ths and my ingame from 7>1. Any insight beyond what you've previously posted or any troubleshooting you've tried yourself?
I've also tried changing threshold from like .06 to .2 (it stops working at .2) in increments of .025 and nothing has worked.