;2560x1440 monitor with Force Widescreen option enabled
Global $g_bPaused = False
Global $Color1 = 0x1675B0 ;Blue
Global $Color2 = 0xEA9305 ;Orange
HotKeySet( "{PAUSE}", "TogglePause") ;Pause the program
HotKeySet( "+!{ESC}", "Terminate") ;Close the program
While 1
FindPixels()
WEnd
Func FindPixels()
$Search1 = Pixelsearch(1429, 961, 2004, 990, $Color1, 100)
if @error = 0 then
$Search2 = Pixelsearch($Search1[0], 985, $Search1[0], 1011, $Color2, 50)
if @error = 0 then
Sleep(25) ;Delay before the space press. Delay depends on your excavation tool. This works for minigame difficulty decrease 3.
Send("{SPACE}")
Sleep(1000) ; Pause after success to prevent spamming spacebar
ENDIF
ENDIF
EndFunc
Func TogglePause()
$g_bPaused = Not $g_bPaused
While $g_bPaused
Sleep(100)
ToolTip('Script is "Paused"', 0, 0)
WEnd
ToolTip("")
EndFunc ;==>TogglePause
Had the same issue at first. It takes a short time to start up and it seems you have to press "Pause" once to activate it. I usually wait like 10 seconds, press "Pause" once and a few seconds later the tooltip appears in the top left. After that the script works.
And in case anybody here wants to make Herzlos95's script work for the old-school 1920x1080 (16:9) here are the values that work for me:
Code:
Func FindPixels()
$Search1 = Pixelsearch(741, 720, 1168, 739, $Color1, 100)
if @ error = 0 then
$Search2 = Pixelsearch($Search1[0], 744, $Search1[0], 760, $Color2, 50)
if @ error = 0 then
Sleep(25) ;Delay before the space press. Delay depends on your excavation tool. This works for minigame difficulty decrease 3.
Send("{SPACE}")
Sleep(1000) ; Pause after success to prevent spamming spacebar
ENDIF
ENDIF
EndFunc
Just replace the corresponding lines in his original code with the above ones. And remove the space between both @ error, had to add it so epvp doesn't fuck up the code.
The Sleep(25) works for my Minigame Difficulty -2 tool. If you have a -1 or -3 you might need to adjust that value up or down.
Again, credit goes to @, I just adjusted the values for my own use and wanted to share for others on 1920x1080.
worked like a charm, for those who dont have minigame difficulty on tool, chnage it to 5, worked like a charm to me
Oh, I just assumed you would be on borderless lol. Have been using AHK and AutoIt for so long that I didn't even think about asking if you are on borderless. It is basically required for any scripts to work.
Could you share you insight on how to fix this? I keep getting the same issue as you with just random space bar input and nothing else