# Forum > FPS > Overwatch Exploits|Hacks > Overwatch Chat > [How-To] New Way to Aimbot AHK PS4 Remote Play

## kaptainkook

Ok so I use to use AHK for Overwatch all the time and I eventually got banned....So fast foward to now and I started playing For Honor on PS4 well I saw someone made a Blocking AHK script so I setup on Remote Play and it works great so this gave me an Idea to try to use AHK On Overwatch for PS4 but for some reason I can not get it to work...Anyone know why? I think it might be my colors or something I am lost.... heres a vid showing how AHK works on PS4 remote play

----------


## kaptainkook

So I have gotten a Tiggerbot to work but right now still cant seem to make it move the mouse inside of the window...Any Ideas?

----------


## kaptainkook

So none of the AHK Aimbots will move my mouse....I thought it was a prblm with the software but I made a mouse moving macro and that worked inside the window..Any ideas willing to pay $$$

----------


## atmos

Did you change the window handle in the script to remote play's or is it still Overwatch's / "ahk_class TankWhateverItWas"?

----------


## kaptainkook

some scripts dont have that but i think the prblm is that remote play is only 720p...but i don't know what to change that to regardless  I used about every script i could think of the only one that I could get any mouse movement out of is AHK Color Aimbot but it just does a 360....

----------


## atmos

Right off the bat there is the black top/bot bars which mess up most if not all scripts, is there any option in the program to keep the window at native ps4 resolution/scaling?
Another possible issue could be win10 and/or your graphics card, since "PixelSearch" uses gdi+ and some graphics cards/drivers don't support it fully (no hardware acceleration). 
For now try resizing the remoteplay's window's clieant area to a true 16:9 resolution (e.g. 1024x576) and see how it goes.

----------


## KampfMuffin

Seems interesting. Also to note is that you can't report a player on PS4 as far as I know

----------


## kaptainkook

> Right off the bat there is the black top/bot bars which mess up most if not all scripts, is there any option in the program to keep the window at native ps4 resolution/scaling?
> Another possible issue could be win10 and/or your graphics card, since "PixelSearch" uses gdi+ and some graphics cards/drivers don't support it fully (no hardware acceleration). 
> For now try resizing the remoteplay's window's clieant area to a true 16:9 resolution (e.g. 1024x576) and see how it goes.


Yea I just tried that and it didnt help  :Frown:  I have used AHK for overwatch on the PC so I know I can do it on my computer...I have tested them with images and they work..I am just missing something and can't think of what it can be...

Yea if i get it to work I don't think I will ever be banned becuz there is no way to detect/report lol

----------


## KampfMuffin

> Yea I just tried that and it didnt help  I have used AHK for overwatch on the PC so I know I can do it on my computer...I have tested them with images and they work..I am just missing something and can't think of what it can be...
> 
> Yea if i get it to work I don't think I will ever be banned becuz there is no way to detect/report lol


Oh there is. And they would have a pretty easy time in doing so
What I'm talking about is a server side anticheat like Fairfight. They almost got rid of all cheaters in Bf1

----------


## atmos

You said you got one triggerbot to work, mind posting it here or sending it via pm?
Also while at it, try using the autoit window spy that comes with every ahk installation and getting the ahk_class of the remote play window.
From those we can do some further tests and in 10 years we'll have something functional, yay.

----------


## kaptainkook

> You said you got one triggerbot to work, mind posting it here or sending it via pm?
> Also while at it, try using the autoit window spy that comes with every ahk installation and getting the ahk_class of the remote play window.
> From those we can do some further tests and in 10 years we'll have something functional, yay.




this is the tiggerbot i got to work Small Triggerbot I created

----------


## atmos

Try this, you gotta change the div according to the comment, but this should give a clue on where to go next and put the script in the same folder as the triggerbot so it finds the 1.png


```
setbatchlines, -1
coordmode, pixel, client
a_class := "ahk_class SDL_app"
while (!winexist(a_class)) {
	tooltip, Run RemotePlayPC
	sleep, 100
}
hd := winexist(a_class)
GetClientSize(hd, w, h)
center_x := w/2
center_y := h/2
search_dim := 100
search_x := center_x-(dim/2)
search_y := center_y-(dim/2)
;;change stuff
div := 0.116 ;decrease if it's too erratic, increase if too slow
offset_x := 50 ;you probably have to change these
offset_y := 50 ;you probably have to change these
;;change stuff
MsgBox % "Press ok to 'start' bot.`n" a_class "|" hd "|" w "|" h "|" center_x "|" center_y "|" search_dim "|" search_x "|" search_y
loop {
	imagesearch, fx, fy, % search_x, % search_y, % search_x + search_dim, % search_x + search_dim, *80 1.png
	if (!errorlevel) {
		DllCall("mouse_event", "UInt", 0x01, "UInt", (cx-(fx-search_x))*div, "UInt", (cy-(fy-search_y))*div) ;;if this doesn't work, comment and uncomment next
		;~ mousemove, % (cx-(fx-search_x))*div, % (cy-(fy-search_y))*div, 0
	}
	;no need to sleep here since the imagesearch takes longer than 1 frame anyway
}
rshift::exitapp
GetClientSize(hwnd, ByRef w, ByRef h) {
    VarSetCapacity(rc, 16)
    DllCall("GetClientRect", "uint", hwnd, "uint", &rc)
    w := NumGet(rc, 8, "int")
    h := NumGet(rc, 12, "int")
}
```

----------


## kaptainkook

> Try this, you gotta change the div according to the comment, but this should give a clue on where to go next and put the script in the same folder as the triggerbot so it finds the 1.png
> 
> 
> ```
> setbatchlines, -1
> coordmode, pixel, client
> a_class := "ahk_class SDL_app"
> while (!winexist(a_class)) {
> 	tooltip, Run RemotePlayPC
> ...



Thanks for trying to help but this doesnt do anything ;(

----------


## atmos

Yup, seems like I goofed a bit, replace the 2 lines after "search_dim := 100" with


```
search_x := center_x-(search_dim/2)
search_y := center_y-(search_dim/2)
```

Also once you get the msgbox, make sure all the variables are displayed after the "Press ok..." text (since that'll tell if there is some other issues).

----------


## kaptainkook

> Yup, seems like I goofed a bit, replace the 2 lines after "search_dim := 100" with
> 
> 
> ```
> search_x := center_x-(search_dim/2)
> search_y := center_y-(search_dim/2)
> ```
> 
> Also once you get the msgbox, make sure all the variables are displayed after the "Press ok..." text (since that'll tell if there is some other issues).


Still not doing anything this is what the box pops up with

----------


## atmos

Alrighty, those values look fine so that wasn't the issue. 
Try this and see what happens if anything,


```
setbatchlines, -1
coordmode, pixel, client
a_class := "ahk_class SDL_app"
while (!winexist(a_class)) {
	tooltip, Run RemotePlayPC
	sleep, 100
}
winactivate, % a_class
hd := winexist(a_class)
GetClientSize(hd, w, h)
center_x := w/2
center_y := h/2
MsgBox DwmGetPixel
loop 50 { ;5 seconds of pixel values, value doesn't matter as long as it's changing
	tooltip, % DwmGetPixel(center_x+a_index, center_y, hd)
	sleep, 100
}
MsgBox PixelGetcolor
loop 50 { ;5 seconds of pixel values
	pixelgetcolor,f, % center_x+a_index, % center_y, rgb
	tooltip, % f
	sleep, 100
}
MsgBox DllCall mouse
loop 50 { ;5 seconds of jerking the mouse
	DllCall("mouse_event", "UInt", 0x01, "UInt", 20*((t:=!t)?1:-1), "UInt", 0)
	sleep, 100
		;~ mousemove, % (cx-(fx-search_x))*div, % (cy-(fy-search_y))*div, 0
}
MsgBox mousemove
loop 50 { ;5 seconds of jerking the mouse
	mousemove, % 20*((t:=!t)?1:-1), 0, 0
	sleep, 100
}
MsgBox done
exitapp
rshift::exitapp
```

2 different 'get pixels' that use different methods and 2 different mousemoves that use different methods.
See if and which work.

----------


## kaptainkook

> Alrighty, those values look fine so that wasn't the issue. 
> Try this and see what happens if anything,
> 
> 
> ```
> setbatchlines, -1
> coordmode, pixel, client
> a_class := "ahk_class SDL_app"
> while (!winexist(a_class)) {
> ...


This pops up trying to fix it myself

----------


## atmos

```
GetClientSize(hwnd, ByRef w, ByRef h) {
    VarSetCapacity(rc, 16)
    DllCall("GetClientRect", "uint", hwnd, "uint", &rc)
    w := NumGet(rc, 8, "int")
    h := NumGet(rc, 12, "int")
}
DwmGetPixel(x, y, hwnd) {
   hDC := DllCall("user32.dll\GetDCEx", "UInt", hwnd, "UInt", 0, "UInt", 1|2)
   pix := DllCall("gdi32.dll\GetPixel", "UInt", hDC, "Int", x, "Int", y, "UInt")
   DllCall("user32.dll\ReleaseDC", "UInt", hwnd, "UInt", hDC)
   return pix
}
```

Add these 2 after it, again goofed :'<

----------


## kaptainkook

> ```
> GetClientSize(hwnd, ByRef w, ByRef h) {
>     VarSetCapacity(rc, 16)
>     DllCall("GetClientRect", "uint", hwnd, "uint", &rc)
>     w := NumGet(rc, 8, "int")
>     h := NumGet(rc, 12, "int")
> }
> DwmGetPixel(x, y, hwnd) {
>    hDC := DllCall("user32.dll\GetDCEx", "UInt", hwnd, "UInt", 0, "UInt", 1|2)
> ...


The last thing just points my camera up and 360's

----------


## kaptainkook

I think the 1st mouse move is just moving the mouse a little wiggle basically

----------


## atmos

Did either of the pixel searches work? If yes then we might have cracked the mystery as on pc you had to divide the amount to move by million, but on ps4 (remoteplaypc) it seems like you might have to multiply by million.

----------


## kaptainkook

> Did either of the pixel searches work? If yes then we might have cracked the mystery as on pc you had to divide the amount to move by million, but on ps4 (remoteplaypc) it seems like you might have to multiply by million.



Yea they both did

----------


## atmos

In that case, all that you probably need to do with any aimbot is add another set of multipliers for x and y axis since the y axis is probably even more distorted on ps4.
So, just add these 2 to the top area of any ahk aimbot script you find


```
ps4_xMult := 2
ps4_yMult := 2
```

And in the script where it moves the mouse, whether it's with dllcall, mousemove or whatever wrap the variables/values in parentheses and multiply that value by the respective values above, like so


```
DllCall("mouse_event", "UInt", 0x01, "UInt", (x+sensitivity)*PS4_xMult, "UInt", (y+sensitivity)*PS4_yMult)
```

You'll definitely have to find the right multipliers for each and it'll be easier if you get one axis at a time by setting e.g. the "ps4_yMult" to 0 so you only get movement on x axis and vice versa.

(Probably  :Smile: )

----------


## kaptainkook

> In that case, all that you probably need to do with any aimbot is add another set of multipliers for x and y axis since the y axis is probably even more distorted on ps4.
> So, just add these 2 to the top area of any ahk aimbot script you find
> 
> 
> ```
> ps4_xMult := 2
> ps4_yMult := 2
> ```
> 
> ...




```
setbatchlines, -1
coordmode, pixel, client
a_class := "ahk_class SDL_app"
while (!winexist(a_class)) {
	tooltip, Run RemotePlayPC
	sleep, 100
}
hd := winexist(a_class)
GetClientSize(hd, w, h)
ps4_xMult := 2
ps4_yMult := 2
center_x := w/2
center_y := h/2
search_dim := 100
search_x := center_x-(search_dim/2)
search_y := center_y-(search_dim/2)
;;change stuff
div := 0.116 ;decrease if it's too erratic, increase if too slow
offset_x := 50 ;you probably have to change these
offset_y := 50 ;you probably have to change these
;;change stuff
MsgBox % "Press ok to 'start' bot.`n" a_class "|" hd "|" w "|" h "|" center_x "|" center_y "|" search_dim "|" search_x "|" search_y
loop {
	imagesearch, fx, fy, % search_x, % search_y, % search_x + search_dim, % search_x + search_dim, *80 1.png
	if (!errorlevel) {
		DllCall("mouse_event", "UInt", 0x01, "UInt", (x+sensitivity)*PS4_xMult, "UInt", (y+sensitivity)*PS4_yMult) ;;if this doesn't work, comment and uncomment next
		;~ mousemove, % (cx-(fx-search_x))*div, % (cy-(fy-search_y))*div, 0
	}
	;no need to sleep here since the imagesearch takes longer than 1 frame anyway
}
rshift::exitapp
GetClientSize(hwnd, ByRef w, ByRef h) {
    VarSetCapacity(rc, 16)
    DllCall("GetClientRect", "uint", hwnd, "uint", &rc)
    w := NumGet(rc, 8, "int")
    h := NumGet(rc, 12, "int")
}
```


I tired with that and it doesnt work...god I feel like we are so close!

----------


## kaptainkook

> In that case, all that you probably need to do with any aimbot is add another set of multipliers for x and y axis since the y axis is probably even more distorted on ps4.
> So, just add these 2 to the top area of any ahk aimbot script you find
> 
> 
> ```
> ps4_xMult := 2
> ps4_yMult := 2
> ```
> 
> ...




```
init:
#NoEnv
#Persistent
#SingleInstance, Force
#Persistent
#InstallKeybdHook
#UseHook
#KeyHistory, 0
#HotKeyInterval 1
#MaxHotkeysPerInterval 127
version = 2.0
traytip, Sharpshooter %version%, Running in background! Aimspot = Torso > Aim is staying on target, 5, 1
Menu, tray, NoStandard
Menu, tray, Tip, Sharpshooter %version%
Menu, tray, Add, Sharpshooter %version%, return
Menu, tray, Add
Menu, tray, Add, Help, info
Menu, tray, Add, Exit, exit
SetKeyDelay,-1, 8
SetControlDelay, -1
SetMouseDelay, -1
SetWinDelay,-1
SendMode, InputThenPlay
SetBatchLines,-1
ListLines, Off
CoordMode, Pixel, Screen, RGB
CoordMode, Mouse, Screen
PID := DllCall("GetCurrentProcessId")
Process, Priority, %PID%, High
EMCol := [0xF2361B, 0xEF3519, 0xEE4131, 0xED4233, 0xEE4031, 0xCF8790, 0xCF878F, 0xD92411, 0xDC2613, 0xA24D53, 0xA84547, 0xB25C62, 0xAB545B] ;Color to search for, hex!
ColVn := 50  ; Color Variations Allowed (higher number more colors allowed)
AntiShakeX := (A_ScreenWidth // 160)
AntiShakeY := (A_ScreenHeight // 128)
ZeroX := 960
ZeroY := 528  ; Higher The number the Higher The Shot
CFovX := 92   ; Fov in pixel around crosshair
CFovY := 92   ; Fov in pixel around crosshair
ScanL := ZeroX - CFovX
ScanT := ZeroY
ScanR := ZeroX + CFovX
ScanB := ZeroY + CFovY
NearAimScanL := ZeroX - AntiShakeX
NearAimScanT := ZeroY - AntiShakeY
NearAimScanR := ZeroX + AntiShakeX
NearAimScanB := ZeroY + AntiShakeY
Loop, {
KeyWait, LButton, D
PixelSearch, AimPixelX, AimPixelY, NearAimScanL, NearAimScanT, NearAimScanR, NearAimScanB, EMCol, ColVn, Fast RGB
if (!ErrorLevel=0) {
loop, 1 {
PixelSearch, AimPixelX, AimPixelY, ScanL, ScanT, ScanR, ScanB, EMCol, ColVn, Fast RGB
AimX := AimPixelX - ZeroX
AimY := AimPixelY - ZeroY
DirX := -1
DirY := -1
If ( AimX > 0 ) {
DirX := 1
}
If ( AimY > 0 ) {
DirY := 1
}
AimOffsetX := AimX * DirX
AimOffsetY := AimY * DirY
MoveX := Floor(( AimOffsetX ** ( 1 / 2 ))) * DirX
MoveY := Floor(( AimOffsetY ** ( 1 / 2 ))) * DirY
DllCall("mouse_event", uint, 1, int, (MoveX * 1.35)/ .555, int, MoveY, uint, 0, int, 0)    ; MoveX * "1.35" (how fast the aimbot aims)
}
}
}
Return
Pause:: pause
return:
goto, init
info:
msgbox, 0, Sharpshooter %version%, Made by erik96 `nGame must be running in borderless windowed mode.`nPress pause key to pause this program.`nLeft click automatically aims down target near the center of the screen.`nRecommended for near distance.`nTry 1920X1080 as resulution works best for me.
return
exit:
exitapp
```

Using this code it kinda works....

----------


## atmos

Try replacing the dllcall with this,


```
DllCall("mouse_event", uint, 1, int, (MoveX * 5)/ .555, int, MoveY, uint, 0, int, 0)
```

I assume it should spaz out, which would be good.

----------


## kaptainkook

> Try replacing the dllcall with this,
> 
> 
> ```
> DllCall("mouse_event", uint, 1, int, (MoveX * 5)/ .555, int, MoveY, uint, 0, int, 0)
> ```
> 
> I assume it should spaz out, which would be good.


yea it does

----------


## atmos

Then replace that with these 2 lines,


```
mult_x := 5 ;change this to lower, e.g. 4.5, 4, 3.5, 3, 2.5, etc etc.
DllCall("mouse_event", uint, 1, int, (MoveX * mult_x)/ .555, int, MoveY, uint, 0, int, 0)
```

and change the mult_x to lower values until it becomes stable.

----------


## kaptainkook

> Then replace that with these 2 lines,
> 
> 
> ```
> mult_x := 5 ;change this to lower, e.g. 4.5, 4, 3.5, 3, 2.5, etc etc.
> DllCall("mouse_event", uint, 1, int, (MoveX * mult_x)/ .555, int, MoveY, uint, 0, int, 0)
> ```
> 
> and change the mult_x to lower values until it becomes stable.


i put the /.555 in becuz anything lower or higher either does nothing or spazzes out

----------


## atmos

Hm, I guess remoteplaypc doesn't normalize/convert it to a value between -1+1 and instead interprets the mouse_event as a literal movement of that magnitude.
This shouldn't work very well, but will tell if that's the issue, replace the dllcall with this,


```
moveAmount := 1 ;try smaller values as well (0.1, 0.5, etc), iirc you could only feed ints, but worth a try with floats
movex:= round(movex)
while (movex-=moveAmount != 0) {
	DllCall("mouse_event", uint, 1, int, moveAmount, int, 0, uint, 0, int, 0)
        ;mousemove, % moveAmount,0,0,r ;try this one too, incase remoteplaypc will interpret it the way we'd like it to
	sleep, 40
}
```

----------


## kaptainkook

> Hm, I guess remoteplaypc doesn't normalize/convert it to a value between -1+1 and instead interprets the mouse_event as a literal movement of that magnitude.
> This shouldn't work very well, but will tell if that's the issue, replace the dllcall with this,
> 
> 
> ```
> moveAmount := 1 ;try smaller values as well (0.1, 0.5, etc), iirc you could only feed ints, but worth a try with floats
> movex:= round(movex)
> while (movex-=moveAmount != 0) {
> 	DllCall("mouse_event", uint, 1, int, moveAmount, int, 0, uint, 0, int, 0)
> ...


all this was doing was barely moving my mouse right (in game) by like a Millimeter

----------


## atmos

Did it do so gradually though or was it just 1 jerk of 1 millimeter? If the gradual part, then let's try to figure out how remoteplaypc translates mouse distance per axis to the normalized controller axis.
If not then the next thing I can think of to deal with the retardation would be just writing to memory and that might take a bit of time. Memory manipulations with remoteplaypc wouldn't be an issue though since it's entirely separate entity and we can do whatever we want with it.

----------


## kaptainkook

> Did it do so gradually though or was it just 1 jerk of 1 millimeter? If the gradual part, then let's try to figure out how remoteplaypc translates mouse distance per axis to the normalized controller axis.
> If not then the next thing I can think of to deal with the retardation would be just writing to memory and that might take a bit of time. Memory manipulations with remoteplaypc wouldn't be an issue though since it's entirely separate entity and we can do whatever we want with it.


yea it was gradual

----------


## atmos

muy cool, try swapping moveAmount to values greater than 1 and see if it moves more or the same and if more then see what's the upper boundary since I'm guessing some distance from center is translated as 'force' of 1 and -1 while distances between center and max distance are weighted with some value.
After the bounds are found, we'll need to figure out the max 'polling rate' and then it could/should be solved mostly.
Another test would be to run this, and see at which value exactly it's done a 360 spin and commenting the first loop and uncommenting the next to see the same for 180 degrees on yaxis


```
loop { ;360 spin on x-axis
        x := 1
	dllcall("mouse_event", uint, 1, int, x, int, 0, uint, 0, int, 0)
	sleep, 30
	tooltip % a_index
}
;~ loop { ;180 spin on y-axis, from facing looking down/ground to looking at sky/roof
        ;~ y := 1
	;~ dllcall("mouse_event", uint, 1, int, 0, int, y, uint, 0, int, 0)
	;~ sleep, 30
	;~ tooltip % a_index
;~ }
```

----------


## kaptainkook

> muy cool, try swapping moveAmount to values greater than 1 and see if it moves more or the same and if more then see what's the upper boundary since I'm guessing some distance from center is translated as 'force' of 1 and -1 while distances between center and max distance are weighted with some value.
> After the bounds are found, we'll need to figure out the max 'polling rate' and then it could/should be solved mostly.
> Another test would be to run this, and see at which value exactly it's done a 360 spin and commenting the first loop and uncommenting the next to see the same for 180 degrees on yaxis
> 
> 
> ```
> loop { ;360 spin on x-axis
>         x := 1
> 	dllcall("mouse_event", uint, 1, int, x, int, 0, uint, 0, int, 0)
> ...



the numbers increase but the mouse movements dont...around 50 with the old code makes it turn in circles... would it be easier if you remoted in?

----------


## Atchya

> muy cool, try swapping moveAmount to values greater than 1 and see if it moves more or the same and if more then see what's the upper boundary since I'm guessing some distance from center is translated as 'force' of 1 and -1 while distances between center and max distance are weighted with some value.
> After the bounds are found, we'll need to figure out the max 'polling rate' and then it could/should be solved mostly.
> Another test would be to run this, and see at which value exactly it's done a 360 spin and commenting the first loop and uncommenting the next to see the same for 180 degrees on yaxis
> 
> 
> ```
> loop { ;360 spin on x-axis
>         x := 1
> 	dllcall("mouse_event", uint, 1, int, x, int, 0, uint, 0, int, 0)
> ...


Does this work???????

----------


## lox090

Damn, this thread looked promising :x

----------


## glidarn

any update about this?

----------


## lox090

Any news on this?

----------


## Survey

Any updates?

----------

