Code:
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.6.1
Author: j0achim @ www.ownedcore.com - http://www.ownedcore.com/forums/members/625808-j0achim.html
Date: 08.06.2012
Script Version: 1.1
Name: j-BastionBot
Script Function:
Repeating a part of Quest 1 in Act 3 "Light the Beacons",
after you start the quest (you can start the very first quest in act 3)
there is a point where you port to a guard that rambles about
Lighting the Beacons, you need to manually go to this fella and leave game.
When your in the menu simply start the script.
Enjoy!
I give you this for free in the hope that you return the favor by showing your appreciation.
Developer comment:
Have ran this script for a little over 2 weeks and leveled a whole bunch of new characters.
If i can recommend quickest way to get lvl 60 do following.
1-25~30 on Normal mode. 2~ hours.
25-50 on Nightmare mode. 5~ hours.
50-60 on Hell mode. 3~ hours.
These times are merely rough estimates, as this is a script it can fail,
disconnected from server for instance. However you check in on bot every now and then
and you will easily be able to level 1 level 60 in a single day!
Friends have requested features such as looting gold and such, but just to answer it right away
it will simply slow down the process considerably and the gain is so little that one hour farming
and you have earned the "lost" amount due to the script not looting.
Questions and Answers:
Q: Bot leaves the game so quickly is it failing?
A: No this is by design we want as many as possible runs per hour. This is the key behind the quick leveling.
Q: Not all monsters die?!
A: There are many factors, this is meant for characters that have no run speed bonus. And if your pc is incredibly
slow it could mess up the script making it delay actions till the time window has expired. I.e running virtual machines
to level multiple toons at same time. (I do that.)
Q: Please make it loot!
A: No. Dont want it, dont need it.
#ce ----------------------------------------------------------------------------
HotKeySet("x","endbot")
HotKeySet("s","toggle")
Global $toggle = True
Global $mode = 0
Global $wpos = WinGetPos("Diablo III")
;Lets make sure user have made Diablo window as small as possible.
WinMove("Diablo III","",$wpos[0],$wpos[1],816, 638)
ConsoleWrite("Starting j-BastionBot by j0achim @ www.ownedcore.com"&@CRLF)
ConsoleWrite("Version: 1.1 - 08.06.2012"&@CRLF)
ConsoleWrite("Greetings to all of the ownedcore community!"&@CRLF&@CRLF)
$q = MsgBox(48+4,"j-BastionBot","You're difficulty set to Hell?")
If $q = 6 Then
$mode = 1
EndIf
WinActivate("Diablo III")
Sleep(500)
$r = 1
$t = TimerInit()
while 1
While $toggle = True
Check()
$wpos = WinGetPos("Diablo III")
If PixelChecksum($wpos[0]+385,$wpos[1]+382,$wpos[0]+389,$wpos[1]+86) = 3014526114 Then ;Error message.
Click(385,382)
MouseMove(Random(10,45),Random(30,40),0)
Sleep(50)
ElseIf PixelChecksum($wpos[0]+76,$wpos[1]+258,$wpos[0]+80,$wpos[1]+262) = 2570191885 Then ;Were in character menu.
Click(76,258)
MouseMove(Random(10,45),Random(30,40),0)
Sleep(50)
ElseIf PixelChecksum($wpos[0]+116,$wpos[1]+608,$wpos[0]+120,$wpos[1]+612) = 3852273597 Then ;Were ingame.
ConsoleWrite("=== STARTING NEW GAME ===" & @CRLF)
ConsoleWrite("Run #: " & $r & @crlf)
$rt = TimerInit()
Sleep(Random(120,130))
ControlSend("Diablo III","","","{SPACE}")
Sleep(Random(550,600))
Click(757,605,"Left",2)
Sleep(Random(1900,1950))
Click(493,333)
Sleep(Random(700,850))
;Mode 1 means we should do some AOE dmg over the guard. This is absolutely needed in Hell mode.
If $mode = 1 Then
ControlSend("Diablo III","","","{SHIFTDOWN}")
Sleep(25)
For $x = 0 to 12
Click(705,410,"Right",10)
Sleep(Random(5,15))
Next
ControlSend("Diablo III","","","{SHIFTUP}")
;Sleep(25)
EndIf
;Back to Camp.
Sleep(Random(10,25))
Click(73,52)
Sleep(Random(1900,1950))
Click(214,143)
Sleep(Random(1900,1950))
;Back to game menu.
ControlSend("Diablo III","","","{ESC}")
Sleep(Random(15,25))
Click(352,349)
$c = 0
Do
Sleep(100)
$c +=1
;Make sure we never get stuck here for infinity.
If $c > 120 Then
ExitLoop
EndIf
Until PixelChecksum($wpos[0]+76,$wpos[1]+258,$wpos[0]+80,$wpos[1]+262) = 2570191885
$srt = TimerDiff($rt)
ConsoleWrite("Runtime: " & Round($srt/1000,2) & " seconds." & @CRLF)
$trt = TimerDiff($t)
$total = Round((($trt/1000)/60)/60,4)
$rph = Round($r/$total)
;Total runtiume calculation.
$hours = Floor((($trt/1000)/60)/60)
$minutes = (($trt/1000)/60)
;trim minutes if runtime is more then 1 hour.
If $minutes > 60 Then
While $minutes > 60
$minutes -=60
WEnd
EndIf
ConsoleWrite("Total runtime: " & $hours & " hours, "& Ceiling($minutes) &" minutes."& @CRLF)
ConsoleWrite("Runs per hour: " & $rph & @CRLF)
;ConsoleWrite("=== RUN #: " & $r & " HAS ENDED ===" & @CRLF & @CRLF)
$r +=1
MouseMove(Random(10,45),Random(30,40),0)
EndIf
Sleep(300)
WEnd
Sleep(300)
WEnd
Func Click($x, $y, $button = "Left", $offset = 5)
Check()
$wpos = WinGetPos("Diablo III")
MouseClick($button,Random(($wpos[0]+$x)-$offset,($wpos[0]+$x)+$offset), Random(($wpos[1]+$y)-$offset,($wpos[1]+$y)+$offset), 1, 3)
Sleep(50)
EndFunc
Func Check()
If Not WinExists("Diablo III","") Then
MsgBox(64,"j-BastionBot","Unable to detect if Diablo III window exists, if this is incorrect please replay in thread about this issue and include as much details as possible."&@CRLF&@CRLF&"Closing!")
Exit
EndIf
If Not WinActive("Diablo III","") Then
WinActivate("Diablo III")
EndIf
$p = WinGetPos("Diablo III","")
If $p[2] <> 816 Or $p[3] <> 638 Then
WinMove("Diablo III", "", $p[0],$p[1], 816, 638)
EndIf
EndFunc
Func toggle()
If $toggle = True Then
ConsoleWrite("Toggle bot OFF."&@CRLF)
$toggle = False
Sleep(100)
Else
ConsoleWrite("Toggle bot ON."&@CRLF)
$toggle = True
Sleep(100)
EndIf
EndFunc
Func endbot()
MsgBox(64,"j-BastionBot", "j-BastionBot stopped.",5)
Exit
EndFunc