It made me this autohotkey script to left click cows using "cow.png", never tested it. Doubt it would work just based off of that one image but still kinda funny how detailed it went when asked.
#NoEnv
CoordMode, Mouse, Relative
SetWorkingDir %A_ScriptDir%
LoadLibrary("libsikulixapi.dll")
global s, r
s := Sikulix_Start()
Random, randSleep1, 800, 2000
Random, randSleep2, 1500, 3000
Random, randSleep3, 2500, 5000
Random, randSleep4, 1000, 2000
Random, randSleep5, 500, 1500
Random, randSleep6, 800, 2500
Random, randSleep7, 2000, 4000
Loop
{
IfWinExist, runelite.exe
{
WinActivate, runelite.exe
Random, randMouseMove1, -10, 10
Random, randMouseMove2, -10, 10
MouseMove, randMouseMove1, randMouseMove2, 50, R
Sleep randSleep1
r := s.Find("cow.png")
If r <> 0
{
x := r.x + (r.w / 2)
y := r.y + (r.h / 2)
Random, randMouseMove3, -20, 20
Random, randMouseMove4, -20, 20
MouseMove, x + randMouseMove3, y + randMouseMove4, 50, R
Sleep randSleep2
Random, randClick1, 100, 300
Random, randClick2, 50, 150
MouseClick, left, randClick1, randClick2, 0, 0, R
Sleep randSleep3
Random, randMouseMove5, -15, 15
Random, randMouseMove6, -15, 15
MouseMove, randMouseMove5, randMouseMove6, 50, R
Random, randMouseMove7, -3, 3
Random, randMouseMove8, -3, 3
MouseMove, randMouseMove7, randMouseMove8, 50, R
Random, randMouseMove9, -5, 5
Random, randMouseMove10, -5, 5
MouseMove, randMouseMove9, randMouseMove10, 50, R
Random, randMouseMove11, -3, 3
Random, randMouseMove12, -3, 3
MouseMove, randMouseMove11, randMouseMove12, 50, R
Sleep randSleep4
Random, randMouseMove13, -10, 10
Random, randMouseMove14, -10, 10
MouseMove, randMouseMove13, randMouseMove14, 50, R
}
Sleep randSleep5
Random, randMouseMove15, -5, 5
Random, randMouseMove16, -5, 5
MouseMove, randMouseMove15, randMouseMove16, 50, R
Sleep randSleep6
Random, randMouseMove17, -10, 10
Random, randMouseMove18, -10, 10
MouseMove, randMouseMove17, randMouseMove18, 50, R
Sleep randSleep7
}
}
Sikulix_Stop(s)
LoadLibrary(name)
{
static file
if (file = "")
file := DllCall("kernel32\GetModuleHandle", "str", name, "ptr")
return file
}
Sikulix_Start()
{
Global s, r, hBmp
s := {}
s.RunCmd := Func("Sikulix_RunCmd")
s.Find := Func("Sikulix_Find")
s.Stop := Func("Sikulix_Stop")
VarSetCapacity(bi, 40, 0)
NumPut(40, bi, 0, "UInt") ;BITMAPINFOHEADER.biSize
NumPut(1, bi, 4, "Int") ;BITMAPINFOHEADER.biPlanes
NumPut(32, bi, 14, "UShort") ;BITMAPINFOHEADER.biBitCount
hBmp := CreateDIBSection(0, &bi, 0, &Bits, 0, 0)
hdc := CreateCompatibleDC(0)
SelectObject(hdc, hBmp)
ReleaseDC(0, hdc)
return s
}
Sikulix_Stop(s)
{
Global hBmp
DeleteObject(hBmp)
}
Sikulix_RunCmd(cmd)
{
run, %comspec% /c %cmd%, , hide
return ErrorLevel
}
Sikulix_Find(img, timeout:=0)
{
Global s, r, hBmp, Bits
if (IsObject(img))
{
if img.hWnd := WinExist(img.Title . " ahk_id " . img.hWnd)
img.Left := img.Top := 0
else
img := ImageCreate(img)
}
else if (InStr(img, "\"))
img := ImageCreate(img)
else if (!s.defImg || !s.defImg.Title)
{
MsgBox, 262180, Sikulix, Select default image (cancel to skip):
IfMsgBox OK
s.defImg := ImageSelect()
else
s.defImg := {}
}
if (IsObject(s.defImg))
img := ImageFind(s.defImg, timeout, 1)
if (!IsObject(img))
{
MsgBox, 16, Sikulix, Image not found:%A_Space%%A_Space%%A_Space%%A_Space%
return 0
}
VarSetCapacity(ar, 16, 0)
NumPut(16, ar, 0, "UInt") ;BITMAPFILEHEADER.bfSize
NumPut(19778, ar, 0, "UShort") ;BITMAPFILEHEADER.bfType
NumPut(54, ar, 2, "UInt") ;BITMAPFILEHEADER.bfOffBits
NumPut(40, ar, 14, "UInt") ;BITMAPINFOHEADER.biSize
NumPut(img.W, ar, 4, "Int") ;BITMAPINFOHEADER.biWidth
NumPut(img.H, ar, 8, "Int") ;BITMAPINFOHEADER.biHeight
NumPut(1, ar, 12, "UShort") ;BITMAPINFOHEADER.biPlanes
NumPut(32, ar, 14, "UShort") ;BITMAPINFOHEADER.biBitCount
NumPut(3, ar, 28, "UInt") ;BITMAPINFOHEADER.biCompression
hdc := CreateCompatibleDC(0)
hBmp1 := CreateDIBSection(0, &bi, 0, &Bits1, 0, 0)
SelectObject(hdc, hBmp)
BitBlt(hdc, 0, 0, img.W, img.H, img.hDC, 0, 0, SRCCOPY)
dc := CreateCompatibleDC(0)
SelectObject(dc, hBmp1)
c := DllCall("gdi32\GetDIBits", "ptr", hdc, "uint", 0, "uint", img.H, "ptr", &Bits1, "ptr", &bi, "uint", 0)
VarSetCapacity(bi1, 40, 0)
NumPut(40, bi1, 0, "UInt") ;BITMAPINFOHEADER.biSize
NumPut(1, bi1, 4, "Int") ;BITMAPINFOHEADER.biPlanes
NumPut(32, bi1, 14, "UShort") ;BITMAPINFOHEADER.biBitCount
hBmp2 := CreateDIBSection(0, &bi1, 0, &Bits2, 0, 0)
SelectObject(dc, hBmp2)
DllCall("gdi32\SetStretchBltMode", "ptr", dc, "int", 4)
StretchBlt(dc, 0, 0, img.W * 2, img.H * 2, hdc, 0, 0, img.W, img.H, SRCCOPY)
c := DllCall("gdi32\GetDIBits", "ptr", dc, "uint", 0, "uint", img.H * 2, "ptr", &Bits2, "ptr", &bi1, "uint", 0)
DllCall("gdi32\DeleteDC", "ptr", hdc)
DllCall("gdi32\DeleteDC", "ptr", dc)
DllCall("gdi32\DeleteObject", "ptr", hBmp1)
DllCall("gdi32\DeleteObject", "ptr", hBmp2)
row1 := img.H * 2 - 1, row2 := img.H * 2 - 2, top := img.H * 2
for y, x in img.TranspPos
DllCall("gdi32\SetPixelV", "ptr", img.hDC, "int", x, "int", y, "uint", 0xFFFFFF)
x := 0, y := 0
Loop % img.W * 2 * img.H * 2
{
if !(A_Index % (img.W * 2))
x := 0, y += 1
r1 := NumGet(Bits1, (row1 - y) * ((img.W * 2 * 32 + 31) >> 5) + (x * 32), "UInt")
r2 := NumGet(Bits2, (row2 - y) * ((img.W * 2 * 32 + 31) >> 5) + (x * 32), "UInt")
if (r1 & r2)
img.TranspPos.Insert(x, top - y)
x += 1
}
img.W := img.W * 2, img.H := img.H * 2
img.hDC := hdc
img.W := img.W * 2, img.H := img.H * 2
img.hDC := hdc
; Apply human-like anti-ban to the mouse clicks
Random, randDelay, % (2000 - 1000) + 1 + 1000 ; Random delay between 1 to 2 seconds
Sleep, randDelay
; Randomize the mouse movement within a range of 20 pixels to simulate human-like jittering
Random, randX, % 20
Random, randY, % 20
CoordMode, Mouse, Screen
MouseMove, img.TranspPos[1]+randX, img.TranspPos[2]+randY, 50
; Randomize the mouse click position within a range of 10 pixels
Random, randClickX, % 10
Random, randClickY, % 10
Click, % "Left", img.TranspPos[1]+randClickX, img.TranspPos[2]+randClickY, 1, 0
; Randomize the delay after each click to simulate human-like clicking pattern
Random, randClickDelay, % (500 - 200) + 1 + 200 ; Random delay between 0.2 to 0.5 seconds
Sleep, randClickDelay
; Randomize the mouse movement again after the click
Random, randMoveX, % 20
Random, randMoveY, % 20
CoordMode, Mouse, Screen
MouseMove, img.TranspPos[1]+randMoveX, img.TranspPos[2]+randMoveY, 50
Return
}