Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- ;@ Author: @Ler_GG
- ;@ Release Date: 22.01.2016
- ;@ Purpose: Automatically accepts game invites
- ;@ on the Reborn Dota 2 Client.
- ;@ Usage: - F7 to exit the script.
- ;@ - F8 to get the Invite Checksum.
- ;@ Setup: - Working AutoIT environment. Check
- ;@ www.autoitscript.com for help.
- ;@ - Correct Checksum for the invite Button.
- ;@ Press F8 when the invite is up to gain it.
- ;@ Replace $cs_gameFound = 0 with your checksum
- ;@ and restart the script.
- ;@
- ;@ Environment: - Any OS with working AutoIT.
- ;@ - Dota 2 1920x1080 Resolution
- ;@
- ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- ;-------------------------------------------------
- ;-------------------------------------------
- ; @@@@@@@ VARIABLES @@@@@@@@@@@@@@@@@@@@@@@@
- ;-------------------------------------------
- Global $hWnd = WinGetHandle("Dota 2")
- ; Add your checksum here
- Global $cs_gameFound = 0
- ;-------------------------------------------
- ; @@@@@@@ HOTKEYS @@@@@@@@@@@@@@@@@@@@@@@@
- ;-------------------------------------------
- HotKeySet("{F7}", "_exit")
- HotKeySet("{F8}", "_getChecksum")
- ;-------------------------------------------
- ; @@@@@@@ MAIN @@@@@@@@@@@@@@@@@@@@@@@@
- ;-------------------------------------------
- TrayTip("", "Auto accept Script started. Running in the Background!", 1)
- While 1
- Sleep(50)
- _main()
- Wend
- ; ----------------------------------------------------------------------------
- ; @Function: _main()
- ; ----------------------------------------------------------------------------
- Func _main()
- ; Exception
- If $cs_gameFound = 0 Then
- Tooltip("Please Insert a valid Checksum before you use the Script. Press F8 when the invite is up.", 0, 0)
- EndIf
- _acceptInvite()
- EndFunc ;==>_main
- ; ----------------------------------------------------------------------------
- ; @Function: _acceptInvite()
- ; ----------------------------------------------------------------------------
- Func _acceptInvite()
- ; Checks for the invite button
- Local $cs_current = PixelChecksum(725, 505, 735, 515)
- ; Clicks accept game button.
- If $cs_current = $cs_gameFound Then
- WinActivate($hWnd)
- MouseClick("left", "936", "541", 2)
- Sleep(500)
- EndIf
- EndFunc ;==>_acceptInvite
- ; ----------------------------------------------------------------------------
- ; @Function: _getChecksum
- ; ----------------------------------------------------------------------------
- Func _getChecksum()
- ; Checksum of the invite button
- Local $cs_current = PixelChecksum(725, 505, 735, 515)
- ClipPut($cs_current)
- 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)
- Sleep(20000)
- Tooltip("Terminating script in 5 seconds. Please restart!", 0, 0)
- Sleep(5000)
- _exit()
- EndFunc ;==>_acceptInvite
- ; ----------------------------------------------------------------------------
- ; @Function: _exit()
- ; ----------------------------------------------------------------------------
- Func _exit()
- Exit
- EndFunc ;==>_exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement