Mar Alegre 1 week ago
parent
commit
a9a476d073
  1. 1
      lib/HoldRepeat.ahk
  2. 65
      scripts/Deep Rock Galactic.ahk

1
lib/HoldRepeat.ahk

@ -34,7 +34,6 @@ _HoldRepeat_Handler(IsHold, TargetKey, CancelKeys:=[], HoldKey:="") {
} }
_HoldRepeat_Loop(IsHold, TargetKey, CancelKeys, HoldKey) { _HoldRepeat_Loop(IsHold, TargetKey, CancelKeys, HoldKey) {
global _HoldRepeat_LoopState
global _HoldRepeat_IsActive global _HoldRepeat_IsActive
global HoldRepeat_BlindMode global HoldRepeat_BlindMode

65
scripts/Deep Rock Galactic.ahk

@ -6,23 +6,22 @@
#Include "../lib/Prelude.ahk" #Include "../lib/Prelude.ahk"
#Include "../lib/HoldRepeat.ahk" #Include "../lib/HoldRepeat.ahk"
; Initialize variables
FullAutoDefault := [0,0,0,0,1]
EquipState := 1
; Make this a wrapper script ; Make this a wrapper script
WrapperPath:="steam://rungameid/548430" WrapperPath:="steam://rungameid/548430"
WrapperWindow:="Deep Rock Galactic " WrapperWindow:="Deep Rock Galactic "
#Include "../lib/Wrapper.ahk" #Include "../lib/Wrapper.ahk"
; Initialize variables
FullAutoEnabled := [0,0,0,0,1]
EquipState := 1
ToggleFullAuto(Index) { ToggleFullAuto(Index) {
global FullAutoEnabled global FullAutoDefault
FullAutoEnabled[Index] := !FullAutoEnabled[Index] FullAutoDefault[Index] := !FullAutoDefault[Index]
EnabledDisabled := (FullAutoEnabled[Index] ? "enabled" : "disabled")
if (Index == 5) { if (Index == 5) {
ToolTip "Distruptive macros " EnabledDisabled, A_ScreenWidth // 2, A_ScreenHeight // 2 ToolTip "Distruptive macros " (FullAutoDefault[Index] ? "enabled" : "disabled"), A_ScreenWidth // 2, A_ScreenHeight // 2
} else { } else {
ToolTip "Full Auto " EnabledDisabled " for " Index, A_ScreenWidth // 2, A_ScreenHeight // 2 ToolTip "Default for " Index " set to " (FullAutoDefault[Index] ? "fully automatic" : "semi automatic"), A_ScreenWidth // 2, A_ScreenHeight // 2
} }
SetTimer RemoveTooltip, -1000 SetTimer RemoveTooltip, -1000
} }
@ -45,49 +44,47 @@ RemoveTooltip() {
~*3:: global EquipState:=3 ~*3:: global EquipState:=3
~*4:: global EquipState:=4 ~*4:: global EquipState:=4
; FN toggles full auto for weapon N ; FN toggles full auto by default for weapon N
*F1::ToggleFullAuto(1) *F1::ToggleFullAuto(1)
*F2::ToggleFullAuto(2) *F2::ToggleFullAuto(2)
*F3::ToggleFullAuto(3) *F3::ToggleFullAuto(3)
*F4::ToggleFullAuto(4) *F4::ToggleFullAuto(4)
*F5::ToggleFullAuto(5) *F5::ToggleFullAuto(5)
; Do full auto when caps lock is on for enabled weapons ; If default is semi auto, Shift + LMB does full auto
#HotIf (GetKeyState("CapsLock","T") and FullAutoEnabled[EquipState]) #HotIf !FullAutoDefault[EquipState]
*+LButton::Repeat("LButton")
; If default is full auto, just LMB by itself does full auto
#HotIf FullAutoDefault[EquipState]
*LButton::Repeat("LButton") *LButton::Repeat("LButton")
~*+LButton::
;
; Non-disruptive macros
;
#HotIf
; Alt + E holds E
*!e UP::Hold("e",["e","w","a","s","d","Space","LButton","RButton"])
; Grenade animation canceling
*MButton::Send "{Blind}{LCtrl down}{MButton down}"
*MButton UP::Send "{Blind}{LCtrl up}{MButton up}"
; ;
; Distruptive macros ; Distruptive macros
; ;
#HotIf FullAutoEnabled[5] #HotIf FullAutoDefault[5]
; Hold f to rapidly deposit ; Hold f to rapidly deposit
*f::{ *f::{
While GetKeyState("f","P") { While GetKeyState("f","P") {
Send "{Blind}{e down}" Send "{Blind}{e down}"
Sleep 20 Sleep 20
Send "{Blind}{LCtrl down}" Send "{Blind}{RCtrl down}"
Sleep 20 Sleep 20
Send "{Blind}{LCtrl up}{e up}" Send "{Blind}{RCtrl up}{e up}"
Sleep 20 Sleep 20
} }
} }
;
; Non-disruptive macros
;
#HotIf
; Alt + E holds E
*!e UP::Hold("e",["e","w","a","s","d","Space","LButton","RButton"])
; Press shift to sprint, only toggles on
*LShift::{
Send "{Blind}{LShift up}{LShift down}"
KeyWait("LShift")
}
*LShift UP::Hold("LShift",,"w")
; Grenade animation canceling
*MButton::Send "{Blind}{LCtrl down}{MButton down}"
*MButton UP::Send "{Blind}{LCtrl up}{MButton up}"

Loading…
Cancel
Save