Skip to content

Instantly share code, notes, and snippets.

@peterthehan
Created March 17, 2021 00:52
Show Gist options
  • Save peterthehan/e105bf131db903b981df690f22dd37b5 to your computer and use it in GitHub Desktop.
Save peterthehan/e105bf131db903b981df690f22dd37b5 to your computer and use it in GitHub Desktop.
Warframe slide attack.
#NoEnv
#SingleInstance, Force
; In milliseconds
SEND_BASE_DURATION := 50
SEND_RANDOM_DURATION := 25
LOOP_BASE_DURATION := 100
LOOP_RANDOM_DURATION := 50
; https://www.autohotkey.com/docs/KeyList.htm
SLIDE_KEY := "Ctrl"
MELEE_KEY := "e"
isActive := true
return
getRandomInt(min, max) {
Random, randomInt, min, max
return randomInt
}
sleep(base, random) {
Sleep, % base + getRandomInt(0, random)
}
send(key) {
global SEND_BASE_DURATION
global SEND_RANDOM_DURATION
Send, % key
sleep(SEND_BASE_DURATION, SEND_RANDOM_DURATION)
}
#IfWinActive ahk_exe Warframe.x64.exe
WheelDown::
WheelUp::
if (isActive) {
isActive := false
send("{" . SLIDE_KEY . " down}")
send(MELEE_KEY)
send("{" . SLIDE_KEY . " up}")
sleep(LOOP_BASE_DURATION, LOOP_RANDOM_DURATION)
isActive := true
}
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment