Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Opt('MouseCoordMode', 0)
- Opt('PixelCoordMode', 0)
- Opt('SendKeyDelay', 50); Default speed
- HotKeySet('{END}', 'Quit')
- HotKeySet('{F10}', 'Pause')
- Global $Paused
- Global $DebugOn = True
- $Amethyst = 0xA56DF1
- $Ruby = 0xFA8078
- $Emerald = 0x51965B
- $Topaz = 0xFFFF59
- $Left = 64
- $Top = 42
- $Right = 720
- $Bottom = 519
- $Color = 0xFFFF00 ;rare color code
- $Color2 = 0x6969FF ;blue color code
- $Color3 = 0xBF642F ;legendary color code
- $Color4 = 0x00FF00 ;SET color
- ;bot starts paused. press f10 to start.
- Pause()
- WinActivate('Diablo III')
- While 1
- If WinActive('Diablo III') Then
- ;start
- Send("{Space}") ; get rid of any pesky banner
- Send("{Space}") ; get rid of any pesky banner
- checkResume()
- Sleep(Random(500,900))
- Click(134, 255) ;resume
- checkInGame()
- Sleep(Random(500,2000)) ;load
- openSpell()
- $repair = PixelSearch(569,39,597,84,0xFFF000) ;searches top right screen for yellow of broken armor
- If((Not @error ) Or (CheckInv() == 1)) Then
- InvRepair()
- Else
- Send('e')
- Sleep(40)
- Teleport()
- Sleep(40)
- Send('a')
- Sleep(40)
- $yellow = PixelSearch(643, 109, 698, 163, 0xF5CD37, 10)
- If Not @error Then
- Move(66,435)
- Move(134, 249)
- Sleep(Random(1000,1200))
- $blue = PixelSearch(430, 132, 602, 267, 0x5D80DB, 10)
- If Not @error Then
- DEBUG("Cave FOUNDED")
- MouseClick("left", $blue[0], $blue[1])
- Sleep(2000)
- EndIf
- Sleep(500)
- Move(126, 494)
- openSpell()
- Move(219, 282) ;in pos
- Click(349, 595) ;choose hydra
- Click(220, 174) ;cast hydra
- MouseClickDrag ( "right", Random(85,89), Random(169,173) , Random(258,262), Random(104,108), Random(9,12))
- MouseClickDrag ( "right", Random(85,89), Random(169,173) , Random(258,262), Random(104,108), Random(9,12))
- Shoot(161, 128)
- Sleep(500)
- Move(223, 113)
- Sleep(500)
- Move(291, 565)
- Sleep(500)
- Move(305, 227)
- Sleep(500)
- FindItem()
- $death = PixelSearch(285, 491, 308, 508, 0x2C0100,2)
- If @error Then
- $repair = PixelSearch(569,39,597,84,0xFFF000) ;searches top right screen for yellow of broken armor
- If((Not @error ) Or (CheckInv() == 1)) Then
- InvRepair()
- Else
- Sleep(500)
- Send("t")
- Sleep(Random(8000,8500))
- Send("{ESCAPE}") ;opens menu
- Sleep(Random(1000,1200))
- Click(407, 345) ;leave
- Sleep(Random(2000,2200))
- EndIf
- Else
- DEBUG("DEAD")
- Sleep(Random(500,600))
- Send("{ESCAPE}") ;opens menu
- Sleep(Random(1000,1200))
- Click(407, 345) ;leave
- Sleep(Random(12000,13000))
- EndIf
- Else
- $repair = PixelSearch(569,39,597,84,0xFFF000) ;searches top right screen for yellow of broken armor
- If((Not @error ) Or (CheckInv() == 1)) Then
- InvRepair()
- Else
- Move(338, 160)
- Sleep(Random(500,600))
- Send("{ESCAPE}") ;opens menu
- Sleep(Random(1000,1200))
- Click(407, 345) ;leave
- Sleep(Random(12000,13000))
- EndIf
- EndIf
- EndIf
- EndIf
- WEnd
- Func Move($x, $y)
- MouseClick('middle', Random($x - 3, $x + 3), Random($y - 3, $y + 3), 1, Random(0, 1))
- Sleep(Random(1500,1800))
- EndFunc ;==>Move
- Func checkResume()
- Local $check = 0
- If Random(1,50,1) ==20 Then
- DEBUG("REST +-5min")
- Sleep(Random (250000,350000))
- EndIf
- While $check == 0
- $resume = PixelSearch(63, 255, 83, 269, 0x2C0100,10)
- If Not @error Then
- $check = 1
- DEBUG("RESUME")
- Else
- Sleep(100)
- EndIf
- WEnd
- EndFunc
- Func checkInGame()
- Local $check = 0
- While $check == 0
- $inGame = PixelSearch(488, 591, 502, 610, 0x192864,10)
- If Not @error Then
- $check = 1
- DEBUG("InGame")
- Else
- Sleep(100)
- EndIf
- WEnd
- EndFunc
- Func Shoot($x, $y)
- MouseClick('right', $x, $y, Random(280,340))
- Sleep(Random(100, 200))
- EndFunc ;==>Shoot
- Func Teleport()
- MouseMove(59, 199)
- _Send('z', Random(2000,2200))
- Sleep(Random(100, 200))
- EndFunc ;==>Teleport
- Func Click($x, $y)
- MouseClick('left', Random($x - 5, $x + 5), Random($y - 3, $y + 3), 1, Random(0, 1))
- Sleep(Random(100, 200))
- EndFunc ;==>Click
- Func FindItem()
- $work = 1
- $checkCount = 0
- While $work == 1 And $checkCount <10
- DEBUG("Search Item")
- $work = 0
- ;~ $SearchResult = PixelSearch(382, 131, $Right, $Bottom, $Color) ;searches for rares
- ;~ If Not @error Then
- ;~ MouseClick("left", $SearchResult[0], $SearchResult[1], 1, 10) ;IF ITS THERE IT CLICKS IT.
- ;~ Sleep(2500)
- ;~ $work = 1
- ;~ $checkCount = $checkCount +1
- ;~ EndIf
- $SearchResult = PixelSearch($Left, $Top, $Right, $Bottom, $Color2 ) ;searches for magics
- If Not @error Then
- MouseClick("left", $SearchResult[0], $SearchResult[1], 1, 10) ;clicks magic
- Sleep(Random(2400,2600))
- $work = 1
- $checkCount = $checkCount +1
- EndIf
- ;~ $SearchResult = PixelSearch(382, 131, $Right, $Bottom, $Color3 ) ;searches for legendarys
- ;~ If Not @error Then
- ;~ MouseClick("left", $SearchResult[0], $SearchResult[1], 1, 10) ;clicks legendary
- ;~ Sleep(2500)
- ;~ $work = 1
- ;~ $checkCount = $checkCount +1
- ;~ EndIf
- $SearchResult = PixelSearch($Left, $Top, $Right, $Bottom, $Color4) ;searches for SETS
- If Not @error Then
- MouseClick("left", $SearchResult[0], $SearchResult[1], 1, 10) ;IF ITS THERE IT CLICKS IT.
- Sleep(2500)
- $work = 1
- $checkCount = $checkCount +1
- EndIf
- ; search for gems
- $SearchResult = PixelSearch($Left, $Top, $Right, $Bottom, $Amethyst,9) ;searches for gems
- If Not @error Then
- MouseClick("left", $SearchResult[0], $SearchResult[1], 1, 10) ;IF ITS THERE IT CLICKS IT.
- Sleep(Random(2400,2600))
- $work = 1
- $checkCount = $checkCount +1
- EndIf
- $SearchResult = PixelSearch($Left, $Top, $Right, $Bottom, $Ruby,6) ;searches for gems
- If Not @error Then
- MouseClick("left", $SearchResult[0], $SearchResult[1], 1, 10) ;IF ITS THERE IT CLICKS IT.
- Sleep(Random(2400,2600))
- $work = 1
- $checkCount = $checkCount +1
- EndIf
- $SearchResult = PixelSearch(382, 131, $Right, $Bottom, $Topaz,4) ;searches for gems
- If Not @error Then
- MouseClick("left", $SearchResult[0], $SearchResult[1], 1, 10) ;IF ITS THERE IT CLICKS IT.
- Sleep(Random(2400,2600))
- $work = 1
- $checkCount = $checkCount +1
- EndIf
- $SearchResult = PixelSearch($Left, $Top, $Right, $Bottom, $Emerald,9) ;searches for gems
- If Not @error Then
- MouseClick("left", $SearchResult[0], $SearchResult[1], 1, 10) ;IF ITS THERE IT CLICKS IT.
- Sleep(2500)
- $work = 1
- $checkCount = $checkCount +1
- EndIf
- WEnd
- DEBUG("Finish Item Searching")
- EndFunc
- Func CheckInv()
- If Random(1,5,1)==1 Then
- Send("{i}") ;opens inv
- Sleep(Random(200,220))
- $full = PixelSearch(780, 474, 782, 476, 0x130C08,5)
- If @error Then
- DEBUG("FULL")
- Send("{i}") ;close inv
- Return 1
- EndIf
- $full = PixelSearch(754, 474, 756, 476, 0x130C08,5)
- If @error Then
- DEBUG("FULL")
- Send("{i}") ;close inv
- Return 1
- EndIf
- $full = PixelSearch(761, 466, 762, 468, 0x130C08,5)
- If @error Then
- DEBUG("FULL")
- Send("{i}") ;close inv
- Return 1
- EndIf
- Send("{i}") ;close inv
- Return 0
- Else
- Return 0
- EndIf
- EndFunc
- Func InvRepair()
- DEBUG("Going to repair")
- $slot1x = 538
- $slot1y = 367
- $offset = 27
- Send("t")
- Sleep(Random(8000,8200))
- If Random(1,2,1) == 1 Then ;2 merchants
- MouseClick("left", 700, 147) ;begin movement towards merchant
- Sleep(Random(2400,2600))
- MouseClick("left", 531, 51) ;moves to get merchant in screen
- Sleep(Random(3000,3200))
- For $i = 0 To 9
- For $j = 0 To 3
- MouseClick("right", $slot1x + ($i * $offset), $slot1y + ($j * $offset),1,3)
- Sleep(40)
- Next
- Next
- For $i = 5 To 9
- For $j = 4 To 5
- MouseClick("right", $slot1x + ($i * $offset), $slot1y + ($j * $offset),1,3)
- Sleep(40)
- Next
- Next
- Click(294, 296) ;button to open up repair menu
- Else
- MouseClick("left", 39, 389) ;begin movement towards merchant
- Sleep(Random(2400,2600))
- MouseClick("left", 31, 108) ;moves to get merchant in screen
- Sleep(Random(3000,3200))
- For $i = 0 To 9
- For $j = 0 To 3
- MouseClick("right", $slot1x + ($i * $offset), $slot1y + ($j * $offset),1,3)
- Sleep(40)
- Next
- Next
- For $i = 5 To 9
- For $j = 4 To 5
- MouseClick("right", $slot1x + ($i * $offset), $slot1y + ($j * $offset),1,3)
- Sleep(40)
- Next
- Next
- Click(293, 370) ;button to open up repair menu
- EndIf
- Sleep(Random(1500,1600))
- MouseClick("left", 186, 326) ;button to pay for repairs
- Sleep(Random(1500,1600))
- $inBag = PixelSearch(780, 474, 782, 476, 0x130C08,5)
- If @error Then
- DEBUG("Not at shop")
- Sleep(500)
- Send("{ESCAPE}") ;opens menu
- Sleep(Random(1000,1200))
- Click(407, 345) ;leave
- Sleep(Random(12000,13000))
- Else
- Send("{ESCAPE}") ;opens menu
- Sleep(Random(1000,1200))
- Send("{ESCAPE}") ;opens menu
- Sleep(Random(1000,1200))
- Click(407, 345) ;leave
- Sleep(Random(2000,2200))
- EndIf
- EndFunc
- Func Pause()
- $Paused = Not $Paused
- While $Paused
- Sleep(100)
- ToolTip('Paused...', 0, 0)
- WEnd
- ToolTip("")
- EndFunc ;==>Pause
- Func openSpell() ; RANDOM STUFF
- If Random(1,12,1) == 1 Then
- send('s')
- Sleep(Random(2000,3000))
- send('s')
- EndIf
- EndFunc
- Func _Send($text, $milliseconds)
- $time = TimerInit()
- Do
- Send($text)
- Until TimerDiff($time) > $milliseconds
- EndFunc
- Func Quit()
- Exit
- EndFunc ;==>Quit
- Func DEBUG($MESSAGE)
- If $DebugOn Then
- ToolTip($MESSAGE, 0, 0)
- EndIf
- EndFunc ;==>Debug Info
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement