Browse Source

improvements to DRG script

ahk-v1
Mar Alegre 3 years ago
parent
commit
8d7314de67
  1. 6
      lib/HoldRepeat.ahk
  2. 5
      lib/Turbo.ahk
  3. 39
      src/Deep Rock Galactic.ahk

6
lib/HoldRepeat.ahk

@ -36,13 +36,13 @@ Repeat(Primary, Secondary) {
}
}
if (RepeatVar == 1) {
SendEvent, {%Primary% down}
Send, {%Primary% down}
RepeatVar := 0
} else {
SendEvent, {%Primary% up}
Send, {%Primary% up}
RepeatVar := 1
}
Sleep 50
Sleep 100
}
}

5
lib/Turbo.ahk

@ -3,7 +3,8 @@
Turbo(Target,Hold) {
While GetKeyState(Hold,"P") {
SendInput, {%Target% down}
Sleep 50
Sleep 25
SendInput, {%Target% up}
Sleep 25
}
SendInput, {%Target% up}
}

39
src/Deep Rock Galactic.ahk

@ -13,16 +13,45 @@ WrapperPath:="steam://rungameid/548430"
WrapperWindow:="Deep Rock Galactic "
#Include ../lib/Wrapper.ahk
; Initialize variables
FullAutoEnabled := [0,0,0,0]
EquipState := 1
ToggleFullAuto(Index) {
global FullAutoEnabled
FullAutoEnabled[Index] := !FullAutoEnabled[Index]
EnabledDisabled := % (FullAutoEnabled[Index] ? "enabled" : "disabled")
ToolTip, Full Auto %EnabledDisabled% for %Index%, % A_ScreenWidth // 2, % A_ScreenHeight // 2
SetTimer, RemoveTooltip, -1000
}
RemoveTooltip:
ToolTip
return
;
; Hotkeys
;
; When Caps lock is on, every gun is full auto
#If GetKeyState("CapsLock","T")
; Keep track of what is equipped
~*1:: EquipState := 1
~*2:: EquipState := 2
~*3:: EquipState := 3
~*4:: EquipState := 4
; FN toggles full auto for weapon N
~*F1:: ToggleFullAuto(1)
~*F2:: ToggleFullAuto(2)
~*F3:: ToggleFullAuto(3)
~*F4:: ToggleFullAuto(4)
; Do full auto when caps lock is on for enabled weapons
#If (GetKeyState("CapsLock","T") and FullAutoEnabled[EquipState])
~*LButton::
While GetKeyState("LButton","P") {
SendInput, {LButton down}
Sleep 50
Send, {LButton down}
Sleep 25
Send, {LButton up}
Sleep 25
}
SendInput, {LButton up}
Return
Loading…
Cancel
Save