Giter VIP home page Giter VIP logo

vortex_recoil's Introduction

vortex_recoil

Crappy recoil reduction AutoHotKey script

Get AutoHotkey to use the script, or use handy compiled .exe.

Press F3 to turn on/off. When you hold left click, it will adjust your mouse downward based on the compensation value set. Press numpad +/- and you should see a tooltip pop up showing you what value your adjustment amount is at. Probably needs to be ~5 to have a real effect.

Run as administrator.

See script code below (Yes, I know there are certain things that could be better. Especially if you're familiar with AHK. Feel free to improve it.)

-Midwest Vortex


;#####################
;#     Commands     #
;#####################
SendMode Input 
SetWorkingDir %A_ScriptDir% 
#NoEnv
#InstallKeybdHook
#InstallMouseHook
SetDefaultMouseSpeed, 0
SetMouseDelay, -1
SetKeyDelay, -1
SetWinDelay, -1
SetBatchLines, -1
SetControlDelay -1
#MaxThreads 30
#MaxThreadsBuffer on
#KeyHistory 0
SendMode Input
#UseHook
 
;#####################
;#     Variables     #
;#####################
_nr := False
Compensation = 1
_compVal = 1 ; Compensation value
 
~LButton::norecoil()  ; Left Trigger
~F3:: ; Turn script on/off
 
_nr := ! _nr ; dont touch
return
 
norecoil()
{
    global 
    if _nr
    {
        Loop{
            if Compensation = 1 
            if GetKeyState("LButton", "P")
            {
                mouseXY(0, _compVal)
                Sleep 30
                mouseXY(0, _compVal)
                Sleep 50
            }
            else
            break
        } ;; loop
    } ;; if
} ;; norecoil()
 
 
 
;########################
;#     Compensation     #
;########################
 
mouseXY(x,y)
{
  DllCall("mouse_event",uint,1,int,x,int,y,uint,0,int,0)
}
 
 
;###################
;#     ToolTip     #
;###################
 
ToolTip(Text)
{
 
  ToolTip, %Text%, xPos, yPos
  SetTimer, RemoveToolTip, 1300
  return
  RemoveToolTip:
  SetTimer, RemoveToolTip, Off
  ToolTip
  Return
}
 
~NumpadAdd:: ; Adds compensation.
  _compVal := _compVal + 0.10
  ToolTip("Compensation " . _compVal)
Return
 
~NumpadSub:: ; Substracts compensation.
if _compVal > 0
{
  _compVal := _compVal - 0.10
  ToolTip("Compensation " . _compVal)
 }
return
;###################
;#  AimCorrection  #
;###################
 
~*$LButton::
Loop
{
GetKeyState, state, Lbutton, P
if state=u
break
mouseXY(1,1)
sleep 1
mouseXY(Slider,1)
sleep 1
mouseXY(Slider,-1)
sleep 1
mouseXY(-1,0)
sleep 1
mouseXY(Slider,1)
sleep 1
mouseXY(Slider,-1)
sleep 1
}
return
mouseXY(x,y)

vortex_recoil's People

Contributors

reflexial avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.