Simple Image Search Bot

Posts 113 of 13 · Page 1 of 1
Simple Image Search Bot
As I can't post links I can't post a virus scan

Bot searches for img.bmp/img2.bmp on screen. Moves mouse to the offset location. img.bmp/img2.bmp are from the damaged healthbar. Hitscan works best.

It doesn't supersede user inputs so it's not a full on aimbot, it's closer to an aim-assist as your movements will mess with it

Should work at most resolutions, You may have to adjust the offsets with different aspect ratios.
Only works in Borderless-Windowed
Can work Windowed but then you have to make AHK find that window and derive all the values based off the already offset window, the
Can work if Gamma, Saturation, Hue, Colorblind settings are touched. Just have to figure out the proper color and change the .bmps

It's an AHK bot and if you don't want to get banned I suggest you obtain a File Size Pumper and Hash Changer to change the size the file and the hash of the file, Also just look to change the name of the file.exe and the window title. Could you program all that into the AHK program itself? Well yes, will I? No, it's a simple bot hell with a bit more logic one could use pixelSearch instead of imageSearch to get the same results. Only reason to use imageSearch is that it's dead simple to determine a near or far target. You could also program out the shakes but this is a simple bot that I think most people could understand. Plus it will continue to work unless blizzard changes the appearance of things, at which point you just need to change the pictures.

If you use this in mass will you get banned? Yes, Blizzard tends to use dictionary detection methods for most of their bans so anything popular gets cataloged and banned. They avoid heuristics for the most part because of false positives. You can again avoid that for the most part by simply changing the name of the file, size of the file, hash of the file etc on a routine basis. As this doesn't even acknowledge that Overwatch is running let alone touches it there is nothing too reliable for blizzard to look for outside of those things. Also just don't go full snap mode with ungodly aim and tracking because then you'll just get banned from reports.
Code:
#NoEnv
#SingleInstance force
#Persistent
#KeyHistory, 0
SetBatchLines,-1
ListLines, Off
SetFormat, IntegerFast, d

ScreenSizeW := A_ScreenWidth
ScreenSizeH := A_ScreenHeight
MiddleOfScreenX := A_ScreenWidth / 2
MiddleOfScreenY := A_ScreenHeight / 2
ShortOffsetY := round(ScreenSizeH*85/1080)
ShortOffsetX := round(ScreenSizeW*58/1920)
LongOffsetY := round(ScreenSizeH*66/1080)
LongOffsetX := round(ScreenSizeW*45/1920)
LeftBias := round(ScreenSizeW*40/1920)

guif:
Gui, Add, Text, x162 y9 w130 h20 , Run [F2]
Gui, Add, Text, x162 y29 w110 h20 , Restart Program [F3]
Gui, Add, GroupBox, x162 y59 w170 h80 , Aim Speed(0-1)
Gui, Add, GroupBox, x12 y9 w130 h50 , Selection
Gui, Add, Checkbox, x22 y29 w60 h20 vLMouse, LButton
Gui, Add, Checkbox, x82 y29 w60 h20 vRMouse, Rbutton
Gui, Add, Text, x22 y149 w90 h20 , LeftBias:(In Pixels)
Gui, Add, Edit, x112 y149 w30 h20 vLeftBias, %LeftBias%
Gui, Add, Text, x172 y79 w120 h20 , Short Range Sens:
Gui, Add, Edit, x292 y79 w30 h20 vShortRangeSens, 0.5
Gui, Add, Text, x172 y109 w110 h20 , Long Range Sens:
Gui, Add, Edit, x292 y109 w30 h20 vLongRangeSens, 0.5
Gui, Add, GroupBox, x12 y69 w140 h110 , Search Box Size(0-1)
Gui, Add, Text, x22 y89 w90 h20 , x-axis / of screen:
Gui, Add, Edit, x112 y89 w30 h20 vBoxSizeW, 0.46
Gui, Add, Text, x22 y119 w90 h20 , y-axis / of screen:
Gui, Add, Edit, x112 y119 w30 h20 vBoxSizeH, 0.2
Gui, Add, GroupBox, x12 y189 w160 h110 , Aim Offsets
Gui, Add, Text, x22 y209 w60 h20 , Short Range
Gui, Add, Text, x92 y229 w30 h20 , y-axis:
Gui, Add, Edit, x122 y229 w30 h20 vShortOffsetY, %ShortOffsetY%
Gui, Add, Text, x22 y229 w30 h20 , x-axis:
Gui, Add, Edit, x52 y229 w30 h20 vShortOffsetX, %ShortOffsetX%
Gui, Add, Text, x22 y249 w60 h20 , Long Range
Gui, Add, Text, x92 y269 w30 h20 , y-axis:
Gui, Add, Edit, x122 y269 w30 h20 vLongOffsetY, %LongOffsetY%
Gui, Add, Text, x22 y269 w30 h20 , x-axis:
Gui, Add, Edit, x52 y269 w30 h20 vLongOffsetX, %LongOffsetX%
Gui, Add, GroupBox, x162 y59 w170 h80 , Aim Speed(0-1)
Gui, Add, Text, x162 y140 w170 h190 , Box Size is a percentage of screen with 0.2 is 80 Percent of the screen, centered and 0.8 is 20 Percent of the Screen, centered. AimSpeed 0 is Nothing 1 is full snap to the target. Shakes will occur more if you Use a large search box. Health bars at the same height inside the search box causes mixed results. Especially with higher aim speeds. LeftBais Shifts the box more to the left as Healthbars drain from the right to left.
Gui, Show, w352 h332, Chrome
return

GuiClose:
ExitApp

F2::
Loop, 
{
	Gui, Submit, Nohide
	imageSearch, HealthBarLocationX, HealthBarLocationY, ScreenSizeW * BoxSizeW - LeftBias, ScreenSizeH * BoxSizeH, ScreenSizeW - ScreenSizeW * BoxSizeW, ScreenSizeH - ScreenSizeH * BoxSizeH,  img2.bmp
	AimX := HealthBarLocationX - MiddleOfScreenX + ShortOffsetX
	AimY := HealthBarLocationY - MiddleOfScreenY + ShortOffsetY
	MoveX := AimX * ShortRangeSens
	MoveY := AimY * ShortRangeSens
	if(ErrorLevel = 1)
	{
		imageSearch, HealthBarLocationX, HealthBarLocationY, ScreenSizeW * BoxSizeW - LeftBias, ScreenSizeH * BoxSizeH, ScreenSizeW - ScreenSizeW * BoxSizeW, ScreenSizeH - ScreenSizeH * BoxSizeH,  img.bmp
		AimX := HealthBarLocationX - MiddleOfScreenX + LongOffsetX
		AimY := HealthBarLocationY - MiddleOfScreenY + LongOffsetY
		MoveX := AimX * LongRangeSens
		MoveY := AimY * LongRangeSens
	}
	if(LMouse == 1)
	{
		GetKeyState, Mouse0, LButton, P
		MovingMouse(Mouse0, MoveX, MoveY)
	}
	if(RMouse == 1)
	{
		GetKeyState, Mouse0, RButton, P
		MovingMouse(Mouse0, MoveX, MoveY)
	}
}

MovingMouse(MouseState, XCord, YCord)
{
	If(MouseState == "D") 
	{
		DllCall("mouse_event", "uint", 0x0001, "int", XCord, "int", YCord, "uint", 0, "int", 0)
	}
}

F3::
Reload
return
img.bmp is a colored 1x4 255/0/19 [RGB]
img2.bmp is a colored 2x6 255/0/19 [RGB]
Chrome_mpgh.net.zip532 KB · 901 downloads Clean
Chrome.jpg60 KB · 684 downloads
How does it do an image search of moving characters (so health bar moves). Wouldn't it be too slow
Be about as fast and cpu intensive as any pixel/picture searching bot. Given how small the picture is and It's only looking for exact copies it's too slow for consistent headshots but good enough for body shots. Plus the way this is searching headshots would be a pipe dream, it only has 2 distances near and far. So going for body shots negates any distance issues.

Ofc the best way to make an aim bot is to read the memory and get play positions and do a little bit of trigonometry. This is just a simple ahk bot given how most public bots are way simpler pixel bots of the same nature that only have 1 distance(close up) i threw this together in an hour.
how can I change the window title?
Could you write a short tutorial on how to set it up? Sorry for the trouble.
Quote Originally Posted by tomaskil98 View Post
how can I change the window title?
"Gui, Show, w352 h250, Chrome" Change the chrome part

Quote Originally Posted by xXMythologyXx View Post
Could you write a short tutorial on how to set it up? Sorry for the trouble.
Google / youtube is your friend "How to compile autohotkey" "HashChanger" etc. Change the name of the exe to something else, change the windowtitle to something else etc. Also never run ahk in admin mode.

Anyways for those who are interested, this is slightly more agnostic now it should work in any windowed mode. Granted at the extreme small size I think the img search will break but going up in size probably wont break it.
It also wont start until Overwatch is the active window, somewhat needed to get the window size.
The script was also modified now the search box just grows to fill the screen if it doesn't find anything, makes it more cpu intensive but eliminates a little bit of the shakes, also ads a little bit of failure to track to eliminate some of the shakes as well. Pretty much just full aim assist.
Code:
#NoEnv
#SingleInstance force
#Persistent
#KeyHistory, 0
SetBatchLines,-1
ListLines, Off
SetFormat, IntegerFast, d
CoordMode, Mouse, Window
CoordMode, Pixel, Window

WinWaitActive, Overwatch
WinGetActiveStats, Title, ScreenSizeW, ScreenSizeH, ScreenXPos, ScreenYPos
MiddleOfScreenX := ScreenSizeW / 2
MiddleOfScreenY := ScreenSizeH / 2
ShortOffsetY := round(ScreenSizeH * 85 / 1080)
ShortOffsetX := round(ScreenSizeW * 58 / 1920)
LongOffsetY := round(ScreenSizeH * 66 / 1080)
LongOffsetX := round(ScreenSizeW * 44 / 1920)
FlickshotRange := round(ScreenSizeW * 175 / 1920)

guif:
Gui, Add, Text, x162 y9 w130 h20 , Run [F2]
Gui, Add, Text, x162 y29 w110 h20 , Restart Program [F3]
Gui, Add, GroupBox, x162 y59 w170 h80 , Aim Speed(0-1)
Gui, Add, GroupBox, x12 y9 w130 h50 , Selection
Gui, Add, Checkbox, x22 y29 w60 h20 vLMouse, LButton
Gui, Add, Checkbox, x82 y29 w60 h20 vRMouse, Rbutton
Gui, Add, Text, x172 y79 w120 h20 , Short Range Sens:
Gui, Add, Edit, x292 y79 w30 h20 vShortRangeSens, 0.4
Gui, Add, Text, x172 y109 w110 h20 , Long Range Sens:
Gui, Add, Edit, x292 y109 w30 h20 vLongRangeSens, 0.4
Gui, Add, GroupBox, x12 y59 w155 h110 , Aim Offsets
Gui, Add, Text, x22 y79 w60 h20 , Short Range
Gui, Add, Text, x92 y99 w30 h20 , y-axis:
Gui, Add, Edit, x122 y99 w30 h20 vShortOffsetY, %ShortOffsetY%
Gui, Add, Text, x22 y99 w30 h20 , x-axis:
Gui, Add, Edit, x52 y99 w30 h20 vShortOffsetX, %ShortOffsetX%
Gui, Add, Text, x22 y119 w60 h20 , Long Range
Gui, Add, Text, x92 y139 w30 h20 , y-axis:
Gui, Add, Edit, x122 y139 w30 h20 vLongOffsetY, %LongOffsetY%
Gui, Add, Text, x22 y139 w30 h20 , x-axis:
Gui, Add, Edit, x52 y139 w30 h20 vLongOffsetX, %LongOffsetX%
Gui, Add, GroupBox, x162 y59 w170 h80 , Aim Speed(0-1)
Gui, Add, Text, x162 y140 w170 h190 , Program starts when Overwatch is the active window. AimSpeed 0 is Nothing 1 is full snap to the target. Health bars at the same height inside the search box causes shakes.
Gui, Show, w352 h250, Chrome
return

GuiClose:
ExitApp

F2::
Loop, 
{
	Gui, Submit, Nohide
	SearchX := 0.46
	SearchY := 0.3
	if(LMouse == 1)
	{
		GetKeyState, Mouse0, LButton, P
		MovingMouse(Mouse0, MoveX, MoveY)
	}
	if(RMouse == 1)
	{
		GetKeyState, Mouse1, RButton, P
		MovingMouse(Mouse1, MoveX, MoveY)
	}
	while(Mouse0 == "D" || Mouse1 =="D")
	{
		imageSearch, HealthBarLocationX, HealthBarLocationY, ScreenSizeW * SearchX, ScreenSizeH * SearchY, ScreenSizeW - ScreenSizeW * SearchX, ScreenSizeH - ScreenSizeH * SearchY,  img2.bmp
		AimX := HealthBarLocationX - MiddleOfScreenX + ShortOffsetX
		AimY := HealthBarLocationY - MiddleOfScreenY + ShortOffsetY
		Random, rand, 0, 1
		If(rand == 0)
		{
			YSens := ShortRangeSens
		}
		Else
		{
			YSens := 0
		}
		If((AimX > FlickshotRange) || (AimX < -FlickshotRange))
		{
			If(rand == 1)
			{
				XSens := 1
			}
			else
			{
				XSens := 0
			}
		}
		Else
		{
			XSens := ShortRangeSens
		}
		MoveX := AimX * XSens
		MoveY := AimY * YSens
		if(ErrorLevel = 0)
		{
			break
		}
		if(ErrorLevel = 1)
		{
			imageSearch, HealthBarLocationX, HealthBarLocationY, ScreenSizeW * SearchX, ScreenSizeH * SearchY, ScreenSizeW - ScreenSizeW * SearchX, ScreenSizeH - ScreenSizeH * SearchY,  img.bmp
			AimX := HealthBarLocationX - MiddleOfScreenX + LongOffsetX
			AimY := HealthBarLocationY - MiddleOfScreenY + LongOffsetY
			If((AimX > FlickshotRange) || (AimX < -FlickshotRange))
			{
				If(rand == 1)
				{
					XSens := 1
				}
				else
				{
					XSens := 0
				}
			}
			Else
			{
				XSens := LongRangeSens
			}
			MoveX := AimX * XSens
			MoveY := AimY * LongRangeSens
			if(ErrorLevel = 0)
			{
				break
			}
		}
		if(SearchX < 0.1 OR SearchY < 0.1)
		{
			break
		}
		SearchX := SearchX - 0.05
		SearchY := SearchY - 0.05
		GetKeyState, Mouse1, RButton, P
		GetKeyState, Mouse0, LButton, P
		MoveX := 0
		MoveY := 0
	}

}

MovingMouse(MouseState, XCord, YCord)
{
	If(MouseState == "D") 
	{
		DllCall("mouse_event", "uint", 0x0001, "int", XCord, "int", YCord, "uint", 0, "int", 0)
	}
}

F3::
Reload
return
If I've messed with my contrast and brightness settings, will this still work or no?
How do I change the aim key to Caps Lock instead of R Button?
Is this still UD if I take all of the suggested precautionary measures?
Worked literally 20 seconds and then stopped working...
I pasted your code into an ahk script but it doesnt seem to be working when i press f2 i dont know why or what i did wrong
ALL THE AHK AIMBOT NOT WORKING YET WITH THE NEW PATCH!!!
This is an ahk aimbot, so working for 15-20 sec and then stop workin, like all the ahk aimbots!!!
Stop asking questions, ITS NOT WORKING!!!!
Posts 113 of 13 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?