Mouse movement adjuster - No Recoil FPS

Ask gaming related questions (AHK v1.1 and older)
One2Triple
Posts: 5
Joined: 12 Dec 2016, 15:43

Mouse movement adjuster - No Recoil FPS

12 Dec 2016, 15:57

Hi everyone! I'm very new to AHK. I've seen and used some PixelClickers (Finders) and some NoRecoil's made with AHK, and thought I would give it a try and try to make something of my own, I started reading documentation today, so I'm not going to include anything in here, just the bare idea that is on my head.

I want to create a script that searches for the cross hair in the game, after finding it (using a bmp image), I want the script to get the pixels movement when shooting. In this case, the game would be H1Z1. AR-15 has left-right recoil. AK47 has a V like recoil.

If there is a way for the script to detect the cross hair movement (when shooting, recoil is not screen centered). and adjust it self to the center of the screen.

Any guides and documentation is welcomed.

Thanks!
John
Posts: 78
Joined: 10 Apr 2014, 08:59

Re: Mouse movement adjuster - No Recoil FPS

13 Dec 2016, 08:55

'Dynamic' recoil correction isn't really within the realm of possibilities if you're just starting out (even if it'd be just following a moving crosshair). It's most definitely doable but, it's something that grows more complex the more 'problems' you solve so I'd skip that idea for now.

So, basic norecoil works like this, you except A amount of recoil on X axis and B amount of recoil on Y axis.
To 'correct' that, you move the cursor -A amount on X and -B on Y, i.e., if it moved 10 pixels up you move the cursor 10 pixels in the opposite direction.
Then repeat that.

For that you'll need to use a hotkey (when you start firing), variables (for the expected amounts of movement on x and y), mousemove and a loop (to keep on correcting).
Once you got that working you can start improving it to make it faster, more reliable, correct exponentially or regressively and so on.
Those all and so much more you'll find when you search "ahk no recoil" from google and go through the scripts.

Eventually ofc you'll be able to write the tiny aimbot (following the moving cursor), but ask here again when you get closer to that :)
One2Triple
Posts: 5
Joined: 12 Dec 2016, 15:43

Re: Mouse movement adjuster - No Recoil FPS

14 Dec 2016, 14:22

If you've got a starting point for me for 'Dinamic" recoil, or what I need to learn to create it, I welcome it.

I've been doing my homework :P After all yesterday (aprox. 4 of work, 6 of recorded game-play) I got this:

Code: Select all

XButton2::
Suspend
ToolTip % (A_IsSuspended) ? "AR15 OFF" : "AR15 ON", 936, 991
return

setKeyDelay, 50, 50
setMouseDelay, 50

$~lbutton::
	while (getKeyState("lbutton", "P"))
	{
	DllCall("mouse_event", "UInt", 0x0001, "UInt", -10, "UInt", 0, "UInt", 0, "UPtr", 0)
        Sleep, 50
	DllCall("mouse_event", "UInt", 0x0001, "UInt", 10, "UInt", 0, "UInt", 0, "UPtr", 0)
        Sleep, 50
	}
Return
In theory, this would work, for a Right-Left recoil. BUT as I recorded game-play I noticed that the gun actually has 2 possible recoil patterns, from bullet 1 to 30.
This is one of them
Ignore the up movement of the lines, movement is always sideways, but this way I could track it.

Image

Basically, AR15 flinch is: 4L, 3R, 3L, 1R, 2L, 2R, 3L, 1R, 2L, 5R, 3L, 2R, for a total of 30 bullets. Each moving a different amount of pixels in a time of 4secs.

My thoughts here ended at 3 am, after recording other instances of gameplay for the rest of the weapons.

Any tips?
John
Posts: 78
Joined: 10 Apr 2014, 08:59

Re: Mouse movement adjuster - No Recoil FPS

03 Jan 2017, 06:20

Hmm, was there 2 distinct 'chains' (e.g., always 4L, 3R followed by 3L) of movement which it repeated over and over or was it more random chain of random movements? Also, which part is the start of recoil? The light green at top or red at bottom?
If red at bottom right then that's a bit troublesome, if top left then could be workable.

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 69 guests