Advertisement
Guest User

no recoil script

a guest
Sep 16th, 2016
24,644
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. #NoEnv
  2. SendMode Input
  3.  
  4. _auto := true ;Toggle for the anti-recoil being on or off. default is on
  5.  
  6. ~LButton::autofire() ; When the LButton is pressed run the autofire() function
  7. !LButton::_auto := ! _auto ;Alt + LButton used to toggle the anti-recoil on and off
  8. F1::ExitApp ; F1 used to exit the ahk script file
  9.  
  10. ; autofire() function, name is misleading could easily be antiRecoil()
  11. autofire()
  12. {
  13. global _auto
  14. if _auto ; if _auto == true. i.e. is anti-recoil on?
  15. { ; anti-recoil on? If yes do this
  16. Loop ; Continuously loop until a 'break' command
  17. {
  18. if GetKeyState("LButton", "P") ; If LButton is pressed
  19. { ; LButton pressed? If yes do this
  20. Sleep 75 ; sleep for 85 milliseconds
  21. mouseXY(0, 70) ;Call the mouseXY() function which moves the mouse the specified distance. mouseXY( X, Y,)
  22. Sleep 45 ; sleep for 45milliseconds
  23. }
  24. else ;LButton pressed? If no do this, i.e. exit the loop
  25. break ;will stop the loop
  26. } ;; loop
  27. } ;; if
  28. } ;; autofire() ; anti-recoil on? If no do nothing
  29.  
  30. mouseXY(x,y)
  31. {
  32. DllCall("mouse_event",uint,1,int,x,int,y,uint,0,int,0) ; moves the mouse could easily be the built in autohotkey MouseMove, X, Y
  33. }
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement