Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.80 KB | None | 0 0
  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;; Ark autohotkey script
  3. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  4.  
  5. #NoEnv
  6. #Warn
  7. SendMode Input
  8. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
  9.  
  10. Gui +AlwaysOnTop ; I wanted this to stay on top even though there are other windows opening and being moved arround.
  11. Gui, Add, Edit, x10 y10 w400 h250 vConsole
  12. Gui, Show, x100 y100 w420 h270, Logging Startup Script - AutoHotkey
  13.  
  14. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  15. ;; Global variables for toggles
  16. toggle_attack := 0
  17. toggle_e := 0
  18. toggle_t := 0
  19. toggle_run := 0
  20. toggle_click := 0
  21. toggle_o := 0
  22. toggle_whistle := 0
  23.  
  24. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  25. ;; Autoattack macro
  26. ;; Press F1 to toggle on/off
  27.  
  28. arkAutoAttack:
  29. IfWinActive ARK: Survival Evolved
  30. {
  31. SendEvent {Click}
  32. Send, q
  33. ;;MouseClick, middle, 55, 233
  34. }
  35. else
  36. {
  37. DebugMessage("Auto-attack OFF")
  38. toggle_attack = 0
  39. SetTimer, arkAutoAttack, off
  40. }
  41. return
  42.  
  43. F1::
  44. if toggle_attack = 0
  45. {
  46. DebugMessage("Auto-attack ON")
  47. toggle_attack = 1
  48. SetTimer, arkAutoAttack, 100
  49. }
  50. else
  51. {
  52. DebugMessage("Auto-attack OFF")
  53. toggle_attack = 0
  54. SetTimer, arkAutoAttack, off
  55. }
  56. return
  57. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  58.  
  59. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  60. ;; Auto E macro
  61. ;; Press F2 to toggle on/off
  62.  
  63. arkAutoE:
  64. IfWinActive ARK: Survival Evolved
  65. {
  66. Send, e
  67. }
  68. else
  69. {
  70. SetTimer, arkAutoE, off
  71. DebugMessage("Auto-E OFF")
  72. }
  73. return
  74.  
  75. F12::
  76. if toggle_e = 0
  77. {
  78. toggle_e = 1
  79. SetTimer, arkAutoE, 100
  80. DebugMessage("Auto-E ON")
  81. }
  82. else
  83. {
  84. toggle_e = 0
  85. SetTimer, arkAutoE, off
  86. DebugMessage("Auto-E OFF")
  87. }
  88. return
  89.  
  90. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  91. ;; Run Forrest macro
  92. ;; Press F11:56 PM 9/2/2015 to toggle on/off
  93.  
  94. arkAutoRunRun:
  95. IfWinNotActive ARK: Survival Evolved
  96. {
  97. DebugMessage("Auro-running OFF CONT")
  98. SendInput {w up}
  99. ; SendInput {shift up}
  100. SetTimer, arkAutoRunRun, off
  101. toggle_run = 0
  102. }
  103. return
  104.  
  105. F2::
  106. if toggle_run = 0
  107. {
  108. DebugMessage("Auto-running ON")
  109. ; SendInput {shift down}
  110. SendInput {w down}
  111. SetTimer, arkAutoRunRun, 200
  112. toggle_run = 1
  113. }
  114. else
  115. {
  116. toggle_run = 0
  117. SendInput {w up}
  118. DebugMessage("Auro-running OFF")
  119. SetTimer, arkAutoRunRun, off
  120. }
  121. return
  122.  
  123. +F2::
  124. if toggle_run = 0
  125. {
  126. DebugMessage("Auto-running ON")
  127. SendInput {shift down}
  128. SendInput {w down}
  129. SetTimer, arkAutoRunRun, 200
  130. toggle_run = 1
  131. }
  132. else
  133. {
  134. toggle_run = 0
  135. SendInput {w up}
  136. DebugMessage("Auro-running OFF")
  137. SetTimer, arkAutoRunRun, off
  138. }
  139. return
  140.  
  141. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  142. ;; T macro
  143. ;; Press F3 to toggle on/off
  144.  
  145. arkAutoT:
  146. IfWinActive ARK: Survival Evolved
  147. {
  148. Send, t
  149. }
  150. else
  151. {
  152. SetTimer, arkAutoT, off
  153. DebugMessage("Auto-T OFF")
  154. }
  155. return
  156.  
  157. F3::
  158. if toggle_t = 0
  159. {
  160. toggle_t = 1
  161. SetTimer, arkAutoT, 100
  162. DebugMessage("Auto-T ON")
  163. }
  164. else
  165. {
  166. toggle_t = 0
  167. SetTimer, arkAutoT, off
  168. DebugMessage("Auto-T OFF")
  169. }
  170. return
  171.  
  172.  
  173. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  174. ;; O macro
  175. ;; Press F5 to toggle on/off
  176.  
  177. arkAutoO:
  178. IfWinActive ARK: Survival Evolved
  179. {
  180. Send, o
  181. }
  182. else
  183. {
  184. SetTimer, arkAutoO, off
  185. DebugMessage("Auto-O OFF")
  186. }
  187. return
  188.  
  189. F5::
  190. if toggle_o = 0
  191. {
  192. toggle_o = 1
  193. SetTimer, arkAutoO, 100
  194. DebugMessage("Auto-O ON")
  195. }
  196. else
  197. {
  198. toggle_o = 0
  199. SetTimer, arkAutoO, off
  200. DebugMessage("Auto-O OFF")
  201. }
  202. return
  203.  
  204.  
  205. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  206. ;; Autoclick macro
  207. ;; Press F10 to toggle on/off
  208.  
  209. arkAutoClick:
  210. IfWinActive ARK: Survival Evolved
  211. {
  212. SendEvent {Click}
  213. }
  214. else
  215. {
  216. DebugMessage("Auto-click OFF")
  217. toggle_click = 0
  218. SetTimer, arkAutoClick, off
  219. }
  220. return
  221.  
  222. F10::
  223. if toggle_click = 0
  224. {
  225. DebugMessage("Auto-click ON")
  226. toggle_click = 1
  227. SetTimer, arkAutoClick, 100
  228. }
  229. else
  230. {
  231. DebugMessage("Auto-attack OFF")
  232. toggle_click = 0
  233. SetTimer, arkAutoClick, off
  234. }
  235. return
  236.  
  237.  
  238. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  239. ;; Auto svist macro
  240. ;; Press F6 to toggle on/off
  241.  
  242. arkAutoWhistle:
  243. IfWinActive ARK: Survival Evolved
  244. {
  245. Send, u
  246. }
  247. else
  248. {
  249. DebugMessage("Auto-whistle OFF")
  250. toggle_click = 0
  251. SetTimer, arkAutoClick, off
  252. }
  253. return
  254.  
  255. F6::
  256. if toggle_whistle = 0
  257. {
  258. DebugMessage("Auto-whistle ON")
  259. toggle_whistle = 1
  260. SetTimer, arkAutoWhistle, 100
  261. }
  262. else
  263. {
  264. DebugMessage("Auto-whistle OFF")
  265. toggle_whistle = 0
  266. SetTimer, arkAutoWhistle, off
  267. }
  268. return
  269.  
  270.  
  271. DebugMessage(msg)
  272. {
  273. GuiControlGet, Console
  274. GuiControl, , Console, %Console%%msg%`r`n ; GUI write
  275. }
  276.  
  277.  
  278.  
  279. GuiClose:
  280. Gui, Destroy
  281. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement