Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. ;======= Script Settings =======
  2.  
  3. F11::Reload
  4. #SingleInstance, Force
  5. ; #IfWinActive, ahk_exe archeage.exe
  6. SendMode, Input
  7.  
  8. ; ======= Functions =======
  9.  
  10. WaitRandom(a, b)
  11. {
  12. Random, amount, a, b
  13. Sleep, amount
  14. return
  15. }
  16.  
  17. Press(key)
  18. {
  19. Send, {Blind}{%key% down}
  20. WaitRandom(15,30)
  21. Send, {Blind}{%key% up}
  22. return
  23. }
  24.  
  25. MoveNear(x, y)
  26. {
  27. Random, shiftX, -5, 5
  28. Random, shiftY, -5, 5
  29. MouseMove, x+shiftX, y+shiftY, 10
  30. return
  31. }
  32.  
  33. ClickNear(x, y)
  34. {
  35. MoveNear(x, y)
  36. WaitRandom(100, 250)
  37. Press("LButton")
  38. return
  39. }
  40.  
  41. ToggleCapsLock()
  42. {
  43. if GetKeyState("CapsLock", "T") = 1
  44. {
  45. SetCapsLockState, off
  46. }
  47. else
  48. {
  49. SetCapsLockState, on
  50. }
  51. return
  52. }
  53.  
  54. ; ======= Routines =======
  55.  
  56. OpenHiram()
  57. {
  58. ClickNear(865, 400)
  59. WaitRandom(300, 600)
  60. ClickNear(925, 805)
  61. WaitRandom(300, 600)
  62. ClickNear(920, 585)
  63. return
  64. }
  65.  
  66.  
  67. ; ======= Keybinds =======
  68.  
  69. F1::OpenHiram()
  70. ; LWin::Send, {Numpad6}
  71. *CapsLock::
  72. Send, {Home}
  73. Send, {Blind}{Insert}
  74. ; ~*Home::Press("Insert")
  75.  
  76.  
  77. ; ======= Space =======
  78.  
  79. enableS = false
  80.  
  81. F8::
  82. if (enableS := !enableS)
  83. setTimer, routineS, -1
  84. return
  85.  
  86. routineS:
  87. while enableS
  88. {
  89. Press("Space")
  90. ; Press("LButton")
  91. WaitRandom(420000, 840000)
  92.  
  93. }
  94. return
  95.  
  96. ; ======= Mouse =======
  97.  
  98. enableM = false
  99.  
  100. F9::
  101. if (enableM := !enableM)
  102. setTimer, routineM, -1
  103. return
  104.  
  105. routineM:
  106. while enableM
  107. {
  108. MoveNear(940, 220)
  109. WaitRandom(50,150)
  110. Send, {LButton down}
  111. MoveNear(960, 220)
  112. WaitRandom(50, 150)
  113. Send, {LButton up}
  114.  
  115. WaitRandom(420000, 840000)
  116.  
  117. }
  118. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement