Skip to content

Instantly share code, notes, and snippets.

@danielpza
Created August 15, 2020 05:38
Show Gist options
  • Save danielpza/113393b8a3daf924caa66fcfdaea227d to your computer and use it in GitHub Desktop.
Save danielpza/113393b8a3daf924caa66fcfdaea227d to your computer and use it in GitHub Desktop.
Dark Souls autohotkey kick, plunge attack and jump
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; based on https://old.reddit.com/r/darksouls3/comments/4l5kiv/pc_autohotkey_script_for_kickjump_attack/
; and https://steamcommunity.com/app/374320/discussions/0/365163686085275164/?l=spanish&ctp=2
KEYS_TO_CHECK := ["A", "D", "S", "W"]
GetPressedKeys(keysToCheck) {
local
keys := []
For index, key in keysToCheck {
if (GetKeyState(key, "P")) {
keys.push(key)
}
}
return keys
}
PressKeys(keys) {
local
For index,key in keys {
Send {%key% down}
}
}
ReleaseKeys(keys) {
local
For index,key in keys {
Send {%key% up}
}
}
Procedure(attackKey) {
local
global KEYS_TO_CHECK
pressedKeys := GetPressedKeys(KEYS_TO_CHECK)
ReleaseKeys(pressedKeys)
sleep 31
PressKeys(pressedKeys)
;sleep 15
PressKeys([attackKey])
sleep 50
ReleaseKeys(pressedKeys)
ReleaseKeys([attackKey])
sleep 100
PressKeys(pressedKeys)
}
Jump() {
local
if (GetKeyState("Space", "P")){
Send {Space up}
sleep 31
Send {Space down}
}
}
MButton::
Procedure("p") ; attack key
return
+MButton::
Procedure("o") ; strong attack key
return
c::
Jump()
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment