Advertisement
Guest User

Untitled

a guest
Nov 19th, 2023
730
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.32 KB | None | 0 0
  1. #include <AutoItConstants.au3>
  2.  
  3. AutoItSetOption("MouseCoordMode", 2)
  4. AutoItSetOption("MouseClickDelay", 5)
  5.  
  6. HotKeySet("w", "Speedup")
  7. HotKeySet("{SPACE}", "Pause")
  8. HotKeySet("e", "Skill")
  9. HotKeySet("q", "Retreat")
  10. HotKeySet("{PAUSE}", "Terminate")
  11.  
  12. Global Const $SPEEDUP_COORD[2] = [1646/1920, 81/1200]
  13. Global Const $PAUSE_COORD[2] = [1793/1920, 85/1200]
  14.  
  15. Global Const $SKILL_COORD[2] = [1280/1920, 732/1200]
  16. Global Const $RETREAT_COORD[2] = [927/1920, 447/1200]
  17.  
  18. While (true)
  19. Sleep(3600000)
  20. WEnd
  21.  
  22.  
  23. Func Speedup()
  24. Local $hWnd = WinActive("[TITLE:Arknights; CLASS:KIWICROSVM_1]")
  25. If $hWnd == 0 Then
  26. HotKeySet("w")
  27. Send("w")
  28. HotKeySet("w", "Speedup")
  29. Return
  30. EndIf
  31.  
  32. Local $origPos = MouseGetPos()
  33. Local $aClientSize = WinGetClientSize($hWnd)
  34. MouseClick($MOUSE_CLICK_LEFT, $SPEEDUP_COORD[0] * $aClientSize[0], $SPEEDUP_COORD[1] * $aClientSize[1], 1, 0)
  35. MouseMove($origPos[0], $origPos[1], 0)
  36. EndFunc
  37.  
  38.  
  39. Func Pause()
  40. Local $hWnd = WinActive("[TITLE:Arknights; CLASS:KIWICROSVM_1]")
  41. If $hWnd == 0 Then
  42. HotKeySet("{SPACE}")
  43. Send("{SPACE}")
  44. HotKeySet("{SPACE}", "Pause")
  45. Return
  46. EndIf
  47.  
  48. Local $origPos = MouseGetPos()
  49. Local $aClientSize = WinGetClientSize($hWnd)
  50. MouseClick($MOUSE_CLICK_LEFT, $PAUSE_COORD[0] * $aClientSize[0], $PAUSE_COORD[1] * $aClientSize[1], 1, 0)
  51. MouseMove($origPos[0], $origPos[1], 0)
  52. EndFunc
  53.  
  54.  
  55. Func Skill()
  56. Local $hWnd = WinActive("[TITLE:Arknights; CLASS:KIWICROSVM_1]")
  57. If $hWnd == 0 Then
  58. HotKeySet("e")
  59. Send("e")
  60. HotKeySet("e", "Skill")
  61. Return
  62. EndIf
  63.  
  64. MouseClick($MOUSE_CLICK_LEFT)
  65. Sleep(100)
  66.  
  67. Local $origPos = MouseGetPos()
  68. Local $aClientSize = WinGetClientSize($hWnd)
  69. MouseClick($MOUSE_CLICK_LEFT, $SKILL_COORD[0] * $aClientSize[0], $SKILL_COORD[1] * $aClientSize[1], 1, 0)
  70. MouseMove($origPos[0], $origPos[1], 0)
  71. EndFunc
  72.  
  73.  
  74. Func Retreat()
  75. Local $hWnd = WinActive("[TITLE:Arknights; CLASS:KIWICROSVM_1]")
  76. If $hWnd == 0 Then
  77. HotKeySet("q")
  78. Send("q")
  79. HotKeySet("q", "Retreat")
  80. Return
  81. EndIf
  82.  
  83. MouseClick($MOUSE_CLICK_LEFT)
  84. Sleep(100)
  85.  
  86. Local $origPos = MouseGetPos()
  87. Local $aClientSize = WinGetClientSize($hWnd)
  88. MouseClick($MOUSE_CLICK_LEFT, $RETREAT_COORD[0] * $aClientSize[0], $RETREAT_COORD[1] * $aClientSize[1], 1, 0)
  89. MouseMove($origPos[0], $origPos[1], 0)
  90. EndFunc
  91.  
  92.  
  93. Func Terminate()
  94. Exit
  95. EndFunc
  96.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement