Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Brettbot 1.0
- ;Resolution: 1920x1080 Fullscreen / Fullscreen Windowed
- ;Sword of the Stranger + Royal Crypts Checkpoint
- ;Move bound to Mouse3
- ;Teleport on [Right Click]
- ;Frost Armor with Final Rune on [4]
- ;~20 yard pickup strongly suggested
- ;Base movespeed (decrease sleep in Move() for higher MS
- ;
- ;Start/Pause toggle: [DEL] - begins paused
- ;Quit: [END]
- ;
- ;;;;;
- Func Terminate()
- Exit 0
- EndFunc
- Opt('MouseCoordMode', 0)
- Opt('PixelCoordMode', 0)
- HotKeySet('{END}', "Terminate")
- ;HotKeySet('{END}', 'Quit')
- HotKeySet('{DEL}', 'Pause')
- Global $Paused
- $default_resolutionX = 1920
- $default_resolutionY = 1080
- $loadtime = 5000 ; time in ms the script waits for the game to load before it starts pathfinding.
- $x_ratio = @Desktopwidth / $default_resolutionX
- $y_ratio = @Desktopheight / $default_resolutionY
- $Dead = False
- $Window = False
- $yellow = 0xFFF000 ; yellow color code
- $red = 0xD90000 ; red color code
- ;bot starts paused. press DEL to start.
- Pause()
- WinActivate('Diablo III')
- While 1
- If WinActive('Diablo III') Then
- ;start
- $i = 0 ;resets item pickup counter
- Sleep(Random(500, 1000))
- Click(234, 413);resume
- Sleep(Random(1500, 1600))
- Send("{4 down}") ;Holds the 4 key down while loading game
- Sleep(2500) ;load time
- Call("CheckRepair") ;looking to repair, repairs and restarts if detected
- Move(1804, 1003);First click towards waypoint
- Sleep(1550)
- Move(1599, 649);near the waypoint
- Sleep(1150)
- Move(1513, 81);aiming for the gate
- Sleep(2300) ;a bit of extra wait time for the coffin drop
- Sleep(Random(1,100))
- MouseClick( "right",1095, 337, 1, Random(0, 1)) ;teleport past gate
- Sleep(600)
- Move(1348, 453);post-blink move to the right
- Sleep(300)
- Move(1448, 123);heading towards the center
- Sleep(1800)
- Move( 854, 193) ;move into the west corner
- Sleep(900)
- Move( 806, 401) ;move more in west corner
- Move( 1260, 211) ;move into west hallway entrance
- Sleep(1000)
- Move( 215, 67) ;down west hallway
- Sleep(2800)
- Move(1141, 395) ; Turn
- Move(1898, 1059) ;New Up
- Sleep(1450)
- Move( 1664, 571);mouth of north corner
- Sleep(1400)
- Move( 1256, 350);into north corner
- Sleep(400)
- Move( 1300, 605);end of north corner
- Sleep(Random(50, 150))
- MouseClick( "right", 1676, 957, 1, Random(0, 1));blinking past the center
- Sleep(500)
- Move(1482, 892) ;post blink move to the east corner
- Sleep(700)
- Move(618, 667) ;extra corner point
- Sleep(400)
- Move(669, 498) ;get left pot cluster in east corner
- Move( 930, 932);move into east hall entrance
- Sleep(300)
- Move( 1673, 1036) ;head down east hall
- Sleep(1100)
- Move( 1698, 946) ;head down east hall
- Sleep(300)
- Send("{4 up}") ;Releases the 4 key
- Sleep(400)
- Send("{4 down}") ;Holds the 4 key down
- Sleep(400)
- Move(1375, 752) ;last bit of east hall
- Sleep(400)
- Move( 700, 676) ;turn
- Move( 209, 12) ;head to east hall entrance
- Sleep(3300)
- Move( 165, 306) ;south corner pots
- Sleep(Random(1900, 2000))
- MouseClick( "right", 107, 419, 1, Random(0, 1)) ;last bit of gold from south corner pots / run away
- Sleep(200)
- Send("{4 up}") ;Releases the 4 key
- Sleep(Random(400, 500))
- Send("t") ;tping
- Sleep(Random(8200, 8250));channel time + load time
- $Pixeltest = PixelGetColor(758, 918) ;checks if you're in town
- If Hex($Pixeltest, 6) == "62969B" Then
- Send("{Escape}") ;menu
- Sleep(300)
- Click(970, 578) ;quit
- Sleep(3000) ;waits a short time for in-town quitting
- Else ;town portal not successful
- Send("{Escape}") ;menu
- Sleep(300)
- Click(970, 578) ;quit
- Sleep(Random(13000, 13050)) ;long wait for hard quit
- Endif
- EndIf
- WEnd
- Func Pause()
- $Paused = Not $Paused
- While $Paused
- Sleep(100)
- ToolTip('Paused...', 0, 0)
- WEnd
- ToolTip("")
- EndFunc ;==>Pause
- Func Move($x, $y)
- Call("CheckLoot")
- MouseClick('middle', Random($x - 2, $x + 2), Random($y - 2, $y + 2), 1, Random(0, 1))
- Sleep(Random(750, 850))
- EndFunc ;==>Move
- Func Click($x, $y)
- MouseClick('left', Random($x - 4, $x + 4), Random($y - 4, $y + 4), 1, Random(0, 2))
- Sleep(Random(1000, 1500))
- EndFunc ;==>Click
- Func CheckLoot()
- ;Sleep(Random(100,200))
- $Pixel4 = PixelSearch(Round(270*$x_ratio), 0, Round(1690*$x_ratio), Round(900*$y_ratio), 0xBF642F, 1) ;searches main window for color of legendary lootz
- If Not @error Then
- MouseClick ('left', $Pixel4[0], $Pixel4[1])
- Sleep(Random(300,600))
- $i+= 1
- If $i < 10 Then
- Call("CheckLoot")
- EndIf
- EndIf
- $Pixel5 = PixelSearch(Round(270*$x_ratio), 0, Round(1690*$x_ratio), Round(900*$y_ratio), 0xFFFF00, 1) ; rare lootz (also f3f45b)
- If Not @error Then
- MouseClick ('left', $Pixel5[0], $Pixel5[1])
- Sleep(Random(300,600))
- $i+= 1
- If $i < 10 Then
- Call("CheckLoot")
- EndIf
- EndIf
- $Pixel6 = PixelSearch(Round(270*$x_ratio), 0, Round(1690*$x_ratio), Round(900*$y_ratio), 0x00FF00, 1) ; set lootz
- If Not @error Then
- MouseClick ('left', $Pixel6[0], $Pixel6[1])
- Sleep(Random(300,600))
- $i+= 1
- If $i < 10 Then
- Call("CheckLoot")
- EndIf
- EndIf
- EndFunc
- Func CheckDead()
- Call("CheckWindow")
- $Pixeltest = PixelGetColor(Round(740*$x_ratio), Round(850*$y_ratio))
- If Hex($Pixeltest, 6) == "0C0404" OR Hex($Pixeltest, 6) == "310000" Then
- If Not $Window Then
- $Dead = True
- Sleep(100)
- Send("{Escape}")
- Sleep(10)
- MouseClick("left", Round(956*$x_ratio),Round(579*$y_ratio)) ;button to leave game
- Sleep(12500)
- Sleep($loadtime)
- MouseClick("left", Round(230*$x_ratio),Round(416*$y_ratio)) ;button to resume game from main menu
- Sleep($loadtime)
- ElseIf $Window Then
- MouseClick("left", Round(230*$x_ratio),Round(416*$y_ratio)) ;button to resume game from main menu
- Sleep(Random(1500, 1600))
- Send("{4 down}") ;Holds the 4 key down
- Sleep(2500) ;load time
- $Window = False
- EndIf
- ; ElseIf Hex($Pixeltest, 6) == "0C0000" OR Hex($Pixeltest, 6) == "030101" Then
- ; Sleep(10000)
- ; If Not $Window Then
- ; $Dead = True
- ; Sleep($loadtime)
- ; MouseClick("left", Round(230*$x_ratio),Round(416*$y_ratio)) ;button to resume game from main menu
- ; Sleep($loadtime)
- ; ElseIf $Window Then
- ; MouseClick("left", Round(230*$x_ratio),Round(416*$y_ratio)) ;button to resume game from main menu
- ; Sleep($loadtime)
- ; $Window = False
- ; EndIf
- Else
- $Dead = False
- EndIf
- EndFunc
- Func CheckWindow()
- $Pixeltest2 = PixelGetColor(Round(1580*$x_ratio), Round(100*$y_ratio))
- If Hex($Pixeltest2, 6) == "653B23" Then
- Sleep(200)
- Send("{V}") ;close any open windows
- $Window = True
- Else
- $Window = False
- EndIf
- Sleep(300)
- EndFunc
- Func CheckRepair()
- Sleep(1000)
- $RepairArea = PixelSearch(Round(1480*$x_ratio), 0, Round(1900*$x_ratio), Round(50*$y_ratio), $yellow)
- If Not @error Then
- Call("DoRepair")
- EndIf
- $RepairAreaRed = PixelSearch(Round(1480*$x_ratio), 0, Round(1900*$x_ratio), Round(50*$y_ratio), $red)
- If Not @error Then
- Call("DoRepair")
- EndIf
- EndFunc
- Func DoRepair()
- Sleep(100)
- Send("{4 up}") ;Releases the 4 key
- Sleep(1000)
- Send("t")
- Sleep(8000)
- MouseClick("left", Round(1480*$x_ratio),Round(281*$y_ratio)) ;begin movement towards merchant
- Sleep(1500)
- MouseClick("left", Round(1316*$x_ratio),Round(206*$y_ratio)) ;moves to get merchant in screen
- Sleep(1500)
- MouseClick("left", Round(845*$x_ratio),Round(225*$y_ratio)) ;NPC Merchant to the right of cain's home
- Sleep(1200)
- MouseClick("left", Round(521*$x_ratio),Round(506*$y_ratio)) ;button to open up repair menu
- Sleep(400)
- MouseClick("left", Round(260*$x_ratio),Round(595*$y_ratio)) ;button to pay for repairs
- Sleep(100)
- Call("CheckDead")
- Call("CheckWindow")
- If Not $Dead Then
- Send("{ESCAPE}") ;closes repair tab
- Sleep(100)
- Send("{ESCAPE}") ;menu
- Sleep(10)
- MouseClick("left", Round(956*$x_ratio),Round(579*$y_ratio)) ;button to leave game
- Sleep($loadtime)
- MouseClick("left", Round(230*$x_ratio),Round(416*$y_ratio)) ;button to resume game from main menu
- Sleep(Random(1500, 1600))
- Send("{4 down}") ;Holds the 4 key down
- Sleep(4500) ;load time
- EndIf
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement