Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; This is an AutoHotKey (AHK) script to perfom the zip in Elden Ring somewhat consistently.
- ; Keep in mind this is not allowed for runs and should only be used to test and find setups.
- ; You can adjust the timings below to check what works best for you.
- ; By default, the hotkey to perform a zip is "F4".
- ; -= TIMINGS =-
- ; -------------
- ; Primary timings for the setup (in frames)
- ; "WaitFrames" is the initial block time before starting to walk
- ; "WalkFrames" is how long to walk and usually has to be between about 4 and 10 frames
- ; The timings have to add up to around 139 frames, like 134/5, 133/6, 132/7..
- WaitFrames = 133
- WalkFrames = 6
- ; How many cycles to offset the zip
- ; Larger offset = shorter zips
- CycleOffset = 0
- ; Fine tuning for timings for testing (in ms)
- WaitOffsetMs = 0
- WalkOffsetMs = 0
- ; -= OPTIMIZATIONS =-
- ; -------------------
- #NoEnv
- #MaxHotkeysPerInterval 99000000
- #HotkeyInterval 99000000
- #KeyHistory 0
- ListLines Off
- Process, Priority, , A
- SetBatchLines, -1
- SetKeyDelay, -1, -1
- SetMouseDelay, -1
- SetDefaultMouseSpeed, 0
- SetWinDelay, -1
- SetControlDelay, -1
- SendMode Input
- ; -= ACCURATE SLEEP =-
- ; --------------------
- AccurateTimer(timeInMs)
- {
- DllCall("QueryPerformanceFrequency", "Int64*", freq)
- DllCall("QueryPerformanceCounter", "Int64*", CounterBefore)
- DllCall("QueryPerformanceCounter", "Int64*", CounterAfter)
- while (((CounterAfter - CounterBefore) / freq * 1000) < timeInMs)
- {
- DllCall("QueryPerformanceCounter", "Int64*", CounterAfter)
- }
- }
- ; -= SCRIPT =-
- ; ------------
- F4 up::
- Send, {RButton down}
- Send, {LAlt Down}
- AccurateTimer((WaitFrames + 120 * CycleOffset) * 1000 / 60 + WaitOffsetMs)
- Send, {w down}
- AccurateTimer(WalkFrames * 1000 / 60 + WalkOffsetMs)
- Send, {w up}
- AccurateTimer(30 * 1000 / 60)
- Send, {LAlt Up}
- Send, {RButton up}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement