Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #SingleInstance Force
- SetKeyDelay, -1
- SetMouseDelay, -1
- SetBatchLines, -1
- SetTitleMatchMode, 2
- SendMode Input
- CoordMode, ToolTip, Relative
- CoordMode, Pixel, Relative
- CoordMode, Mouse, Relative
- WinActivate, 1te
- if WinActive("1te"){
- WinMaximize, 1te
- }
- else{
- msgbox, game not open
- exitapp
- }
- return
- $p::
- cycles := 0
- Loop{
- PixelSearch, GPx, GPy, 560, 980, 1360, 1000, 0x01AD38, 0, Fast
- if(ErrorLevel == 0){
- cycles2 := 0
- Loop, {
- PixelSearch, GPx2, GPy2, GPx, GPy, GPx, GPy, 0x01AD37, 0, Fast
- if(ErrorLevel == 0){
- Click
- break
- }
- if(cycles2 > 500){
- break
- }
- cycles += 1
- }
- }
- if(cycles > 500){ // create some kind of condition to time the loop out in case of failure
- break
- }
- cycles += 1
- }
- return
- $m:: exitapp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement