Results 1 to 15 of 20

Threaded View

  1. #1
    wyvern1990's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Posts
    137
    Reputation
    10
    Thanks
    2,817

    Post Universal Recoil V3 AHK

    Hi All!!

    i "made" a anti recoil script with save function!

    Most o the code i used is from an other script, wich i did modify to my likings.

    Just copy the code below in AHK and you are ready to go!

    I changed the "delay" with RPM (Rounds Per Minute)

    Ex: RPM = 800
    3600000/RPM/60
    RPS = 75 milliseconds

    So every 75 millisecond the mouse is pulled X pixels

    Cheers!



    __________________________________________________ ________


    Code:
    ;-------------------------------------------------------------------------------
    ;	GENERAL SETTINGS
    ;-------------------------------------------------------------------------------
    
    #NoEnv
    #SingleInstance force
    #maxthreadsperhotkey 5
    #InstallKeybdHook
    #InstallMouseHook
    
    
    SendMode Input
    SetKeyDelay, 0
    SetMouseDelay, 0
    
    ;SetWorkingDir %A_ScriptDir%
    ;ScriptName := A_ScriptName
    ;StringReplace, ScriptName, ScriptName, .ahk,, All
    ;StringReplace, ScriptName, ScriptName, .exe,, All
    
    ;-------------------------------------------------------------------------------
    ;	Vars
    ;-------------------------------------------------------------------------------
    
    rpm = 800
    NoRecoil = 0
    enough = 0
    period = 6000
    ;xhair = 0
    
    
    PixelUp = pgup
    PixelDown = pgdn
    PixelLeft = del
    PixelRight = end
    ToggleNoRecoil = NumpadMult
    DelayUp = NumpadAdd
    DelayDown = NumpadSub
    PeriodUp = 
    PeriodDown = 
    LargeRecoilPreset = Numpad0
    SmallRecoilPreset = Numpad1 
    MoveY = LButton
    
    
    ;-------------------------------------------------------------------------------
    ;	Hotkeys
    ;-------------------------------------------------------------------------------
    
    Hotkey, ~*$%PixelLeft%, DoPixelLeft
    Hotkey, ~*$%PixelRight%, DoPixelRight
    Hotkey, ~*$%PixelUp%, DoPixelUp
    Hotkey, ~*$%PixelDown%, DoPixelDown
    HotKey, ~*$%ToggleNoRecoil%, DoToggleNoRecoil
    HotKey, ~*$%DelayUp%, DoDelayUp
    HotKey, ~*$%DelayDown%, DoDelayDown
    HotKey, ~*$%PeriodUp%, DoPeriodUp
    HotKey, ~*$%PeriodDown%, DoPeriodDown
    HotKey, ~*$%LargeRecoilPreset%, GetFromINI
    HotKey, ~*$%SmallRecoilPreset%, SaveToINI
    HotKey, ~*$%MoveY%, DoMoveY
    
    
    ;-------------------------------------------------------------------------------
    ;	Functions
    ;-------------------------------------------------------------------------------
    
    
    TipRPS(PopupText)
    {
    	Gui, Destroy
    	Gui, +AlwaysOnTop +ToolWindow -SysMenu -Caption
    	Gui, Color, 000000
    	WinSet, Transparent, 100
    	Gui, Font, s8, norm, Verdana
    	Gui, Add, Text, x5 y5 c00ff00, %PopupText%
    	Gui, Show, NoActivate X0 Y36
    	
    }
    
    
    TipOn(PopupText)
    {   
    	Gui, Destroy
    	Gui, +AlwaysOnTop +ToolWindow -SysMenu -Caption
    	Gui, Color, 000000
    	WinSet, Transparent, 100
    	Gui, Font, s8, norm, Verdana
    	Gui, Add, Text, x5 y5 c00ff00, %PopupText%
    	Gui, Show, NoActivate X0 Y18
    }
    
    TipOff(PopupText)
    {
    	Gui, Destroy 
    	Gui, +AlwaysOnTop +ToolWindow -SysMenu -Caption
    	Gui, Color, 000000
    	WinSet, Transparent, 100
    	Gui, Font, s8, norm, Verdana
    	Gui, Add, Text, x5 y5 cff0000, %PopupText%
    	Gui, Show, NoActivate X0 Y54
    }
    
    
    ;-------------------------------------------------------------------------------
    ;	Hotkey labels
    ;-------------------------------------------------------------------------------
    
    TipClear:
    	loop
    	{
    		Gui, Destroy
    		sleep 5000
    	}
    return
    
    DoToggleNoRecoil:
    	if NoRecoil < 1
    	{
    		NoRecoil += 1
    		if NoRecoil = 1
    		{
    			SoundBeep, 800, 200
    			TipOn("ON")
    		}
    	}
    	else
    	{
    		NoRecoil := 0
    		SoundBeep, 200, 100
    		SoundBeep, 200, 100
    		TipOff("OFF")
    	}
    	return
    
    DoPixelLeft:
            if pixelx < 10
                     pixelx += 1
            TipOn("Pixel X Is " pixelX)
            return
    
    DoPixelRight:
            if pixelx > -10
                     pixelx -= 1
            TipOn("Pixel X Is " pixelX)
            return
    
    DoPixelUp:
    	if pixely < 50
    		pixely += 1
    	TipOn("Pixel Y Is " pixelY)
    	return
    
    DoPixelDown:
    	if pixely > 0
    		pixely -= 1
    	TipOn("Pixel Y Is " pixelY)
    	return
    
    DoDelayUp:
    	if rpm > 500
    		rpm -= 10
    	TipRPS("RPM: " rpm "  " "RPS:"  f(rpm)) 
    	return
    
    DoDelayDown:
    	if rpm < 1500
    		rpm += 10
    	TipRPS("RPM: " rpm "  " "RPS:"  f(rpm) )
    	return
    
    DoPeriodUp:
    	if period > 100
    		period -= 100
    	TipOn("PERIOD IS " period)
    	return
    
    DoPeriodDown:
    	if period < 6000
    		period += 100
    	TipOn("PERIOD IS " period)
    	return
    
    GetFromINI:
    {
    InputBox, WeaponCall, WeaponCall, , Show, 200, 100
    if ErrorLevel	
    	
    return
    
    else
    IniRead,pixely,%A_WorkingDir%\config.ini,%WeaponCall%,Y
    IniRead,pixelx,%A_WorkingDir%\config.ini,%WeaponCall%,X
    IniRead,rpm,%A_WorkingDir%\config.ini,%WeaponCall%,rpm
    TipRPS(" Loaded!!    Weapon : " WeaponCall " " "Y : "pixely "  " "X : "pixelx "  "  "RPM : " rpm) 
    }
    sleep 4000
    Gui, destroy
    return
    ;put in name of weapon before write to INI, every preset can be saved seperate.
    
    SaveToINI:   
    {
    
    InputBox, WeaponSend, WeaponSend, , Show, 200, 100,
    if ErrorLevel	
    	
    return
    
    else
    IniWrite,%pixely%,%A_WorkingDir%\config.ini,%WeaponSend%,Y
    IniWrite,%pixelx%,%A_WorkingDir%\config.ini,%WeaponSend%,X
    IniWrite,%rpm%,%A_WorkingDir%\config.ini,%WeaponSend%,rpm
    TipRPS(" Saved!!    Weapon :" WeaponSend " " "Y :" pixely "  " "X : " pixelx "  "  "RPM :" rpm)
    }
    sleep 4000
    Gui, Destroy
    return
    
    
    
    
    DoMoveY: 
    	if NoRecoil = 1	
    		{
    			xhair = 0
    			enough = 0
    			GetKeyState, state, LButton, P
    			if state = U
    				return
    		    sleep % f(rpm)
    				loop
    				{
    					GetKeyState, state2, LButton, P
    					if state2 = U
    						break
    					if enough = 1
    						break
    					DllCall("mouse_event", uint, 1, int, pixelx, int, pixely, uint, 0, int, 0)
    					f(n)
                        {
    				
    					   return Round(3600000/n/60)
    					}
    					   sleep % f(rpm)	
    				}
    		}
    	return
    
    Interrupt:
    enough = 1
    	return
    Last edited by Mayion; 02-09-2015 at 09:18 PM.

Similar Threads

  1. [Help] How to fix this Recoil Reducer AHK script?
    By Feroztier in forum Counter-Strike 2 Coding & Resources
    Replies: 1
    Last Post: 03-20-2015, 03:03 AM
  2. [Release] Counter Strike: GO Recoil Reducer AHK
    By Kylux in forum Counter-Strike 2 Coding & Resources
    Replies: 40
    Last Post: 02-08-2015, 12:52 PM
  3. [Release] Universal Recoil Reducer v1.0
    By 63OR63 in forum Counter-Strike 2 Hacks
    Replies: 37
    Last Post: 07-08-2014, 08:02 PM
  4. [Release] Universal Recoil Reducer v2.0
    By 63OR63 in forum Counter-Strike 2 Hacks
    Replies: 346
    Last Post: 03-04-2014, 03:21 PM
  5. universal recoil reducer
    By sht2theheart in forum Call of Duty 4 - Modern Warfare (MW) Hacks
    Replies: 29
    Last Post: 04-27-2010, 11:35 AM

Tags for this Thread