From 365b2985d9bd80a4e1419005177c76495b96dda7 Mon Sep 17 00:00:00 2001 From: vCybah <79271634+vCybah@users.noreply.github.com> Date: Mon, 17 Jul 2023 02:43:15 -0400 Subject: [PATCH 1/7] preparing for fix disabling everything to prepare to update/see what needs fixed --- .gitignore | 2 +- config.ahk | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 config.ahk diff --git a/.gitignore b/.gitignore index 0b0b21c..edc4a3c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ ps*.exe -config.ahk +# config.ahk custom.ahk diff --git a/config.ahk b/config.ahk new file mode 100644 index 0000000..168fc29 --- /dev/null +++ b/config.ahk @@ -0,0 +1,81 @@ +SnackMenuKey := "F24" ; Open Snack menu (+ = shift, rtfm). +AutoHealthKey := "F24" ; Automatic snacking. Eats 2 snacks from second snack slot. +ArmorMenuKey := "F24" ; Open Armor menu. +AutoArmorKey := "F24" ; Automatic armor equip (uses super heavy armor only). +RetrieveCarKey := "F24" ; Request currently active Personal Vehicle. +ToggleRadarKey := "F24" ; Toggle between extended and standar radar. +CEOBuzzardKey := "F24" ; Spawn free CEO buzzard +RequestSparrowKey := "F24" ; Call in your Sparrow (or whatever you last requested moon pool vehicle was) +ReturnSparrowKey := "F24" ; Return your Sparrow to the Kosatka +ForceDisconnectKey := "F12" ; Force disconnect by suspending process for 10s, requires pssuspend.exe +KillGameKey := "+F12" ; Kill game process, requires pskill.exe +ToggleVIPKey := "F24" ; Toggle VIP mode (required when VIP/CEO/MC). Won't have effect if using ManualInventoryLocation option. +ToggleCPHKey := "F24" ; Toggle Cayo Perico Heist Final mode (extra menu entry), also see DoToggleCPHWithVIP. Won't have effect if using ManualInventoryLocation option. +ToggleAFKKey := "End" ; Toggle AFK mode + +TogglePassiveKey := "F24" ; Toggle passive mode. +ToggleClickerKey := "F24" ; Toggle Clicker (XButton2 = Mouse5) +ToggleAutoHeliKey := "F24" ; Keeps throttle and pitch forward pressed, First take heli to sufficient height and then use this as autopilot +ChatSnippetsKey := "F24" ; Gives you a few text snippets to put in chat (chat must be already open) +CycleOutfitKey := "F24" ; Equip next/cycle through saved outfits. +RandomHeistKey := "F24" ; Chooses on-call random heist from phone options +EquipScarfKey := "F24" ; Equip first scarf (heist outfit glitch, see readme/misc). + +DialDialogKey := "F24" ; Call GUI with a list of almost all numbers +CallMechanicKey := "F24" ; Call Mechanic +CallPegasusKey := "F24" ; Call Pegasus +CallMerryweatherKey := "F24" ; Call Merryweather +CallInsuranceKey := "F24" ; Call Insurance +CallLesterKey := "F24" ; Call Lester +CallAssistantKey := "F24" ; Call Assistant + +CheckForUpdatesKey := "F24" ; Checks on startup by default, see DoCheckForUpdates option + + +; ManualInventoryLocation (manual inventory line calibration) +ManualInventoryLocation := false ; if true, use manual calibration of the inventory line in the interactive menu. IsCPHActive and IsVIPActive flags will be ignored. +InvLocation := 3 ; by default, this is the location of the inventory in the menu +AutoSnackLocation := 2 ; by default, this is the snack autosnack will select +; these keys will not be bound if ManualInventoryLocation is false +IncInvKey := "F24" ; for increasing the value of the inventory line +DecInvKey := "F24" ; for decreasing the value of the inventory line +IncSnackKey := "F24" ; for increasing the line for the snack selected by autosnacking +DecSnackKey := "F24" ; for decreasing the line for the snack selected by autosnacking + + +; Options (should be fine out of the box) +; WindowScale := 1.0 ; Change this to reflect your Windows display scale (e.g. set it to 3 if you have UI scale set to 300%) +; DoConfirmKill := true ; If true the KillGame action will ask for confirmation before killing the process +; DoConfirmDisconnect := true ; If true the ForceDisconnect action will ask for confirmation before suspending the process +; IntDisconnectDelay := 10 ; Amount of seconds to freeze the process for, 10 works fine +; DoToggleCPHWithVIP := false ; If true ToggleVIP will become a 3-way toggle (off/on/CayoPericoHeistFinal) +; DisableCapsOnAction := true ; Disable caps lock before executing macros, some macros might fail if caps lock is on +DoCheckForUpdates := false ; Check for script updates on startup (you can manually bind this instead or additionally) + + +; Delays (you normally don't want to change these, you can try to play with these values if you have a slow/fast PC) +; IntFocusDelay := 100 ; delay (in ms) after focussing game when AHK-GUI took focus. +; IntMenuDelay := 120 ; delay (in ms) after opening interaction menu. +; IntPhoneMenuDelay := 1850 ; delay (in ms) after opening phone menu. +; IntPhoneMenuDelay2 := 250 ; delay (in ms) after selecting phone menu entries. +; IntPhoneScrollDelay := 75 ; delay (in ms) between scrolls in the phone menu. +; IntKeySendDelay := 25 ; delay (in ms) delay between send key commands. +; IntKeyPressDuration := 5 ; duration (in ms) each key press is held down. + +; In case you changed your ingame bindings: +global IGB_Interaction := "m" +global IGB_Phone := "up" +global IGB_PhoneSpecial := "space" +global IGB_Pause := "p" +; the following refer to your phone binding and also apply to the interaction menu +global IGB_Up := "up" +global IGB_Down := "down" +global IGB_Left := "left" +global IGB_Right := "right" +global IGB_Enter := "enter" +; the following refer to movement (used for AFK) +global IGB_MoveLeft := "a" +global IGB_MoveRight := "d" +; aircraft/helicopter +global IGB_ThrottleUp := "XButton2" +global IGB_PitchForward := "w" From 86d0fbc55d9a4fea97cd80f7ff3b2f2c50240184 Mon Sep 17 00:00:00 2001 From: vCybah <79271634+vCybah@users.noreply.github.com> Date: Mon, 17 Jul 2023 03:08:27 -0400 Subject: [PATCH 2/7] fixed snack&armor menu macro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit due to the latest update, some menu items changed places: "The ‘SecuroServ’ and ‘Motorcycle Club’ Interaction Menu sections have been merged into one ‘Register as a Boss’ section " - fixes snack menu & armor menu macros --- .gitignore | 2 +- GTA V Online Macros.ahk | 8 ++++---- config.ahk | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index edc4a3c..0b0b21c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ ps*.exe -# config.ahk +config.ahk custom.ahk diff --git a/GTA V Online Macros.ahk b/GTA V Online Macros.ahk index bd98b8c..27cfb8c 100755 --- a/GTA V Online Macros.ahk +++ b/GTA V Online Macros.ahk @@ -314,15 +314,15 @@ openInteractionMenu(isVIPActive, isCPHActive, goingDown) { openSnackMenu() { global ManualInventoryLocation if !ManualInventoryLocation - Send {%IGB_Down%}{%IGB_Down%} - Send {%IGB_Enter%}{%IGB_Down%}{%IGB_Down%}{%IGB_Down%}{%IGB_Down%}{%IGB_Enter%} + Send {%IGB_Down%}{%IGB_Down%}{%IGB_Down%} + Send {%IGB_Enter%}{%IGB_Down%}{%IGB_Down%}{%IGB_Down%}{%IGB_Down%}{%IGB_Down%}{%IGB_Enter%} } openArmorMenu() { global ManualInventoryLocation if !ManualInventoryLocation - Send {%IGB_Down%}{%IGB_Down%} - Send {%IGB_Enter%}{%IGB_Down%}{%IGB_Down%}{%IGB_Down%}{%IGB_Enter%} + Send {%IGB_Down%}{%IGB_Down%}{%IGB_Down%} + Send {%IGB_Enter%}{%IGB_Down%}{%IGB_Down%}{%IGB_Down%}{%IGB_Down%}{%IGB_Enter%} } openOutfitMenu() { diff --git a/config.ahk b/config.ahk index 168fc29..6ebf6bf 100644 --- a/config.ahk +++ b/config.ahk @@ -1,6 +1,6 @@ -SnackMenuKey := "F24" ; Open Snack menu (+ = shift, rtfm). +SnackMenuKey := "1" ; Open Snack menu (+ = shift, rtfm). AutoHealthKey := "F24" ; Automatic snacking. Eats 2 snacks from second snack slot. -ArmorMenuKey := "F24" ; Open Armor menu. +ArmorMenuKey := "2" ; Open Armor menu. AutoArmorKey := "F24" ; Automatic armor equip (uses super heavy armor only). RetrieveCarKey := "F24" ; Request currently active Personal Vehicle. ToggleRadarKey := "F24" ; Toggle between extended and standar radar. From 223e7c666df4d3711a4310f6fa58b79f8d42894d Mon Sep 17 00:00:00 2001 From: vCybah <79271634+vCybah@users.noreply.github.com> Date: Mon, 17 Jul 2023 05:46:19 -0400 Subject: [PATCH 3/7] fixes most issues I found to be compatible with v1.67 Things that needed changed slightly and should now work on v1.67: - openOutfitMenu - ToggleRadar - ArmorMenu - SnackMenu - EquipScarf - RetrieveCar - RequestSparrow - ReturnSparrow --- GTA V Online Macros.ahk | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/GTA V Online Macros.ahk b/GTA V Online Macros.ahk index 27cfb8c..a78e8f3 100755 --- a/GTA V Online Macros.ahk +++ b/GTA V Online Macros.ahk @@ -83,7 +83,7 @@ CheckForUpdatesKey := "F24" ; Checks on startup by default, see DoCheckForUpda ; ManualInventoryLocation (manual inventory line calibration) ManualInventoryLocation := false ; if true, use manual calibration of the inventory line in the interactive menu. IsCPHActive and IsVIPActive flags will be ignored. -InvLocation := 3 ; by default, this is the location of the inventory in the menu +InvLocation := 4 ; by default, this is the location of the inventory in the menu AutoSnackLocation := 2 ; by default, this is the snack autosnack will select ; these keys will not be bound if ManualInventoryLocation is false IncInvKey := "NumpadAdd" ; for increasing the value of the inventory line @@ -301,9 +301,9 @@ openInteractionMenu(isVIPActive, isCPHActive, goingDown) { if (isCPHActive = 1) { TimesDown := 2 } - else if (isVIPActive = 1) { - TimesDown := 1 - } + ; else if (isVIPActive = 1) { + ; TimesDown := 1 + ; } } Loop %TimesDown% { Send {%IGB_Down%} @@ -329,7 +329,7 @@ openOutfitMenu() { global ManualInventoryLocation if !ManualInventoryLocation Send {%IGB_Down%}{%IGB_Down%} - Send {%IGB_Down%}{%IGB_Enter%}{%IGB_Down%}{%IGB_Down%}{%IGB_Down%} + Send {%IGB_Down%}{%IGB_Down%}{%IGB_Enter%}{%IGB_Down%}{%IGB_Down%}{%IGB_Down%} } openPhone() { @@ -598,7 +598,7 @@ ToggleRadar: sleep, IntPhoneMenuDelay2 ; Not using IGB_ variables on purpose as pause menu has static bindings - Send {Right}{Right}{Right}{Right} + Send {Right}{Right}{Right}{Right}{Right} Sleep IntPhoneMenuDelay2 * 2 Send {Enter} Sleep IntPhoneMenuDelay2 @@ -767,7 +767,7 @@ ArmorMenu: AutoArmor: openInteractionMenu(IsVIPActivated, IsCPHActivated, true) openArmorMenu() - Send {%IGB_Down%}{%IGB_Down%}{%IGB_Down%}{%IGB_Down%}{%IGB_Enter%}{%IGB_Interaction%} + Send {%IGB_Down% 4}{%IGB_Enter%}{%IGB_Interaction%} return ; Equips scarf to allow faster running with heist armor (see readme/misc) @@ -776,9 +776,9 @@ EquipScarf: if !ManualInventoryLocation Send {%IGB_Down%}{%IGB_Down%} ; Opens scarf menu - Send {%IGB_Down%}{%IGB_Enter%}{%IGB_Down%}{%IGB_Enter%} + Send {%IGB_Down%}{%IGB_Down%}{%IGB_Enter%}{%IGB_Down%}{%IGB_Enter%} ; equip scarf and exit menu. This line can be changed to pick different scarfs. - Send {%IGB_Up%}{%IGB_Up%}{%IGB_Up%}{%IGB_Up%}{%IGB_Right%}{%IGB_Interaction%} + Send {%IGB_Up% 4}{%IGB_Right%}{%IGB_Interaction%} return ; Cycle between your saved outfits @@ -799,7 +799,7 @@ RetrieveCar: openInteractionMenu(IsVIPActivated, IsCPHActivated, true) if !ManualInventoryLocation Send {%IGB_Down%}{%IGB_Down%} - Send {%IGB_Down%}{%IGB_Down%}{%IGB_Enter%}{%IGB_Enter%}{%IGB_Interaction%} + Send {%IGB_Down% 3}{%IGB_Enter%}{%IGB_Enter%}{%IGB_Interaction%} return ; Chooses on-call random heist from phone options @@ -824,7 +824,7 @@ RequestSparrow: openInteractionMenu(IsVIPActivated, IsCPHActivated, true) if !ManualInventoryLocation Send {%IGB_Down%}{%IGB_Down%} - Send {%IGB_Down%}{%IGB_Down%}{%IGB_Down%}{%IGB_Enter%}{%IGB_Up%}{%IGB_Enter%}{%IGB_Down%}{%IGB_Enter%} + Send {%IGB_Down% 4}{%IGB_Enter%}{%IGB_Up%}{%IGB_Up%}{%IGB_Enter%}{%IGB_Down%}{%IGB_Enter%} return ; Return your Sparrow to the Kosatka @@ -832,7 +832,7 @@ ReturnSparrow: openInteractionMenu(IsVIPActivated, IsCPHActivated, true) if !ManualInventoryLocation Send {%IGB_Down%}{%IGB_Down%} - Send {%IGB_Down%}{%IGB_Down%}{%IGB_Down%}{%IGB_Enter%}{%IGB_Up%}{%IGB_Enter%}{%IGB_Down%}{%IGB_Down%}{%IGB_Down%}{%IGB_Enter%}{%IGB_Up%}{%IGB_Up%}{%IGB_Enter%} + Send {%IGB_Down% 4}{%IGB_Enter%}{%IGB_Up%}{%IGB_Up%}{%IGB_Enter%}{%IGB_Down% 3}{%IGB_Enter%}{%IGB_Up%}{%IGB_Up%}{%IGB_Enter%} return ; Show a list of chat snippets to type out (chat must be opened) From 4edbf9a8a24f45e91ea831dfbf28b7910fb919ff Mon Sep 17 00:00:00 2001 From: vCybah <79271634+vCybah@users.noreply.github.com> Date: Mon, 17 Jul 2023 06:09:13 -0400 Subject: [PATCH 4/7] updated --- .gitignore | 1 + GTA V Online Macros.ahk | 2 +- README.md | 223 ++++------------------------------------ 3 files changed, 22 insertions(+), 204 deletions(-) diff --git a/.gitignore b/.gitignore index 0b0b21c..b55d08a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ ps*.exe config.ahk custom.ahk +config.ahk diff --git a/GTA V Online Macros.ahk b/GTA V Online Macros.ahk index a78e8f3..058af5b 100755 --- a/GTA V Online Macros.ahk +++ b/GTA V Online Macros.ahk @@ -1,4 +1,4 @@ -; v1.3.0 +; v1.3.1 ; ^ don't remove or alter this line (autoupdate) #MaxThreadsPerHotkey 2 diff --git a/README.md b/README.md index 6304f3e..81fd7d2 100644 --- a/README.md +++ b/README.md @@ -1,215 +1,32 @@ # GTA V Online AHK-Macros -Provides hotkeys for several useful features in GTA V:Online, see list further down. +All credit for this great piece of software goes to [2called-chaos](https://github.com/2called-chaos). +[Original Repo](https://github.com/2called-chaos/gtav-online-ahk) -**NOTE**: I tested this on my SC installation and with my account. If something doesn't work, ask (open issue)! - I evidently do heists most of the time so if you have ideas for useful CEO macros, let me know - or just send them in! +I would always be using this script until I just hopped back on GTA the other day and noticed the new update messed stuff up, so I figured I would do what I can to help out anyone who wants to keep using this until the official version gets fully updated by [2called-chaos](https://github.com/2called-chaos). :) +# Disclaimer +All I've tried to do with my fork is to make the script compatible with new GTA version 1.67, as the interaction menu changed slightly, making some of the macros no longer work. -## Requirements +I'm not very good with AHK but I think this should be a working version for GTA v1.67+, everything I use regularly worked with my testing however there are a few things I couldn't test such as: - * [AutoHotkey](https://www.autohotkey.com/) - * [pssuspend.exe and pskill.exe](https://docs.microsoft.com/en-us/sysinternals/downloads/pssuspend) in your path (for force disconnect and process killing, see instructions below) +- have not tested manual inv settings +- have not tested CPH mode +- not sure what needs to be done with VIP toggle/check now that interaction menu changed (so I just turned it off) +Things that needed changed slightly and should now work on v1.67: +- openOutfitMenu +- ToggleRadar +- ArmorMenu +- SnackMenu +- EquipScarf +- RetrieveCar +- RequestSparrow +- ReturnSparrow -## Installation - - * Download the .ahk file - * Open it in a text editor (e.g. notepad++ with AutoIT syntax highlighting) - * Consider creating a config.ahk and copy lines you want to change over there (so you can update, see Config further down) - * Change the hotkeys ([key list](https://www.autohotkey.com/docs/KeyList.htm)) and other options as you desire - * Doubleclick the .ahk file (open with AHK) Note: On Windows 10 right click -> run as admin might be necessary - - -## Installation (pssuspend.exe / pskill.exe) - -pssuspend.exe and pskill.exe are tools from the sysinternals collection. You can download the whole package (~3MB) [directly from Microsoft](https://docs.microsoft.com/en-us/sysinternals/downloads/pssuspend). -You can copy them all but we only need pssuspend and pskill so go ahead and extract/copy `pssuspend.exe` `pskill.exe` to ANY of the following: - -* into the same location where the .ahk file is -* C:\Windows -* C:\Windows\system32 - -**NOTE:** Start the pssuspend.exe AND pskill.exe once by double clicking on it and accept the license agreement or it will silently fail. - - -## Usage - -* On Windows 10 you might have to start the AHK script as administrator (right click -> Run as administator) -* You should run the game in window(ed fullscreen) or some functions will alt-tab you and will not work properly -* You will have to toggle VIP/CEO/MC mode manually since the interaction menu will be changed and most functions need to be aware of that. -* Doesn't work well inside apartments, maybe in CEO mode while not being one (menu changes) -* The interaction menu is often delayed the first time it's opened after loading screens or cutscenes. - Make sure to briefly open the interaction menu from time to time, escpecially after loading/cutscenes. - Alternatively you can increase the IntMenuDelay setting for more accuracy but making the process slower in general. -* Needless to say, don't give inputs while a macro is running or it might do random shit -* Sometimes you might find that the script doesn't appear to do anything. This might happen if you start - the game after the AHK script. Reloading it (right click on systray icon -> reload script) fixes that usually. - - -## Config - -You can (optionally) create a file `config.ahk` in the same location as the main script to overwrite settings without needing -to change the main file making updates easier. You can include any or all settings in the top of the script. - -```ahk -SnackMenuKey := "F12" ; change a single key bind - -; add a chat snippet -ArrayChatSnippets.push("Hey there!") - -; start with a clear list (discard default snippets by clearing array) -ArrayChatSnippets := [] -ArrayChatSnippets.push("The one and only snippet!") - -; custom keybind, see custom additions (if you want all your keybind settings in one place) -Hotkey, ^F6, ExampleMacro -``` - -## Custom additions - -You can (optionally) create a file `custom.ahk` in the same location as the main script to add custom macros without needing -to change the main file making updates easier. - -```ahk -; directly bind onto a key with double-colons -^F3:: - ; do something - return - -; AHK hotstring (typing ll will trigger this example) -::ex:: - goto ExampleMacro - return - -; target macro for the hotstring above -ExampleMacro: - SplashTextOn 250, 20, Foo, Bar - Sleep 1000 - SplashTextOff - return - -; hotstring an existing macro from the main file -::lester:: - goto CallLester - return - -; handy for when you modifying or adding stuff -::rel:: - SplashTextOn 250, 20, Reloading, Reloading script... - Sleep 1000 - Reload - return -``` - - -## Updates - -Since v1.2.0 the script includes a simple auto updater. By default it will check for a new version on GitHub every time you launch the script. -If a new (or actually different) version is found it will prompt you to proceed or cancel. -See the readme section about using config.ahk if you plan on changing settings as the update will replace the main script file! - -You can disable the automatic check and/or bind a manual check to a hotkey in the configuration (`DoCheckForUpdates` and `CheckForUpdatesKey`). -Note that the update check hotkey still only works when GTA is active. - - -## Will I get banned? - -I'm not aware of any bans issued by Rockstar following the usage of AHK-scripts. I personally use AHK-scripts within -GTA:O since 2014 and did not get banned. This is also not the only AHK-script available, I'm sure many are using them. -At the end it's your call but I'm 99% certain that it wont get you banned. - - -## Available macros - -I might forget to update so just check available keybinds :) - -* **SnackMenu** – Opens the snack menu -* **AutoHealth** – Consumes 2 snacks (from position 2) and closes menu -* **ArmorMenu** – Opens the armor menu -* **AutoArmor** – Consumes one super heavy armor and closes menu -* **RetrieveCar** – Retrieve your current active personal vehicle -* **TogglePassive** – Toggle passive mode -* **EquipScarf** – Equip scarf (heist outfit speed, see miscellaneous) -* **CycleOutfit** – Cycle through your saved outfits -* **ToggleVIP** – Toggle VIP(/CEO/MC) mode -* **ToggleCPH** – Toggle CPH (Cayo Perico Heist Final) mode -* **ToggleAFK** – Toggle AFK mode -* **ToggleClicker** – Toggle auto clicker -* **ToggleRadar** – Toggle extended radar -* **ToggleAutoHeli** – Keeps throttle and pitch forward pressed, poor mans autopilot -* **CEOBuzzard** – Spawn a free CEO Buzzard -* **RequestSparrow** – Call in your Sparrow (or whatever you last requested moon pool vehicle was) -* **ReturnSparrow**: – Return your Sparrow to the Kosatka -* **RandomHeist** – Join a random heist (on-call) solo aka don't invite friends in session -* **ForceDisconnect** – Force disconnect the game by freezing the process for 10 seconds (requires pssuspend.exe) -* **KillGame** – Kill the game process immediately (requires pskill.exe) -* **ChatSnippets** – Select a sentence from a configurable list which will get typed out in the game (chat should already be open) -* **DialDialog** – Select a number from a list and call it automatically (add items, change order or remove entries in config) -* **CheckForUpdates** – Manually check for updates - -The following calls can be directly bound to a hotkey (adding more is trivial): - -* **CallAssistant** -* **CallInsurance** -* **CallLester** -* **CallMechanic** -* **CallMerryweather** -* **CallPegasus** - -You can reach more (useful or useless contacts) by binding `DialDialog` - - -## Miscellaneous - -#### modifier keys for hotkeys - -If it's not clear enough from the key list. You can use [these symbols](https://autohotkey.com/docs/Hotkeys.htm#Symbols) in -combination with keys. For example `F1` to equip armor and `+F1` (shift+F1) to just open the menu. - -#### "cheat codes" - -With AHK's hotstrings you could achieve something like the good old cheat codes to trigger macros. -The issue is just to find words that won't trigger things like chat or the interaction menu. - -```ahk -::lester:: - GoTo CallLester - return -``` - -This would allow you (in theory) to type "lester" followed by a TAB to trigger the macro. But again, -`t` would open the chat usually and break the macro. - -#### Scarf / Heist outfit - -Yo, what's up with the scarf macro? Well if you have played normal heists with the heavy outfit once -you know that you are slower but take less damage with them. Given that you play with a player saved -heist outfit and own a scarf you can get rid of the armor and its speed effect while still keeping -the protective aspects of it. - -[![gif](https://i.imgur.com/YbD6MJa.gif)](https://imgur.com/OI1g0Xz) - -Just beware: Some cutscenes may remove the protective effect, quick-restart most certainly will remove -the effect and some checkpoints will give you the armor back (visibly) and some wont. If you get the armor -back you can repeat the scarf equip, otherwise no heist outfit for the rest of the mission. - -I use it for example for the Pacific finale and equip the scarf after leaving the bank. - - -## Contributing - - Contributions are very welcome! Either report errors, bugs and propose features or directly submit code: - - 1. Fork it - 2. Create your feature branch (`git checkout -b my-new-feature`) - 3. Commit your changes (`git commit -am 'Added some feature'`) - 4. Push to the branch (`git push origin my-new-feature`) - 5. Create new Pull Request - - Please use spaces for indentation and try to mimic the style off existing code :) +If there's anything else that needs fixed temporarily until 2called-chaos does, I possibly can just let me know. +Thank you again [2called-chaos](https://github.com/2called-chaos), for this and hope to see it still being updated in the future. ## Legal From daabd3bb5b5111bb30cf0ac1058eeb73b76629fe Mon Sep 17 00:00:00 2001 From: vCybah <79271634+vCybah@users.noreply.github.com> Date: Mon, 17 Jul 2023 06:10:07 -0400 Subject: [PATCH 5/7] Delete config.ahk --- config.ahk | 81 ------------------------------------------------------ 1 file changed, 81 deletions(-) delete mode 100644 config.ahk diff --git a/config.ahk b/config.ahk deleted file mode 100644 index 6ebf6bf..0000000 --- a/config.ahk +++ /dev/null @@ -1,81 +0,0 @@ -SnackMenuKey := "1" ; Open Snack menu (+ = shift, rtfm). -AutoHealthKey := "F24" ; Automatic snacking. Eats 2 snacks from second snack slot. -ArmorMenuKey := "2" ; Open Armor menu. -AutoArmorKey := "F24" ; Automatic armor equip (uses super heavy armor only). -RetrieveCarKey := "F24" ; Request currently active Personal Vehicle. -ToggleRadarKey := "F24" ; Toggle between extended and standar radar. -CEOBuzzardKey := "F24" ; Spawn free CEO buzzard -RequestSparrowKey := "F24" ; Call in your Sparrow (or whatever you last requested moon pool vehicle was) -ReturnSparrowKey := "F24" ; Return your Sparrow to the Kosatka -ForceDisconnectKey := "F12" ; Force disconnect by suspending process for 10s, requires pssuspend.exe -KillGameKey := "+F12" ; Kill game process, requires pskill.exe -ToggleVIPKey := "F24" ; Toggle VIP mode (required when VIP/CEO/MC). Won't have effect if using ManualInventoryLocation option. -ToggleCPHKey := "F24" ; Toggle Cayo Perico Heist Final mode (extra menu entry), also see DoToggleCPHWithVIP. Won't have effect if using ManualInventoryLocation option. -ToggleAFKKey := "End" ; Toggle AFK mode - -TogglePassiveKey := "F24" ; Toggle passive mode. -ToggleClickerKey := "F24" ; Toggle Clicker (XButton2 = Mouse5) -ToggleAutoHeliKey := "F24" ; Keeps throttle and pitch forward pressed, First take heli to sufficient height and then use this as autopilot -ChatSnippetsKey := "F24" ; Gives you a few text snippets to put in chat (chat must be already open) -CycleOutfitKey := "F24" ; Equip next/cycle through saved outfits. -RandomHeistKey := "F24" ; Chooses on-call random heist from phone options -EquipScarfKey := "F24" ; Equip first scarf (heist outfit glitch, see readme/misc). - -DialDialogKey := "F24" ; Call GUI with a list of almost all numbers -CallMechanicKey := "F24" ; Call Mechanic -CallPegasusKey := "F24" ; Call Pegasus -CallMerryweatherKey := "F24" ; Call Merryweather -CallInsuranceKey := "F24" ; Call Insurance -CallLesterKey := "F24" ; Call Lester -CallAssistantKey := "F24" ; Call Assistant - -CheckForUpdatesKey := "F24" ; Checks on startup by default, see DoCheckForUpdates option - - -; ManualInventoryLocation (manual inventory line calibration) -ManualInventoryLocation := false ; if true, use manual calibration of the inventory line in the interactive menu. IsCPHActive and IsVIPActive flags will be ignored. -InvLocation := 3 ; by default, this is the location of the inventory in the menu -AutoSnackLocation := 2 ; by default, this is the snack autosnack will select -; these keys will not be bound if ManualInventoryLocation is false -IncInvKey := "F24" ; for increasing the value of the inventory line -DecInvKey := "F24" ; for decreasing the value of the inventory line -IncSnackKey := "F24" ; for increasing the line for the snack selected by autosnacking -DecSnackKey := "F24" ; for decreasing the line for the snack selected by autosnacking - - -; Options (should be fine out of the box) -; WindowScale := 1.0 ; Change this to reflect your Windows display scale (e.g. set it to 3 if you have UI scale set to 300%) -; DoConfirmKill := true ; If true the KillGame action will ask for confirmation before killing the process -; DoConfirmDisconnect := true ; If true the ForceDisconnect action will ask for confirmation before suspending the process -; IntDisconnectDelay := 10 ; Amount of seconds to freeze the process for, 10 works fine -; DoToggleCPHWithVIP := false ; If true ToggleVIP will become a 3-way toggle (off/on/CayoPericoHeistFinal) -; DisableCapsOnAction := true ; Disable caps lock before executing macros, some macros might fail if caps lock is on -DoCheckForUpdates := false ; Check for script updates on startup (you can manually bind this instead or additionally) - - -; Delays (you normally don't want to change these, you can try to play with these values if you have a slow/fast PC) -; IntFocusDelay := 100 ; delay (in ms) after focussing game when AHK-GUI took focus. -; IntMenuDelay := 120 ; delay (in ms) after opening interaction menu. -; IntPhoneMenuDelay := 1850 ; delay (in ms) after opening phone menu. -; IntPhoneMenuDelay2 := 250 ; delay (in ms) after selecting phone menu entries. -; IntPhoneScrollDelay := 75 ; delay (in ms) between scrolls in the phone menu. -; IntKeySendDelay := 25 ; delay (in ms) delay between send key commands. -; IntKeyPressDuration := 5 ; duration (in ms) each key press is held down. - -; In case you changed your ingame bindings: -global IGB_Interaction := "m" -global IGB_Phone := "up" -global IGB_PhoneSpecial := "space" -global IGB_Pause := "p" -; the following refer to your phone binding and also apply to the interaction menu -global IGB_Up := "up" -global IGB_Down := "down" -global IGB_Left := "left" -global IGB_Right := "right" -global IGB_Enter := "enter" -; the following refer to movement (used for AFK) -global IGB_MoveLeft := "a" -global IGB_MoveRight := "d" -; aircraft/helicopter -global IGB_ThrottleUp := "XButton2" -global IGB_PitchForward := "w" From 4263d4d7341d6318449a0a3a4d2093df080e52cc Mon Sep 17 00:00:00 2001 From: vCybah <79271634+vCybah@users.noreply.github.com> Date: Wed, 2 Aug 2023 12:13:34 -0400 Subject: [PATCH 6/7] remove readme & extra gitignore line --- .gitignore | 1 - README.md | 33 --------------------------------- 2 files changed, 34 deletions(-) delete mode 100644 README.md diff --git a/.gitignore b/.gitignore index b55d08a..0b0b21c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ ps*.exe config.ahk custom.ahk -config.ahk diff --git a/README.md b/README.md deleted file mode 100644 index 81fd7d2..0000000 --- a/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# GTA V Online AHK-Macros - -All credit for this great piece of software goes to [2called-chaos](https://github.com/2called-chaos). - -[Original Repo](https://github.com/2called-chaos/gtav-online-ahk) - -I would always be using this script until I just hopped back on GTA the other day and noticed the new update messed stuff up, so I figured I would do what I can to help out anyone who wants to keep using this until the official version gets fully updated by [2called-chaos](https://github.com/2called-chaos). :) - -# Disclaimer -All I've tried to do with my fork is to make the script compatible with new GTA version 1.67, as the interaction menu changed slightly, making some of the macros no longer work. - -I'm not very good with AHK but I think this should be a working version for GTA v1.67+, everything I use regularly worked with my testing however there are a few things I couldn't test such as: - -- have not tested manual inv settings -- have not tested CPH mode -- not sure what needs to be done with VIP toggle/check now that interaction menu changed (so I just turned it off) - -Things that needed changed slightly and should now work on v1.67: -- openOutfitMenu -- ToggleRadar -- ArmorMenu -- SnackMenu -- EquipScarf -- RetrieveCar -- RequestSparrow -- ReturnSparrow - -If there's anything else that needs fixed temporarily until 2called-chaos does, I possibly can just let me know. -Thank you again [2called-chaos](https://github.com/2called-chaos), for this and hope to see it still being updated in the future. - -## Legal - -This repository is licensed under the MIT license. From 814d56a824b64f7a6824c34ea111b8d900497fc3 Mon Sep 17 00:00:00 2001 From: Sven Pachnit Date: Wed, 9 Aug 2023 14:06:51 +0200 Subject: [PATCH 7/7] Restore readme --- README.md | 216 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 216 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..6304f3e --- /dev/null +++ b/README.md @@ -0,0 +1,216 @@ +# GTA V Online AHK-Macros + +Provides hotkeys for several useful features in GTA V:Online, see list further down. + + +**NOTE**: I tested this on my SC installation and with my account. If something doesn't work, ask (open issue)! + I evidently do heists most of the time so if you have ideas for useful CEO macros, let me know + or just send them in! + + +## Requirements + + * [AutoHotkey](https://www.autohotkey.com/) + * [pssuspend.exe and pskill.exe](https://docs.microsoft.com/en-us/sysinternals/downloads/pssuspend) in your path (for force disconnect and process killing, see instructions below) + + +## Installation + + * Download the .ahk file + * Open it in a text editor (e.g. notepad++ with AutoIT syntax highlighting) + * Consider creating a config.ahk and copy lines you want to change over there (so you can update, see Config further down) + * Change the hotkeys ([key list](https://www.autohotkey.com/docs/KeyList.htm)) and other options as you desire + * Doubleclick the .ahk file (open with AHK) Note: On Windows 10 right click -> run as admin might be necessary + + +## Installation (pssuspend.exe / pskill.exe) + +pssuspend.exe and pskill.exe are tools from the sysinternals collection. You can download the whole package (~3MB) [directly from Microsoft](https://docs.microsoft.com/en-us/sysinternals/downloads/pssuspend). +You can copy them all but we only need pssuspend and pskill so go ahead and extract/copy `pssuspend.exe` `pskill.exe` to ANY of the following: + +* into the same location where the .ahk file is +* C:\Windows +* C:\Windows\system32 + +**NOTE:** Start the pssuspend.exe AND pskill.exe once by double clicking on it and accept the license agreement or it will silently fail. + + +## Usage + +* On Windows 10 you might have to start the AHK script as administrator (right click -> Run as administator) +* You should run the game in window(ed fullscreen) or some functions will alt-tab you and will not work properly +* You will have to toggle VIP/CEO/MC mode manually since the interaction menu will be changed and most functions need to be aware of that. +* Doesn't work well inside apartments, maybe in CEO mode while not being one (menu changes) +* The interaction menu is often delayed the first time it's opened after loading screens or cutscenes. + Make sure to briefly open the interaction menu from time to time, escpecially after loading/cutscenes. + Alternatively you can increase the IntMenuDelay setting for more accuracy but making the process slower in general. +* Needless to say, don't give inputs while a macro is running or it might do random shit +* Sometimes you might find that the script doesn't appear to do anything. This might happen if you start + the game after the AHK script. Reloading it (right click on systray icon -> reload script) fixes that usually. + + +## Config + +You can (optionally) create a file `config.ahk` in the same location as the main script to overwrite settings without needing +to change the main file making updates easier. You can include any or all settings in the top of the script. + +```ahk +SnackMenuKey := "F12" ; change a single key bind + +; add a chat snippet +ArrayChatSnippets.push("Hey there!") + +; start with a clear list (discard default snippets by clearing array) +ArrayChatSnippets := [] +ArrayChatSnippets.push("The one and only snippet!") + +; custom keybind, see custom additions (if you want all your keybind settings in one place) +Hotkey, ^F6, ExampleMacro +``` + +## Custom additions + +You can (optionally) create a file `custom.ahk` in the same location as the main script to add custom macros without needing +to change the main file making updates easier. + +```ahk +; directly bind onto a key with double-colons +^F3:: + ; do something + return + +; AHK hotstring (typing ll will trigger this example) +::ex:: + goto ExampleMacro + return + +; target macro for the hotstring above +ExampleMacro: + SplashTextOn 250, 20, Foo, Bar + Sleep 1000 + SplashTextOff + return + +; hotstring an existing macro from the main file +::lester:: + goto CallLester + return + +; handy for when you modifying or adding stuff +::rel:: + SplashTextOn 250, 20, Reloading, Reloading script... + Sleep 1000 + Reload + return +``` + + +## Updates + +Since v1.2.0 the script includes a simple auto updater. By default it will check for a new version on GitHub every time you launch the script. +If a new (or actually different) version is found it will prompt you to proceed or cancel. +See the readme section about using config.ahk if you plan on changing settings as the update will replace the main script file! + +You can disable the automatic check and/or bind a manual check to a hotkey in the configuration (`DoCheckForUpdates` and `CheckForUpdatesKey`). +Note that the update check hotkey still only works when GTA is active. + + +## Will I get banned? + +I'm not aware of any bans issued by Rockstar following the usage of AHK-scripts. I personally use AHK-scripts within +GTA:O since 2014 and did not get banned. This is also not the only AHK-script available, I'm sure many are using them. +At the end it's your call but I'm 99% certain that it wont get you banned. + + +## Available macros + +I might forget to update so just check available keybinds :) + +* **SnackMenu** – Opens the snack menu +* **AutoHealth** – Consumes 2 snacks (from position 2) and closes menu +* **ArmorMenu** – Opens the armor menu +* **AutoArmor** – Consumes one super heavy armor and closes menu +* **RetrieveCar** – Retrieve your current active personal vehicle +* **TogglePassive** – Toggle passive mode +* **EquipScarf** – Equip scarf (heist outfit speed, see miscellaneous) +* **CycleOutfit** – Cycle through your saved outfits +* **ToggleVIP** – Toggle VIP(/CEO/MC) mode +* **ToggleCPH** – Toggle CPH (Cayo Perico Heist Final) mode +* **ToggleAFK** – Toggle AFK mode +* **ToggleClicker** – Toggle auto clicker +* **ToggleRadar** – Toggle extended radar +* **ToggleAutoHeli** – Keeps throttle and pitch forward pressed, poor mans autopilot +* **CEOBuzzard** – Spawn a free CEO Buzzard +* **RequestSparrow** – Call in your Sparrow (or whatever you last requested moon pool vehicle was) +* **ReturnSparrow**: – Return your Sparrow to the Kosatka +* **RandomHeist** – Join a random heist (on-call) solo aka don't invite friends in session +* **ForceDisconnect** – Force disconnect the game by freezing the process for 10 seconds (requires pssuspend.exe) +* **KillGame** – Kill the game process immediately (requires pskill.exe) +* **ChatSnippets** – Select a sentence from a configurable list which will get typed out in the game (chat should already be open) +* **DialDialog** – Select a number from a list and call it automatically (add items, change order or remove entries in config) +* **CheckForUpdates** – Manually check for updates + +The following calls can be directly bound to a hotkey (adding more is trivial): + +* **CallAssistant** +* **CallInsurance** +* **CallLester** +* **CallMechanic** +* **CallMerryweather** +* **CallPegasus** + +You can reach more (useful or useless contacts) by binding `DialDialog` + + +## Miscellaneous + +#### modifier keys for hotkeys + +If it's not clear enough from the key list. You can use [these symbols](https://autohotkey.com/docs/Hotkeys.htm#Symbols) in +combination with keys. For example `F1` to equip armor and `+F1` (shift+F1) to just open the menu. + +#### "cheat codes" + +With AHK's hotstrings you could achieve something like the good old cheat codes to trigger macros. +The issue is just to find words that won't trigger things like chat or the interaction menu. + +```ahk +::lester:: + GoTo CallLester + return +``` + +This would allow you (in theory) to type "lester" followed by a TAB to trigger the macro. But again, +`t` would open the chat usually and break the macro. + +#### Scarf / Heist outfit + +Yo, what's up with the scarf macro? Well if you have played normal heists with the heavy outfit once +you know that you are slower but take less damage with them. Given that you play with a player saved +heist outfit and own a scarf you can get rid of the armor and its speed effect while still keeping +the protective aspects of it. + +[![gif](https://i.imgur.com/YbD6MJa.gif)](https://imgur.com/OI1g0Xz) + +Just beware: Some cutscenes may remove the protective effect, quick-restart most certainly will remove +the effect and some checkpoints will give you the armor back (visibly) and some wont. If you get the armor +back you can repeat the scarf equip, otherwise no heist outfit for the rest of the mission. + +I use it for example for the Pacific finale and equip the scarf after leaving the bank. + + +## Contributing + + Contributions are very welcome! Either report errors, bugs and propose features or directly submit code: + + 1. Fork it + 2. Create your feature branch (`git checkout -b my-new-feature`) + 3. Commit your changes (`git commit -am 'Added some feature'`) + 4. Push to the branch (`git push origin my-new-feature`) + 5. Create new Pull Request + + Please use spaces for indentation and try to mimic the style off existing code :) + +## Legal + +This repository is licensed under the MIT license.