[AHK] No Recoil Script

Posts 1–7 of 7 · Page 1 of 1
[AHK] No Recoil Script
Hello MPGH!

So, recently I was looking for ahk no recoil script for cs:go but unfortunately only scripts that I found were pean's scripts....
I mean people don't even try to rewrite his script, they just copy-paste it.
I didn't like it so I started learning some basic stuff in ahk. I also don't like the idea to guess recoil's pattern coordinate so I will try to automatize this process somehow later on. For now, I used Recoil Patterns from the @jambon cru post. The only requirement is in-game sensitivity 3.09. When I solve the problem with recoil patterns I will find the way to make patterns with customizable sensitivity (I actually know the way but it's not the main priority for now). So far I came up with the following script.

Features:
AK47, M4A4, M4A1-S, Famas, Mac-10

There is also small but useful feature that shows you which pattern you activated but be careful if you playing on any clients that have a screenshot anti cheat system:


Code:
;In-game sensitivity 3.09
;DPI - any 

;Key binds
key_ak47:= "F1"
key_m4a4:= "F2"
key_m4a1s:= "F3"
key_famas:= "Numpad1"
key_mac10:= "Numpad3"
key_toggle_off:= "XButton1"

;Weapons' labels from 1 to 5 (so far)
weapon:= 0

;Weapons' Modifiers for the future update of the script
ak47_Modifier:= 1
m4a4_Modifier:= 1
m4a1s_Modifier:= 1
famas_Modifier:= 1
mac10_Modifier:= 1

;Weapons' Delays (Sleep) for the future update of the script 
ak47_Sleep:= rand_Sleep(30)
m4a4_Sleep:= rand_Sleep(30)
m4a1s_Sleep:= rand_Sleep(30)
famas_Sleep:= rand_Sleep(30)
mac10_Sleep:= rand_Sleep(30)

;Weapons' Patterns
ak47_Str:= "0,0;0,0;0,5;0,6;0,7;0,7;0,8;0,7;0,6;0,7;0,8;-2,8;1,7;3,7;6,7;6,7;6,7;0,7;1,7;2,7;2,8;2,8;2,9;-3,-4;-8,-1;-15,-1;-15,-1;-5,0;-5,0;-5,0;-5,0;-1,1;4,2;4,2;5,1;-5,1;-5,1;-10,1;-10,0;-5,0;-3,0;0,0;0,1;0,1;-2,1;6,1;8,2;14,2;15,2;1,2;1,2;1,1;1,1;5,1;6,1;6,1;6,1;6,-1;10,-1;10,-2;10,-3;0,-5;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;5,4;1,4;-2,3;-3,3;-5,3;-5,3;-5,3;-5,3;-5,3;-5,3;-5,2;0,1;0,0;1,1;2,0;3,1;4,1;4,1;3,1;3,1;3,1;5,1;5,1;5,1;5,-1;5,-1;0,-1;1,-1;3,-2;5,-2;0,0;0,2;0,2;0,2;0,1;-2,1;-3,1;-3,1;-3,0;-3,0;-2,0;-3,0;0,0;2,0;4,-1;4,-1;3,-2;3,-2;3,-2;3,-2;3,-1;3,-2;3,-1"
famas_Pattern:= StrSplit(famas_Str, ";")

mac10_Str:= "0,1;0,2;0,2;0,2;0,2;0,2;0,3;2,5;3,6;4,6;4,6;4,6;4,6;4,6;0,6;0,6;-2,6;-2,6;1,5;3,5;3,5;3,4;1,2;1,1;-2,2;-2,2;-2,2;-2,1;-1,1;-1,1;-1,0;-1,1;-3,1;-5,-1;-5,-1;-6,-1;-7,2;-8,2;-2,2;-2,0;-2,0;-1,0;-1,0;-1,0;0,0;0,0;0,0;0,0;-3,0;-5,0;-8,0;-4,0;0,0;3,0;6,0;6,0;6,0;6,0;3,0;2,0;3,0;5,0;4,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0"
mac10_Pattern:= StrSplit(mac10_Str, ";")

loop {
	if GetKeyState(key_toggle_off)
	{
		weapon:= 0
		Tooltip, RCS Off
		SetTimer, TooltipRemover, 500
	}
	if GetKeyState(key_ak47)
	{
		weapon:= 1
		Tooltip, AK-47
		SetTimer, TooltipRemover, 500
	}
	if GetKeyState(key_m4a4)
	{
		weapon:= 2
		Tooltip, M4A4
		SetTimer, TooltipRemover, 500
	}
	if GetKeyState(key_m4a1s)
	{
		weapon:= 3
		Tooltip, M4A1-S
		SetTimer, TooltipRemover, 500
	}
	if GetKeyState(key_famas)
	{
		weapon:= 4
		Tooltip, Famas
		SetTimer, TooltipRemover, 500
	}
	if GetKeyState(key_mac10)
	{
		weapon:= 5
		Tooltip, MAC10
		SetTimer, TooltipRemover, 500
	}
	
	;AK-47
	while (weapon == 1) and (GetKeyState("LButton","P"))
		script_Pattern(ak47_Pattern, ak47_Modifier, ak47_Sleep)
	;M4A4
	while (weapon == 2) and (GetKeyState("LButton","P"))
		script_Pattern(m4a4_Pattern, m4a4_Modifier, m4a4_Sleep)
	;M4A1-S
	while (weapon == 3) and (GetKeyState("LButton","P"))
		script_Pattern(m4a1s_Pattern, m4a1s_Modifier, m4a1s_Sleep)
	;Famas
	while (weapon == 4) and (GetKeyState("LButton","P"))
		script_Pattern(famas_Pattern, famas_Modifier, famas_Sleep)
	;MAC10
	while (weapon == 5) and (GetKeyState("LButton","P"))
		script_Pattern(mac10_Pattern, mac10_Modifier, mac10_Sleep)
}


;Script Functions
script_Pattern(weapon_Pattern, weapon_Modifier, weapon_Sleep)
{
	loop % weapon_Pattern.MaxIndex()
	{
		current_pattern_xy:= SubStr(weapon_Pattern[a_index],1)
		current_xy:= StrSplit(current_pattern_xy, ",")
		
		current_x:= current_xy.1 * weapon_Modifier
		current_y:= current_xy.2 * weapon_Modifier
		
		if (a_index == weapon_Pattern.MaxIndex())
			sleep 2000
		else 
		{
			DllCall("mouse_event", "UInt", 0x01, "UInt", current_x, "UInt", current_y)
			Sleep weapon_Sleep
			if !(GetKeyState("LButton", "P"))
				break
		}
	}
}

rand_Sleep(y) 
{
	x:= y-3
	Random, rand, %x%, %y%
	return %rand%
}

TooltipRemover:
	Tooltip
return
Best Regards,
Michael
this script is very good a pity to have so few weapons and the sense to be 3
why am i getting... syntax's error.
Hey dude, very amazing work with the script, but can u add the ump recoil too? I use the ump very often. can you add it please?
how to use the code? newbie here please help me
Quote Originally Posted by MichaelFortis View Post
Hello MPGH!

So, recently I was looking for ahk no recoil script for cs:go but unfortunately only scripts that I found were pean's scripts....
I mean people don't even try to rewrite his script, they just copy-paste it.
I didn't like it so I started learning some basic stuff in ahk. I also don't like the idea to guess recoil's pattern coordinate so I will try to automatize this process somehow later on. For now, I used Recoil Patterns from the @jambon cru post. The only requirement is in-game sensitivity 3.09. When I solve the problem with recoil patterns I will find the way to make patterns with customizable sensitivity (I actually know the way but it's not the main priority for now). So far I came up with the following script.

Features:
AK47, M4A4, M4A1-S, Famas, Mac-10

There is also small but useful feature that shows you which pattern you activated but be careful if you playing on any clients that have a screenshot anti cheat system:


Code:
;In-game sensitivity 3.09
;DPI - any 

;Key binds
key_ak47:= "F1"
key_m4a4:= "F2"
key_m4a1s:= "F3"
key_famas:= "Numpad1"
key_mac10:= "Numpad3"
key_toggle_off:= "XButton1"

;Weapons' labels from 1 to 5 (so far)
weapon:= 0

;Weapons' Modifiers for the future update of the script
ak47_Modifier:= 1
m4a4_Modifier:= 1
m4a1s_Modifier:= 1
famas_Modifier:= 1
mac10_Modifier:= 1

;Weapons' Delays (Sleep) for the future update of the script 
ak47_Sleep:= rand_Sleep(30)
m4a4_Sleep:= rand_Sleep(30)
m4a1s_Sleep:= rand_Sleep(30)
famas_Sleep:= rand_Sleep(30)
mac10_Sleep:= rand_Sleep(30)

;Weapons' Patterns
ak47_Str:= "0,0;0,0;0,5;0,6;0,7;0,7;0,8;0,7;0,6;0,7;0,8;-2,8;1,7;3,7;6,7;6,7;6,7;0,7;1,7;2,7;2,8;2,8;2,9;-3,-4;-8,-1;-15,-1;-15,-1;-5,0;-5,0;-5,0;-5,0;-1,1;4,2;4,2;5,1;-5,1;-5,1;-10,1;-10,0;-5,0;-3,0;0,0;0,1;0,1;-2,1;6,1;8,2;14,2;15,2;1,2;1,2;1,1;1,1;5,1;6,1;6,1;6,1;6,-1;10,-1;10,-2;10,-3;0,-5;0,0;-5,0;-5,0;-5,0;0,0;0,1;0,2;0,1;0,1;0,2;0,2;0,1;0,1;3,1;3,-1;3,-1;0,0;-3,0;-4,0;-4,0;-4,0;-4,0;-4,0;-7,0;-7,0;-8,0;-8,-2;-15,-3;-16,-5;-18,-7"
ak47_Pattern:= StrSplit(ak47_Str, ";")

m4a4_Str:= "0,0;0,0;0,4;0,5;0,6;0,7;0,5;0,2;0,5;0,2;0,5;0,6;-1,9;0,8;1,6;0,7;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famas_Pattern:= StrSplit(famas_Str, ";")

mac10_Str:= "0,1;0,2;0,2;0,2;0,2;0,2;0,3;2,5;3,6;4,6;4,6;4,6;4,6;4,6;0,6;0,6;-2,6;-2,6;1,5;3,5;3,5;3,4;1,2;1,1;-2,2;-2,2;-2,2;-2,1;-1,1;-1,1;-1,0;-1,1;-3,1;-5,-1;-5,-1;-6,-1;-7,2;-8,2;-2,2;-2,0;-2,0;-1,0;-1,0;-1,0;0,0;0,0;0,0;0,0;-3,0;-5,0;-8,0;-4,0;0,0;3,0;6,0;6,0;6,0;6,0;3,0;2,0;3,0;5,0;4,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0"
mac10_Pattern:= StrSplit(mac10_Str, ";")

loop {
	if GetKeyState(key_toggle_off)
	{
		weapon:= 0
		Tooltip, RCS Off
		SetTimer, TooltipRemover, 500
	}
	if GetKeyState(key_ak47)
	{
		weapon:= 1
		Tooltip, AK-47
		SetTimer, TooltipRemover, 500
	}
	if GetKeyState(key_m4a4)
	{
		weapon:= 2
		Tooltip, M4A4
		SetTimer, TooltipRemover, 500
	}
	if GetKeyState(key_m4a1s)
	{
		weapon:= 3
		Tooltip, M4A1-S
		SetTimer, TooltipRemover, 500
	}
	if GetKeyState(key_famas)
	{
		weapon:= 4
		Tooltip, Famas
		SetTimer, TooltipRemover, 500
	}
	if GetKeyState(key_mac10)
	{
		weapon:= 5
		Tooltip, MAC10
		SetTimer, TooltipRemover, 500
	}
	
	;AK-47
	while (weapon == 1) and (GetKeyState("LButton","P"))
		script_Pattern(ak47_Pattern, ak47_Modifier, ak47_Sleep)
	;M4A4
	while (weapon == 2) and (GetKeyState("LButton","P"))
		script_Pattern(m4a4_Pattern, m4a4_Modifier, m4a4_Sleep)
	;M4A1-S
	while (weapon == 3) and (GetKeyState("LButton","P"))
		script_Pattern(m4a1s_Pattern, m4a1s_Modifier, m4a1s_Sleep)
	;Famas
	while (weapon == 4) and (GetKeyState("LButton","P"))
		script_Pattern(famas_Pattern, famas_Modifier, famas_Sleep)
	;MAC10
	while (weapon == 5) and (GetKeyState("LButton","P"))
		script_Pattern(mac10_Pattern, mac10_Modifier, mac10_Sleep)
}


;Script Functions
script_Pattern(weapon_Pattern, weapon_Modifier, weapon_Sleep)
{
	loop % weapon_Pattern.MaxIndex()
	{
		current_pattern_xy:= SubStr(weapon_Pattern[a_index],1)
		current_xy:= StrSplit(current_pattern_xy, ",")
		
		current_x:= current_xy.1 * weapon_Modifier
		current_y:= current_xy.2 * weapon_Modifier
		
		if (a_index == weapon_Pattern.MaxIndex())
			sleep 2000
		else 
		{
			DllCall("mouse_event", "UInt", 0x01, "UInt", current_x, "UInt", current_y)
			Sleep weapon_Sleep
			if !(GetKeyState("LButton", "P"))
				break
		}
	}
}

rand_Sleep(y) 
{
	x:= y-3
	Random, rand, %x%, %y%
	return %rand%
}

TooltipRemover:
	Tooltip
return
Best Regards,
Michael
1)How did you learn AHK Scripting
2)How did you make the recoil compensate correctly With your sensitivity?
3)Even I want to make an ahk script just like this for my sensitivity You are my Senpai.
Please help me. This is my ID I want to talk to you senpai Alex Jefferson#5921 Please 🥺
Please Teach me Senpai
Hey The script is really good even though I had to make some changes to the weapon_modifier to make it work with my sensitivity.But The m4a4 recoil is not that good
I want TO know how you learnt to make a no recoil script and the steps and processes involved in it Please Even I want to make a no recoil script for my sensitivity I already gave you my ******* ID PPLease help me .
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us