Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.48 KB | None | 0 0
  1. #SingleInstance
  2.  
  3. /*
  4.  
  5. NOTES:
  6.  
  7. THIS IS OBVIOUSLY SET UP FOR MY OWN PERSONAL KEYBINDS
  8.  
  9. I HAVE MOUSE THUMB BUTTON 2 ("X2" IN AUTOHOTKEY) BOUND TO INTERACT IN SATISFACTORY
  10.  
  11. I ALSO HAVE CHOSEN TO USE MOUSE THUMB BUTTON 1 AS AN ALTERNATIVE "escape" KEY
  12.  
  13. CHANGE THIS TO USE YOUR IN-GAME BINDS AND CHOSEN AHK KEYS AS NECESSARY OR DESIRED!
  14.  
  15. */
  16.  
  17.  
  18. paused := false
  19.  
  20.  
  21. ; -------------------------------------------------------------------------------------------------------------
  22. ; F11 halts any latent executions, in case you forget the state of your toggles!
  23. ; plays a little beep sound
  24. ; -------------------------------------------------------------------------------------------------------------
  25.  
  26. F11::
  27. settimer, dogather, off
  28. Click, up, X2
  29. Click, up
  30. SoundBeep, 300, 100
  31. return
  32.  
  33. ; -----------------------------------------------------------------------------------------------------------------------------------------------
  34. ; Double press Middel Mouse Button move forward wioth out touching anything, Press again to stop. The number if how fast you need to double click
  35. ; -----------------------------------------------------------------------------------------------------------------------------------------------
  36.  
  37. MButton::
  38. if (A_TimeSincePriorHotkey < 400)
  39. SendInput {w down}
  40. else
  41. SendInput w
  42.  
  43. ; -------------------------------------------------------------------------------------------------------------
  44. ; makes the g key toggle a loop which calls the dogather function (below)
  45. ; this is useful for gathering leaves. Just press the key once and run around to rapidly autogather.
  46. ; Press again to stop.
  47. ; -------------------------------------------------------------------------------------------------------------
  48.  
  49. $g::
  50. gather := not gather
  51. if gather
  52. {
  53. settimer, dogather, 40
  54. }
  55. else
  56. {
  57. settimer, dogather, off
  58. }
  59. return
  60.  
  61.  
  62. ; -------------------------------------------------------------------------------------------------------------
  63. ; the dogather function simply clicks mouse button 2 a single time, which is my interact key.
  64. ; the timer defined above is therefore basically executing rapidfire left clicks (40 milliseconds apart)
  65. ; -------------------------------------------------------------------------------------------------------------
  66.  
  67. dogather:
  68. Send, e
  69. return
  70.  
  71.  
  72. ; -------------------------------------------------------------------------------------------------------------
  73. ; This bind causes the t key to toggle holding down the interact key, which again for me is mouse thumb button 2 (X2)
  74. ; This means you don't have to hold down your interact button to manually mine from deposits or to mine away rocks
  75. ; -------------------------------------------------------------------------------------------------------------
  76.  
  77. t::
  78. if (A_TimeSincePriorHotkey < 400)
  79. SendInput {e down}
  80. else
  81. SendInput e
  82.  
  83. ; -------------------------------------------------------------------------------------------------------------
  84. ; this bind causes the b to to toggle holding down the left mouse button. Useful for manual crafting.
  85. ; -------------------------------------------------------------------------------------------------------------
  86.  
  87. b::
  88. holdbutton1 := not holdbutton1
  89. if holdbutton1
  90. {
  91. Click, down
  92. }
  93. else
  94. {
  95. Click, up
  96. }
  97. Return
  98.  
  99.  
  100. ; -------------------------------------------------------------------------------------------------------------
  101. ; this bind toggles suspension of all of the scripts.
  102. ; when pressed, if suspending you will hear a high pitch/low pitch "turning off" sound
  103. ; press again to resume, reloading the script and playing a reverse sound
  104. ; this is useful if you want to alt-tab out and type something without accidentally causing your mouse to do weird stuff!
  105. ; -------------------------------------------------------------------------------------------------------------
  106.  
  107. p::
  108. Suspend
  109. Pause, , 1
  110. paused := not paused
  111. if not paused
  112. {
  113. SoundBeep, 600, 100
  114. SoundBeep, 700, 100
  115. Reload
  116. }
  117. else
  118. {
  119. SoundBeep, 700, 100
  120. SoundBeep, 600, 100
  121. }
  122.  
  123. Return
  124.  
  125. ;--------------------------- Unused -----------------------------------------
  126. ; -------------------------------------------------------------------------------------------------------------
  127. ; XButton1 is mouse thumb button 1. Binding this to escape makes it way way easier to exit dialogs, build mode, etc
  128. ; -------------------------------------------------------------------------------------------------------------
  129.  
  130. ;XButton1::ESC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement