Code:
;Recommended Passive Skills: Jungle Fortitude and Spirit Vessel (For survivability just in case)
;Grasp of the Dead on 2 with Unbreakable Grasp Rune
;Boots to have no speed, or no boots.
;1920-1080 resolution
;Windowed Full Screen
Global $Paused
HotKeySet("-", "Leave") ; the bot is started by pressing - (next to right shift, i believe is normal on all keyboards)
HotKeySet("{PGUP}", "Pause") ; the bot can be paused by pressing Page Up
HotKeySet("{PGDN}", "Stop") ; the bot can be stopped by pressing Page Down
$go = True
$Leave = False
While $go
if($Leave) Then
WinWait("Diablo III")
Sleep(200)
MouseClick( "Left", 1158, 218) ;Failsafe - Clicks the position where X would be to close the Game Menu
Sleep(200)
While 1
PixelSearch (334, 416, 338, 420, 0x2C0400,1,1) ; search for pixel ( Resume Game Red )
If Not @error Then ExitLoop
Sleep(10)
WEnd
MouseClick( "Left", 234, 420) ;Resume Game - Make sure you are at the right part of the quest.
Sleep(200)
$Timer1 = TimerInit()
While 1
PixelSearch (1075, 525, 1079, 529, 0x080D10,1,1) ;Search for pixel ( Talking bubble )
If Not @error Then ExitLoop
Sleep(10)
If TimerDiff ($Timer1) >= 5000 Then ExitLoop ;If 5 seconds has passed exitloop
WEnd
Sleep(200)
Sleep(200)
Send("{Space}") ;Skip that dialog!
Sleep(200)
MouseClick( "Left", 1750, 1034) ;Get closer to the action
Sleep(2600)
MouseMove(1572,732,1)
Sleep(10)
Send(2) ;Grasp of the Dead
Sleep(1432)
MouseClick( "Left", 349, 7) ;Exit to town
$Timer2 = TimerInit()
While 1
PixelSearch (1100, 150, 1110, 160, 0xFFFC9C,1,1) ;Search for pixel (torch next to door)
If Not @error Then ExitLoop
Sleep(10)
If TimerDiff ($Timer2) >= 8000 Then ExitLoop ;If 5 seconds has passed exitloop
WEnd
Send("{Esc}")
Sleep(200)
MouseClick( "Left", 949, 576)
Sleep(2000)
While 1
PixelSearch (904, 617, 1016, 646, 0x370C00,1,1) ;Search for pixel (Disconnect message)
If @error Then ExitLoop
If Not @error Then MouseClick( "Left", 964, 630)
Sleep(2000)
WEnd
EndIf
WEnd
Func Pause()
$Leave = False
EndFunc
Func Stop()
Exit
EndFunc
Func Leave()
$Leave = True
EndFunc