Advertisement
twentyafterfour

GTA V Macros 4.21

May 5th, 2015
4,421
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;
  2. ;                                   GTA V Useful Macros v4.21
  3. ; AutoHotkey Version: v1.1.22.00
  4. ; Language:      English
  5. ; Platform:      Pirated Windows 8 Professional (64 bit)
  6. ; Author:        twentyafterfour
  7. ;
  8. ;  
  9. ; Script Function: Provides hotkeys for opening snack menu, equipping armor, entering passive mode, and retrieving vehicle. Keeps you from dying like a bitch during heists.
  10. ;          Allows you to be a cockbag in deathmatches.
  11. ;  
  12. ; General Notes: Works on foot and in vehicles. Does not work in safehouses where "Invite to apartment" option is present. I cleared the "." key from change radio station
  13. ;        in cars just to be safe. It seems that the interaction menu occasionally fails to stay open the very first time you use the hotkeys after loading into a
  14. ;        free-roam or heist. You can open the interaction menu or run a macro once to prevent this from happening again.
  15. ;
  16. ;        To change a hotkey for a macro or adjust delay settings simply replace the assigned value in the "Assign Hotkey and Delay" section with your new value.
  17. ;        A list of keynames for the non-alphanumeric can be found in the autohotkey help under the heading "Basic Usage and Syntax" with the name "Key List".
  18. ;        They can also be found at https://www.autohotkey.com/docs/KeyList.htm
  19. ;
  20. ;
  21. ; Tested May 5th 2015 with no major issues.
  22.  
  23. #NoEnv              ; Recommended for performance and compatibility with future AutoHotkey releases.
  24. SetWorkingDir %A_ScriptDir%     ; Ensures a consistent starting directory.
  25. #IfWinActive ahk_class grcWindow  ; Disables hotkeys when alt-tabbed or GTA is closed.
  26.  
  27.  
  28.  
  29. ;                               ---------Assign Hotkey and Delay Values---------
  30.  
  31. AutoHealthKey := "CapsLock"     ; Set keybinding for macro here. Automatic snacking. Eats 2 snacks from second snack slot.
  32. HealthKey := ","        ; Set keybinding for macro here. Open Snack menu.
  33. ArmorKey := "F1"        ; Set keybinding for macro here.
  34. PassiveKey := "F4"      ; Set keybinding for macro here.
  35. RetCarKey := "F3"       ; Set keybinding for macro here.
  36.  
  37. IntMenuDelay := 120     ; Sets value(ms) for additional delay after opening interaction menu.
  38. KeySendDelay := 25      ; Sets value(ms) for delay between send key commands.
  39. KeyPressDuration := 5       ; Sets value(ms) for duration each key press is held down.
  40.  
  41.  
  42.  
  43.  
  44. ;                                   ----Hotkey Code Section----
  45.  
  46.  
  47. Hotkey, %AutoHealthKey%, AutoHealth ; Assigns above value to hotkey. Do not change this line.
  48. Hotkey, %HealthKey%, Health ; Assigns above value to hotkey. Do not change this line.
  49. Hotkey, %ArmorKey%, Armor   ; Assigns above value to hotkey. Do not change this line.
  50. Hotkey, %PassiveKey%, Passive   ; Assigns above value to hotkey. Do not change this line.
  51. Hotkey, %RetCarKey%, RetCar ; Assigns above value to hotkey. Do not change this line.
  52. Return
  53.  
  54.  
  55. setkeydelay, KeySendDelay, KeyPressDuration         ; Sets delay(ms) between keystrokes issued. Arguments are delay between keystrokes and press duration, respectively.
  56.                             ; They might be able to go lower but these values are pretty fast and work reliably.
  57.  
  58.  
  59. ;                                     ----Macro Code Section----
  60.  
  61. ;                                        ----AutoHealth----
  62. ;                                   Eats snacks automatically
  63.  
  64.  
  65.  
  66. AutoHealth:             ; AutoHealth Macro
  67.            
  68. Send {m}            ; Opens Interaction Menu
  69. sleep, IntMenuDelay     ; Necessary delay to allow interaction menu to open properly while keeping keystroke delay short.
  70.                 ; Try to keep this value + the keystroke delay at least 80 ms for proper function.
  71.  
  72. Send {Down}{Enter}{Up}{Enter}   ; Keystrokes to open snack menu
  73. Send {Down}{Enter}{Enter}{m}    ; Keystrokes to eat 2 of second snack
  74.  
  75. return              ; Separates Hotkey Entries
  76.  
  77.  
  78.  
  79.  
  80.  
  81. ;                                        ----Health----
  82. ;                               Opens up snack menu for manual selection of snacks
  83.  
  84.  
  85.  
  86. Health:                 ; Health Macro
  87.            
  88. Send {m}            ; Opens Interaction Menu
  89. sleep, IntMenuDelay     ; Necessary delay to allow interaction menu to open properly while keeping keystroke delay short.
  90.                 ; Try to keep this value + the keystroke delay at least 80 ms for proper function.
  91.  
  92. Send {Down}{Enter}{Up}{Enter}   ; Keystrokes to open snack menu
  93.  
  94. return              ; Separates Hotkey Entries
  95.  
  96.  
  97. ;                                        ----Armor----
  98. ;                               Equips super heavy armor and exits menu automatically
  99.  
  100.  
  101.  
  102. Armor:             ; Armor Macro
  103. Send {m}            ; Opens Interaction Menu
  104. sleep, IntMenuDelay     ; Necessary delay to allow interaction menu to open properly while keeping keystroke delay short.
  105.                 ; Try to keep this value + the keystroke delay at least 80 ms for proper function.
  106.  
  107. Send {Down}{Enter}{Down}{Down}{Enter}       ; Opens Armor Menu
  108. Send {Down}{Down}{Down}{Down}{Enter}{m}     ; Equips super heavy armor and exits automatically. This line can be changed to pick different armor types.
  109.  
  110. return              ; Separates Hotkey Entries
  111.  
  112.                                        
  113.  
  114.  
  115.  
  116.  
  117. ;                                         ----Passive Mode----
  118. ;                                   Enters and exits passive mode
  119.  
  120.  
  121.  
  122. Passive:           ; Passive Macro
  123. Send {m}            ; Opens Interaction Menu
  124. sleep, IntMenuDelay     ; Necessary delay to allow interaction menu to open properly while keeping keystroke delay short.
  125.                 ; Try to keep this value + the keystroke delay at least 80 ms for proper function.
  126.  
  127.  
  128.  
  129. Send {Down}{Down}{Down}{Down}{Down}{Down}{Down}{Enter}{m}       ; Toggles passive mode and exits automatically
  130. return                                  ; Separates Hotkey Entries
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ;                                     ----Retrieve Personal Vehicle----
  137. ;                                   Requests delivery of personal vehicle          
  138.  
  139.  
  140.  
  141. RetCar:             ; Vehicle Request Macro
  142. Send {m}            ; Opens Interaction Menu
  143. sleep, IntMenuDelay     ; Necessary delay to allow interaction menu to open properly while keeping keystroke delay short.
  144.                 ; Try to keep this value + the keystroke delay at least 80 ms for proper function.
  145.  
  146. Send {Up}{Up}{Up}{Up}{Up}{Up}{Up}{Up}{Enter}{m}             ; Requests vehicle and exits automatically
  147. return                                  ; Separates Hotkey Entries
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement