Code:
Global $Paused
HotKeySet("-", "TogglePause")
HotKeySet("{PGDN}", "Terminate")
While(True)
WinActivate("Diablo III")
Sleep(20)
PixelSearch(1726, 929, 1726, 929 ,0x36E400) ;Looking for Invite Check Box
If Not @error Then
MouseClick("Left",1727,930,1,0) ;accept invite check
EndIf
PixelSearch(18,694,18, 694,0x69160E,1,1) ;wait for message about player joining party, this may be unique and will need to be modified
If Not @error Then
Sleep(5200)
Send("{ESC}")
Sleep(200)
MouseClick("Left",965,580)
Sleep(100)
MouseClick("Left",840,630)
Sleep(2000)
EndIf
PixelSearch(940, 631, 940,631, 0x330800, 1,1) ;If an error has occured, catch it (canont create game?)
If Not @error Then
MouseClick("Left", 940, 631)
EndIf
PixelSearch(152,419,152,419,0x3F0900,1,1) ;Click Resume
If Not @error Then
MouseClick("Left", 152, 419)
EndIf
WEnd
Func TogglePause()
$Paused = Not $Paused
While $Paused
Sleep(100)
WEnd
EndFunc ;==>TogglePause
Func Terminate()
Exit 0
EndFunc ;==>Terminate
And as for the leacher... (remember that there is most def. Unique code in this) (also 1920x1080):
Code:
Global $Paused
Global $stallercounter
HotKeySet("-", "TogglePause")
HotKeySet("{PGDN}", "Terminate")
WinActivate("Diablo III") ;Bring Diablo to foreground
Sleep(20) ;Slight delay to allow Diablo to maximize
While (True)
PixelSearch (892,582,892,582,2229248,1,1)
If Not @error Then
;Sleep(1000)
Call ("MatchError")
MouseClick("Left", 892,582)
Sleep(500)
PixelSearch(826,628, 826,628,2491648,1,1)
If Not @error Then
Call("MatchError")
MouseClick("Left", 825,633,1,0)
EndIf
EndIf
PixelSearch (891,579, 891,579,590852,1,1)
If Not @error Then
Send ("{ESC}")
Sleep(500)
Send ("{ESC}")
EndIf
PixelSearch(1856,1008,1856,1008,0x200100,1,1) ;look for open friends list
If Not @error Then
$stallerCounter = 0
For $i = 339 to 879 step 54
$coord0 = PixelSearch(1468, $i , 1468, $i , 0x547B9C,1,1) ; THIS IS UNIQUE CODE TO SEARCH FOR A SPECIFIC PERSON
If Not @error Then ; IT WILL NEED TO BE MODIFIED TO MATCH YOUR BOOSTER, GLUCK
PixelSearch($coord0[0] + 74, $coord0[1] + 14, $coord0[0] + 74, $coord0[1] + 14, 0x44647E,1,1) ;ALSO UNIQUE CODE
If Not @error Then
MouseClick("Right", $coord0[0], $coord0[1],1,0)
Sleep(500)
MouseClick("Left", $coord0[0] + 26, $coord0[1] + 144,1,0)
Sleep(10)
Send("O")
ExitLoop
EndIf
EndIf
Sleep(10)
Next
EndIf
$coord11 = PixelSearch(300,400,800,700, 10416639,1,1) ;Checking for Waypoint1
If Not @error Then
Call ("WaypointCheck",$coord11)
EndIf
$coord12 = PixelSearch(300,400,800, 700, 7693172, 1,1) ;Checking for Waypoint2
If Not @error Then
Call ("WaypointCheck",$coord12)
EndIf
PixelSearch(1272,791,1272,791, 4854272,1,1) ;Forgot what this is for lol
If Not @error Then
$stallerCounter = 0
Call ("MatchError")
Send("{ESC}")
Call ("MatchError")
Send("{ESC}")
Call ("MatchError")
Send("O")
EndIf
PixelSearch(900,290,960,300, 0xFF0000,1,1) ;If for any reason it fails, we still talk to adria and still want to continue
If Not @error Then
$stallerCounter = 0
Send("{Esc}")
Call ("MatchError")
Send("O")
EndIf
PixelSearch(150 ,417 ,150 ,417 , 1772552, 1,1) ;If stuck in infinite resume game grey (!?)
If Not @error Then
$stallerCounter = $stallerCounter + 1
If $stallerCounter > 50 Then ;Clearly we're not supposed to be here
Send("O")
$stallerCounter = 0
EndIf
EndIf
PixelSearch(151,417,151,417,3934976,1,1) ;Not Sure, resume i believe
If Not @error Then
$stallerCounter = 0
MouseClick("Left", 151, 417,1,0)
Sleep(100)
EndIf
PixelSearch(1726,931,1726,931,3799808,1,1) ;Search for accept request
If Not @error Then
$stallerCounter = 0
$exitif = False
PixelSearch(831,632,831,632,3738624,1,1)
If Not @error Then
MouseClick("Left", 831,632,1,0)
$exitif = True
Call ("MatchError")
Send("{Esc}")
EndIf
If Not $exitif Then
MouseClick("Left", 1726,931,1,0)
EndIf
Sleep(100)
EndIf
PixelSearch(935,635,935,635,4000000,1,1) ;Unable to Join Game Check
If Not @error Then
$stallerCounter = 0
MouseClick("Left",935,635,1,0)
Sleep(100)
EndIf
Wend
Func TogglePause()
$Paused = Not $Paused
While $Paused
Sleep(100)
WEnd
EndFunc ;==>TogglePause
Func Terminate()
Exit 0
EndFunc ;==>Terminate
Func WaypointCheck($coord)
MouseClick("Left", $coord[0] , $coord[1])
Sleep(1000)
MouseClick("Left", 686, 75)
EndFunc
Func MatchError()
PixelSearch(936,632,936,632,3804160) ;look for the matchmaking error
If Not @error Then
MouseClick("Left",936,632,1,0)
Sleep(200)
;MouseClick("Left",1856,1008)
Else
Sleep(200)
EndIf
EndFunc
G'luck and have fun