For some reason, I didn't get the toggle functionality to work with this one, so there are separate "Pause/Unpause" and "Reload" hotkeys. You will need the images "Str.bmp" and "Per.bmp" in the same directory as the macro. They're attached to this page at the bottom.
Controls:
#IfWinActive, eGenesis Client
SendMode Input
SetDefaultMouseSpeed, 0
CoordMode, Mouse, Screen
WinActivate, eGenesis Client
WinGetPos,,, winWidth, winHeight, A
searchx1 := winWidth - 200
searchx2 := winWidth
^!+p::Pause
^!+r::Reload
^!n::
WinActivate, eGenesis Client
Gui, +AlwaysOnTop +ToolWindow
Gui, Add, Text,, Hover over the middle of your mine hole/entry, enter your minimal expected timer, press Enter
Gui, Add, Edit, vDelay, 4000
Gui, Add, Button, default gSetPoint, OK
Gui, Show
return
SetPoint:
Gui, Submit
Gui, Destroy
MouseGetPos, hx, hy
Gui, +AlwaysOnTop +ToolWindow
Gui, Add, Text,, And now how far you want to spread from that point randomly(producing a rectangle with the middle in the middle, yes).
Gui, Add, Button, default gSetSpread, OK
Gui, Show
return
SetSpread:
Gui, Submit
Gui, Destroy
MouseGetPos, sx, sy
distancex := abs(hx - sx)
distancey := abs(hy - sy)
;if (distancex > distancey)
; distancey := distancex
;else
; distancex := distancey
WinActivate, eGenesis Client
return
#MaxThreadsPerHotkey 3
^!m::
#MaxThreadsPerHotkey 1
if KeepRunning
{
KeepRunning := false
return
}
KeepRunning := true
Happened := false
loop
{
WinGetTitle, OtherWindow, A
WinActivate, eGenesis Client
loop {
ImageSearch,,, %searchx1%, 68, %searchx2%, 120, *2 Str.bmp
if (ErrorLevel = 1)
{
ImageSearch,,, %searchx1%, 68, %searchx2%, 120, *2 Per.bmp
if (ErrorLevel = 1)
break
}
else
sleep 25
}
MouseGetPos, mosx, mosy
loop { ;Randomize modifiers and distance from the middle.
Random, mod1, -1, 1
if (mod1 != 0)
{
loop{
Random, mod2, -1, 1
if (mod2 != 0)
break
}
break
}
}
Random, dx,, %distancex%
Random, dy,, %distancey%
px := hx + (mod1 * dx)
py := hy + (mod2 * dy)
MouseMove, %px%, %py%
sleep 50
Send w
sleep 100
ImageSearch,,, 1100, 68, 1284, 120, *2 Str.bmp
if (ErrorLevel = 1)
{
if (Happened = true)
{
sleep 200
Send {Enter}
Happened := false
continue
}
sleep 200
Send {Enter}
sleep 200
Send {Enter}
Happened := true ;To get out of possible loop
continue
}
MouseMove, %mosx%, %mosy%
WinActivate, %OtherWindow%
if not KeepRunning
break
sleep %Delay%
}
KeepRunning := false
return