$running = 1;
$botting = 0;
$ticks = 0;
$sleeperTick = 0;
$totalTrips = 0;
$hits = 0;
$misses = 0;
WinActivate("Diablo III");
Func Repair()
If ColorScan(1512,36, 1522, 45, 0xffe600) = 1 Then
Send("t");
Sleep(Random(8000, 11000));
MouseClick("left", 202, 636);
Sleep(Random(4000,6000));
MouseClick("left", 331,136);
Sleep(Random(5000,5500));
MouseClick("left", 502, 627);
Sleep(Random(600,1200));
MouseClick("left", 294, 533);
Sleep(Random(333, 777));
MouseClick("left", 511, 22);close
MouseClick("left", 1734, 905);
Sleep(Random(4000, 5000));
MouseClick("left", 1202, 546);
Sleep(Random(100,300));
MouseClick("left", 1370, 170);
Sleep(Random(6000,7500));
EndIf
return;
EndFunc
Func EndAutoItLoop()
$botting = 0;
$running = 0;
Exit;
EndFunc
Func NextGame()
WinActivate("Diablo III");
Sleep(Random(25,352));
MouseClick("left", 1255,1028);
Sleep(Random(250,650));
MouseClick("left", 990, 578);
;AntiDetect(); this adds "breaks" into the code
WaitForGameScreen();
Sleep(Random(200,3002));
MouseClick("left", Random(230, 265), Random(404, 422)); click the resume button
EndFunc
Func StartFromCSS()
WinActivate("Diablo III");
WaitForGameScreen();
Sleep(Random(475,900));
MouseClick("left", Random(230, 265), Random(404, 422)); click the resume button
EndFunc
;simple, but not a bad idea
Func AntiDetect()
If $sleeperTick = 0 Then
$sleeperTick = Random(125, 400)
EndIf
$ticks = $ticks + 1; advance tracker
;when tracker has passed mark reset and wait a short time
If $ticks > $sleeperTick Then
$ticks = 0;
$sleeperTick = Random(125, 400)
Sleep(Random(120000, 720000)); take a little/long break
EndIf
EndFunc
;check for a color in an area
Func ColorScan($l, $t, $r, $b, $c)
WinActivate("Diablo III"); this should ensure the window is visible
$p = PixelSearch($l, $t, $r, $b, $c, 4);
If Not @error Then
Return 1;
EndIf
Return 0;
EndFunc
Func GameScreen()
If ColorScan(234,486,251,503, 0xe39f50) Then
Return 1;
EndIf
Return 0
EndFunc
Func WaitForGameScreen()
While Not GameScreen()
Sleep(100);
WEnd
EndFunc
Func LoadedZone()
If ColorScan(531,978,561,1022, 0x890c07) Then
Return 1;
EndIf
Return 0
EndFunc
Func WaitForZone()
While Not LoadedZone()
Sleep(100);
WEnd
EndFunc
Func OpenGate()
MouseMove(1124, 326);
$p = PixelSearch(870,70,1420,540,0x5675a0,4);
;MsgBox(0,"", ColorScan(870,70,1420,540,0x5675a0));
While ColorScan(870,70,1420,540,0x5675a0) = 1
MouseDown("left");
Sleep(400);
MouseUp("left");
WEnd
EndFunc
;D3 Main Window Class
;Diablo III
;Go Sub Main
Func RunBot()
While($running=1)
Sleep(2500);
MouseClick("left", 268, 779);
Sleep(350);
WEnd
Sleep(Random(28,35));;
RunBot();
EndFunc
HotKeySet("{F7}", "StartFromCSS");
HotKeySet("{F6}", "NextGame");
HotKeySet("{F8}", "EndAutoItLoop");
HotKeySet("{F9}", "Repair");
HotKeySet("{F10}", "RunBot");
;thread loop
While $running = 1
Sleep(100)
If $running = 0 Then
Exit
EndIf
WEnd