Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #SingleInstance Force
- #MaxHotkeysPerInterval 99999
- #IfWinActive ahk_class DarkSouls2
- ~MButton::Numpad8 ; Lock-on by pressing the mouse wheel
- ;~WheelUp:: ; Cycle target left by scrolling up
- ; Send {Numpad7 down}
- ; Sleep 20
- ; Send {Numpad7 up}
- ;return
- ;~WheelDown:: ; Cycle target right by scrolling down
- ; Send {Numpad9 down}
- ; Sleep 20
- ; Send {Numpad9 up}
- ;return
- ~RButton::Numpad4 ; Right mouse button for left hand light attack
- ~Tab::Numpad5 ; Tab for left strong attack (awkward when attacking with a left-hand weapon, but using the code below would cause a parry on hold)
- ~LButton::
- if (keyState) ; If you hold down a keyboard key, it repeatedly fires the hotkey <- Not my text btw
- return ; This will mess up our logic, so we need to disable it
- keyState := 1 ; Register key as being currently held, so we can filter repeats
- SetTimer, DoLongPress, -100 ; Start the long-press timer running (Negative number means "Fire only once")
- lpTime := A_TickCount + 100 ; Calculate the time at which the short-press window ends
- return
- ~LButton up::
- SetTimer, DoLongPress, Off ; Disable the long press timeout <- Also not mine lol am too stupid to code
- keyState := 0 ; Unregister key as being held
- if (A_TickCount < lpTime){ ; Was the key released before the long press timeout expired?
- gosub, DoShortPress ; Yes - fire the short press
- }
- return
- DoShortPress: ; Light press on LMB causes a right hand light attack
- Send {Numpad1 down} ; Both also fuck up clicking on the keybinding menu, so watch it and use the keyboard to select things instead
- Sleep 20
- Send {Numpad1 up}
- return
- DoLongPress: ; Hold on LMB causes a right hand heavy attack after the adjustable timer above
- Send {Numpad2 down} ; Do keep in mind it does the same for ranged weapons
- Sleep 20
- Send {Numpad2 up}
- return
- ;~LShift & LButton::Numpad2
- ;~LShift & RButton::Numpad5
- ; Interaction for interact and accept on same key, only sends once when holding (interaction bound to T)
- ~T::
- if suppress
- return
- Send {Enter down}
- Sleep 20
- Send {Enter up}
- suppress :=1
- return
- ~T Up::
- suppress := 0
- return
- Q:: ; Going back on menus with Q, can send several times per second and be used to confirm keybindings instead of mashing backspace
- Send {Backspace down}
- Sleep 20
- Send {Backspace up}
- return
- Space:: ; Roll once, independent of tapping or holding space
- if suppress
- return
- Send {Space down}
- Sleep 20
- Send {Space up}
- suppress :=1
- return
- Space up::
- suppress := 0
- return
- LShift::Space ; Dash with shift (dash still bound to spacebar, very poggers), but unfortunately also roll with shift
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement