Advertisement
Guest User

@Ler_GG's Dota 2 Reborn Auto Queue Accept

a guest
Feb 17th, 2016
953
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 3.08 KB | None | 0 0
  1. ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  2. ;@  Author: @Ler_GG
  3. ;@  Release Date: 22.01.2016
  4. ;@  Purpose: Automatically accepts game invites
  5. ;@           on the Reborn Dota 2 Client.
  6. ;@  Usage: - F7 to exit the script.
  7. ;@         - F8 to get the Invite Checksum.
  8. ;@  Setup: - Working AutoIT environment. Check
  9. ;@           www.autoitscript.com for help.
  10. ;@         - Correct Checksum for the invite Button.
  11. ;@           Press F8 when the invite is up to gain it.
  12. ;@           Replace $cs_gameFound = 0 with your checksum
  13. ;@           and restart the script.
  14. ;@
  15. ;@  Environment: - Any OS with working AutoIT.
  16. ;@               - Dota 2 1920x1080 Resolution
  17. ;@
  18. ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  19. ;-------------------------------------------------
  20.  
  21. ;-------------------------------------------
  22. ; @@@@@@@ VARIABLES @@@@@@@@@@@@@@@@@@@@@@@@
  23. ;-------------------------------------------
  24. Global $hWnd = WinGetHandle("Dota 2")
  25.  
  26. ; Add your checksum here
  27. Global $cs_gameFound = 0
  28.  
  29. ;-------------------------------------------
  30. ; @@@@@@@ HOTKEYS @@@@@@@@@@@@@@@@@@@@@@@@
  31. ;-------------------------------------------
  32. HotKeySet("{F7}", "_exit")
  33. HotKeySet("{F8}", "_getChecksum")
  34.  
  35. ;-------------------------------------------
  36. ; @@@@@@@ MAIN @@@@@@@@@@@@@@@@@@@@@@@@
  37. ;-------------------------------------------
  38. TrayTip("", "Auto accept Script started. Running in the Background!", 1)
  39.  
  40. While 1
  41.     Sleep(50)
  42.     _main()
  43. Wend
  44.  
  45. ; ----------------------------------------------------------------------------
  46. ; @Function: _main()
  47. ; ----------------------------------------------------------------------------
  48. Func _main()
  49.  
  50.     ; Exception
  51.     If $cs_gameFound = 0 Then
  52.         Tooltip("Please Insert a valid Checksum before you use the Script. Press F8 when the invite is up.", 0, 0)
  53.     EndIf
  54.     _acceptInvite()
  55. EndFunc   ;==>_main
  56.  
  57. ; ----------------------------------------------------------------------------
  58. ; @Function: _acceptInvite()
  59. ; ----------------------------------------------------------------------------
  60. Func _acceptInvite()
  61.  
  62.     ; Checks for the invite button
  63.     Local $cs_current = PixelChecksum(725, 505, 735, 515)
  64.  
  65.     ; Clicks accept game button.
  66.     If $cs_current = $cs_gameFound Then
  67.         WinActivate($hWnd)
  68.         MouseClick("left", "936", "541", 2)
  69.         Sleep(500)
  70.     EndIf
  71.  
  72. EndFunc   ;==>_acceptInvite
  73.  
  74. ; ----------------------------------------------------------------------------
  75. ; @Function: _getChecksum
  76. ; ----------------------------------------------------------------------------
  77. Func _getChecksum()
  78.  
  79.     ; Checksum of the invite button
  80.     Local $cs_current = PixelChecksum(725, 505, 735, 515)
  81.     ClipPut($cs_current)
  82.     Tooltip("Your Checksum is: " & $cs_current & " Use CTRL+V to copy it into your script. Replace $cs_gameFound = 0 with your value and restart the script!", 0, 0)
  83.     Sleep(20000)
  84.     Tooltip("Terminating script in 5 seconds. Please restart!", 0, 0)
  85.     Sleep(5000)
  86.     _exit()
  87.  
  88. EndFunc   ;==>_acceptInvite
  89.  
  90. ; ----------------------------------------------------------------------------
  91. ; @Function: _exit()
  92. ; ----------------------------------------------------------------------------
  93. Func _exit()
  94.     Exit
  95. EndFunc   ;==>_exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement