Advertisement
lobosjr

ELDEN RING Zip AHK Script

Mar 30th, 2022
2,338
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. ; This is an AutoHotKey (AHK) script to perfom the zip in Elden Ring somewhat consistently.
  2. ; Keep in mind this is not allowed for runs and should only be used to test and find setups.
  3.  
  4. ; You can adjust the timings below to check what works best for you.
  5. ; By default, the hotkey to perform a zip is "F4".
  6.  
  7.  
  8.  
  9. ; -= TIMINGS =-
  10. ; -------------
  11.  
  12. ; Primary timings for the setup (in frames)
  13. ; "WaitFrames" is the initial block time before starting to walk
  14. ; "WalkFrames" is how long to walk and usually has to be between about 4 and 10 frames
  15. ; The timings have to add up to around 139 frames, like 134/5, 133/6, 132/7..
  16.  
  17. WaitFrames = 133
  18. WalkFrames = 6
  19.  
  20.  
  21. ; How many cycles to offset the zip
  22. ; Larger offset = shorter zips
  23.  
  24. CycleOffset = 0
  25.  
  26.  
  27. ; Fine tuning for timings for testing (in ms)
  28.  
  29. WaitOffsetMs = 0
  30. WalkOffsetMs = 0
  31.  
  32.  
  33.  
  34. ; -= OPTIMIZATIONS =-
  35. ; -------------------
  36.  
  37. #NoEnv
  38. #MaxHotkeysPerInterval 99000000
  39. #HotkeyInterval 99000000
  40. #KeyHistory 0
  41. ListLines Off
  42. Process, Priority, , A
  43. SetBatchLines, -1
  44. SetKeyDelay, -1, -1
  45. SetMouseDelay, -1
  46. SetDefaultMouseSpeed, 0
  47. SetWinDelay, -1
  48. SetControlDelay, -1
  49. SendMode Input
  50.  
  51.  
  52.  
  53. ; -= ACCURATE SLEEP =-
  54. ; --------------------
  55.  
  56. AccurateTimer(timeInMs)
  57. {
  58. DllCall("QueryPerformanceFrequency", "Int64*", freq)
  59. DllCall("QueryPerformanceCounter", "Int64*", CounterBefore)
  60. DllCall("QueryPerformanceCounter", "Int64*", CounterAfter)
  61. while (((CounterAfter - CounterBefore) / freq * 1000) < timeInMs)
  62. {
  63. DllCall("QueryPerformanceCounter", "Int64*", CounterAfter)
  64. }
  65. }
  66.  
  67.  
  68.  
  69. ; -= SCRIPT =-
  70. ; ------------
  71.  
  72. F4 up::
  73.  
  74. Send, {RButton down}
  75. Send, {LAlt Down}
  76. AccurateTimer((WaitFrames + 120 * CycleOffset) * 1000 / 60 + WaitOffsetMs)
  77. Send, {w down}
  78. AccurateTimer(WalkFrames * 1000 / 60 + WalkOffsetMs)
  79. Send, {w up}
  80. AccurateTimer(30 * 1000 / 60)
  81. Send, {LAlt Up}
  82. Send, {RButton up}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement