[Gold/Item Farming] Shimizoki's Sarkoth DH Script [AutoIt] menu

Shout-Out

User Tag List

Page 39 of 135 FirstFirst ... 35363738394041424389 ... LastLast
Results 571 to 585 of 2011
  1. #571
    Angrycoder's Avatar Knight-Lieutenant
    Reputation
    20
    Join Date
    Jun 2012
    Posts
    370
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I now see why i get a banner from time to time. On the logout.

    When i start the game, if there are mobs at the checkpoint, and those mobs kill you instantly (before you start pathing). This is when it bugs. It will still logout correctly, but the mouse keeps moving as if the script is still running, even tho its logging out. So when you get to the main menu, its clicking and thus opens the banner.

    Seen this twice now, almost back to back, and both times it was when i died at the checkpoint. The other time i seen this happen was teleporting (failed to find the cellar), and died during near the end of the teleport.

    [Gold/Item Farming] Shimizoki's Sarkoth DH Script [AutoIt]
  2. #572
    qzy's Avatar Private
    Reputation
    1
    Join Date
    Jun 2012
    Posts
    2
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i got this when i try run the script

    edit: fixed (typo in image path location)
    Attached Thumbnails Attached Thumbnails [Gold/Item Farming] Shimizoki's Sarkoth DH Script [AutoIt]-error-png  
    Last edited by qzy; 06-16-2012 at 06:50 PM.

  3. #573
    satan2004's Avatar Member
    Reputation
    8
    Join Date
    Apr 2007
    Posts
    49
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I got a question ive been editing a little in your script to make it better for me and its doing something weird,

    i go to the doorway and kill the mobs then its supposed to walk to sarkoth corpse and start Checkloot

    But its goes way north of that and runs against chest, then check loot comes


    I have NO idea what is causing this
    and ive checked the script 50x

    Code:
    #include <ImageSearch.au3>
    
    Global $Paused
    Global $ini = "S-SarkothBot.ini"
    Global $log = "S-SarkothBot.log"
    
    
    ;Get Window Status
    Opt('MouseCoordMode', 2)
    Opt('PixelCoordMode', 2)
    $size = WinGetClientSize("[TITLE:Diablo III; CLASS:D3 Main Window Class]")
    If ($size[0]/$size[1]) <> 16/9 Then $size[1]-=30 ; adjusts ratio for titlebar if not 16:9
    
    
    HotKeySet(",","Leave")  ;script started by pressing =
    HotKeySet(".", "Pause") ;script paused by pressing -
    HotKeySet("-", "Stop") ;script stopped by pressing x
    
    
    $loadtime = 3200 ; time in ms the script waits for the game to load before it starts pathfinding. Slow this down for slower hard drives
    ;$tptime = 6900 ; time in ms the script waits for teleport before exiting the game
    $yellow = 0xFFF000 ; yellow color code (repair icon)
    $red =	0xD90000 ; red color code (repair icon)
    $currentArrayItem = 0
    
    
    ;Sell
    $vendorAll = True
    $vendorRows = 5
    $vendorCols = 10
    
    
    ;Change to match your abilities (1-4 by default)
    $skillSmokeScreen = "1"
    $skillPreperation = "2"
    $skillCompanion = "3"
    $skillCaltrops = "4"
    
    
    ;Stats
    $movementSpeed = 25		;This is the % increase movement speed you have. 25 = 25%, 0 = 0%, 50 = 50%
    $pickupRadius = 12		;Pickup globe/gold radius
    
    
    ;Custom Loot
    $pngLoc = "C:\Users\Kalenen\Desktop\DH\PICS\"	;Location of the .PNGs
    $totalItems = 1 			;Number of items in the pick array
    Global $pick[$totalItems] 	;DONT CHANGE THIS
    
    
    ;Array of items to loot
    $pick[0] = "mythic.png|40"	;png|Tolerance
    ;$pick[1] = "item2.png"
    ;$pick[2] = "item3.png"
    
    
    ;Looting
    $LootSets = True 		;True if you want to pick up Sets
    $LootLegendaries = True	        ;True if you want to pick up Legendaries
    $LootRares = True 		;True if you want to pick up Rares
    $LootMagic = True 		;True if you want to pick up Magic
    $LootGems = False 		;True if you want to pick up Gems
    $LootTomes = False 		;True if you want to pick up Tome of Secrets (Automatically picked up when LootMagic is True)
    $LootCustom = False		;True if you want to pick up Custom Items (The items in the pick array above)
    
    
    ;Manage Loot
    $mLoot = 30 				;Nuber of successful runs until Stash and Vendor
    $mLootOff = 10 			;Stash and Vendor after mLoot +- X number of runs (Variability)
    
    
    ;Stashing
    $StashLoot = True 		;True if you want to store Items in the stash
    $StashLegendary = True 	;True if you want to store Legendary items in the stash
    $StashRare = True 		;True if you want to store Rare items in the stash
    $StashMagic = False 	;True if you want to store Magic items in the stash
    $StashTomes = False 		;True if you want to store Tomes items in the stash
    
    
    ;Vendoring
    $VendorLoot = True 		;True if you want to vendor Items
    $VendorRare = False 	;True if you want to vendor Rares
    $VendorMagic = False 	;True if you want to vendor Magic
    
    
    ;Variability
    $Timer = False 			;True and the bot will add random sleep intervals
    
    
    ;Options
    $CreateLog = True		;True if you want to create a log file
    $autoUpdate = True		;True if you want to automatically download new versions of this bot
    
    
    $go = True
    $Leave = False
    $Dead = False
    $Logout = False
    $Window = False
    $default_resolutionX = 1920		;DO NOT CHANGE
    $default_resolutionY = 1080		;DO NOT CHANGE (seriously... i'll beat you with a stick)
    $x_ratio = $size[0] / $default_resolutionX
    $y_ratio = $size[1] / $default_resolutionY
    $gX = 0
    $gY = 0
    $i = 0
    
    
    ;Counts
    $LegendaryCount = 0
    $SetCount = 0
    $RareCount = 0
    $MagicCount = 0
    $GemCount = 0
    $TomeCount = 0
    $runCount = 0
    $cellarCount = 0
    $deathCount = 0
    
    
    $t = TimerInit()
    $rt = 0
    
    
    ;INI File
    If FileExists($ini) Then
    	ReadINI()
    Else
    	CreateINI()
    EndIf
    
    
    ;Update Bot
    If $autoUpdate == True Then
    	Call("DoUpdate")
    EndIf
    
    
    ;Log File
    If $CreateLog == True Then
    	$LogFile = FileOpen($log, 2)
    EndIf
    
    
    ;Calculate new values
    $mLootIn = $mLoot ;DO NOT CHANGE, how many more runs till next manage
    $movementSpeed = 1+($movementSpeed/100)
    
    
    ;Main
    While $go
    	Call("RunBot")
    WEnd
    
    
    ;Script
    Func RunBot()
    	if($Leave) Then
    		$i = 0
    
    
    		If CheckFor("DisconnectError", "", 720*$x_ratio, 360*$y_ratio, 1200*$x_ratio, 480*$y_ratio, .5) Then
    			LogWrite("Disconnected" & @CRLF)
    			RandClick("left", Round(960*$y_ratio), Round(635*$x_ratio), 50 ,10)
    			Sleep(Random(1000, 2000))
    		EndIf
    
    
    		;Checks if the player is in the Main Menu
    		If CheckFor("MainMenu", "", 0*$x_ratio, 360*$y_ratio, 480*$x_ratio, 480*$y_ratio) Then
    			$runCount += 1
    			LogWrite(@CRLF & "Run Number: " & $runCount & " - Runs till management: " & $mLootIn & @CRLF & "Main Menu" & @CRLF)
    			RandSleep(180, 300, 2)
    			While True
    				RandClick("left", Round(230*$x_ratio), Round(416*$y_ratio), 120, 20) ;Random Click on the resume button
    				If CheckFor("LimitError", Round(720*$x_ratio), Round(480*$y_ratio), Round(960*$x_ratio), Round(600*$y_ratio), 1) Then
    					Sleep(Random(1000, 2000))
    					RandClick("left", Round(960*$y_ratio), Round(635*$x_ratio), 50 ,10)
    					$rand = Random(40000, 80000)
    					LogWrite("Input Limit Reached - Waiting " & Round($rand/1000) & " seconds." & @CRLF)
    					Sleep($rand)
    				Else
    					ExitLoop
    				EndIf
    			WEnd
    			UpdateTooltip()
    			$rt = TimerInit()
    			$Window = False
    			$Logout = False
    		Else
    			LogWrite($pngLoc & "MainMenu.png not recognized")
    			RandMove($size[0],$size[1])
    			Return
    		EndIf
    
    
    		;Checks that the player is in the Old Ruins
    		If CheckFor("OldRuins", "Area", 1560*$x_ratio, 0*$y_ratio, 1920*$x_ratio, 40*$y_ratio) Then
    			LogWrite("Old Ruins" & @CRLF)
    
    
    			;Start Run
    			RandClick("middle", Round(500*$x_ratio), Round(250*$y_ratio), 5, 5) ;starts the run [waypoint 1]
    			Moving(1125)
    			Send($skillSmokeScreen)
    			Moving(440)
    			RandClick("middle", 1, Round(370*$y_ratio), 5, 5) ;waits ~1 second then [waypoint 2]
    			Moving(1875)
    			RandClick("middle", Round(400*$x_ratio), Round(600*$y_ratio), 5, 5) ;middle of courtyard [waypoint 3]
    			Moving(50)
    			Send($skillSmokeScreen)
    			Moving(25)
    			Send($skillPreperation)
    			Moving(750)
    			RandMove(Round(300*$x_ratio),Round(80*$y_ratio), 5, 5) ;moves cursor over to the cellar so the proper blue pixel becomes highlighted
    			;Sleep(790)
    			Call("CheckDead")
    			If $Dead Then
    				Return
    			EndIf
    
    
    			;Checks if Dank Cellar is Open
    			LogWrite("Cellar Check ")
    			$Pixel2 = PixelSearch(0,0, Round(600*$x_ratio), Round(600*$y_ratio),0x334FB7,3)
    			If Not @error Then
    			LogWrite("- Found" & @CRLF)
    				RandClick("left", Round(300*$x_ratio), Round(80*$y_ratio), 10, 10) ;Entrance to cellar
    				Moving(1150)
    				Send($skillSmokeScreen)
    				Moving(2500)
    			Else ;ABORT RUN
    				LogWrite("- Not Found" & @CRLF)
    				Sleep(10)
    				Send($skillSmokeScreen)
    				Sleep(40)
    				Call("TownPortal")
    				If Not $Logout And Not $Dead And Not $Window Then
    					;Check if player needs to repair
    					Call("CheckRepair")
    					Call("LeaveGame")
    					Return
    				Else
    					$Window = False ; reset the flag so it doesn't think a window is always up
    					Return
    				EndIf
    			EndIf
    
    
    			Call("CheckDead")
    			If $Dead or $Logout Then
    				Return
    			EndIf
    
    
    		Else
    			LogWrite("- Old Ruins" & @CRLF)
    			Call("TownPortal")
    			If $Dead Then
    				Return
    			EndIf
    			Call("LeaveGame")
    			Return
    		EndIf
    
    
    		;Checks that the player is in the Dank Cellar
    		If CheckFor("DankCellar", "Area", 1560*$x_ratio, 0*$y_ratio, 1920*$x_ratio, 40*$y_ratio) Then
    			LogWrite("Dank Cellar" & @CRLF)
    			$cellarCount += 1
    			UpdateTooltip()
    			RandClick("middle", Round(69*$x_ratio), Round(779*$y_ratio), 10, 10) ;moves to doorway leading to rare inside cellar
    			Moving(2750)
    			RandMove(Round(409*$x_ratio),Round(239*$y_ratio), 10, 10) ;hovers over the rare Sarkoth
    			Send("{SHIFTDOWN}")
    			Sleep(10)
    			Send(4)
    			Sleep(300)
    			Send(4)
    			RandMove(Round(555*$x_ratio),Round(219*$y_ratio), 10, 10) ;hovers over the rare Sarkoth
    			Sleep(300)
    			Send(4)
    			Sleep(500)
    			Send($skillCompanion)
    			LogWrite("Attacking Sarkoth" & @CRLF)
    			MouseDown("right") ;ATTACK
    			Sleep(2500)
    			MouseUP("right")
    			MouseDown("left") ;ATTACK
    			Sleep(7000)
    			MouseUP("left")
    			Sleep(50)
    			MouseDown("right") ;ATTACK
    			Sleep(6000)
    			MouseUP("right")
    			Send("{SHIFTUP}")
    			Sleep(300)
    			Call("Loot")
    			Call("TownPortal")
    			If $Dead or $Logout Then
    				Return
    			EndIf
    		Else
    			LogWrite("- Dank Cellar" & @CRLF)
    			Sleep(620)
    			Send($skillSmokeScreen)
    			Sleep(40)
    			Call("TownPortal")
    			If $Dead Then
    				Return
    			EndIf
    			Call("LeaveGame")
    		EndIf
    
    
    		;After successful run
    		If Not $Logout And Not $Dead And Not $Window Then
    			If $mLootIn <= 1 Then ;If its time to manage loot
    				If $StashLoot == True Then
    					Call("StashLoot")
    				EndIf
    				If $VendorLoot == True Then
    					Call("VendorLoot")
    				EndIf
    				$mLootIn = Round(Random($mLoot-$mLootOff, $mLoot+$mLootOff)) ;Reset Counter
    			Else
    				;Check if player needs to repair
    				Call("CheckRepair")
    				$mLootIn -= 1
    			EndIf
    			Call("LeaveGame")
    			Return
    		Else
    			$Window = False ; reset the flag so it doesn't think a window is always up
    			Return
    		EndIf
    	EndIf
    EndFunc
    
    
    ;Helper Functions
    Func CheckDead()
    	$YouHaveDied = PixelSearch(Round(620*$x_ratio), Round(325*$y_ratio), Round(625*$x_ratio), Round(330*$y_ratio), 0xFFFFFF) ; checks for white text "YOU HAVE DIED"
    	If Not @error Then
    		$deathCount += 1
    		UpdateTooltip()
    		LogWrite("Death - ")
    		$Dead = True
    		Call("LeaveGame")
    		Sleep(11000)
    	Else
    		$Dead = False
    	EndIf
    
    
    	$LogoutTimerCancel = PixelSearch(Round(900*$x_ratio), Round(240*$y_ratio), Round(1010*$x_ratio), Round(290*$y_ratio), 0x993827) ; checks for cancel button on logout timer
    	If Not @error Then
    		Sleep(11000)
    		$Dead = True
    	Else
    		$Dead = False
    	EndIf
    EndFunc
    
    
    Func CheckRepair()
    	ConsoleWrite("LF NT")
    	If CheckFor("NewTristram", "Area", 1560*$x_ratio, 0*$y_ratio, 1920*$x_ratio, 40*$y_ratio) Then
    		;Sleep(250)
    		ConsoleWrite(", F NT, LF Rep")
    		$RepairArea = PixelSearch(Round(1480*$x_ratio), 0, Round(1570*$x_ratio), Round(100*$y_ratio), $yellow)
    		If Not @error Then
    			Call("DoRepair")
    		EndIf
    
    
    		$RepairAreaRed = PixelSearch(Round(1480*$x_ratio), 0, Round(1570*$x_ratio), Round(100*$y_ratio), $red)
    		If Not @error Then
    			Call("DoRepair")
    		EndIf
    	EndIf
    EndFunc
    
    
    Func DoRepair()
    	Sleep(Random(75, 150))
    	MouseClick("left", Round(1480*$x_ratio),Round(281*$y_ratio)) ;begin movement towards merchant
    	Moving(1875)
    	MouseClick("left", Round(1316*$x_ratio),Round(206*$y_ratio)) ;moves to get merchant in screen
    	Moving(1875)
    	MouseClick("left", Round(845*$x_ratio),Round(225*$y_ratio)) ;NPC Merchant to the right of cain's home
    	Moving(2000)
    
    
    	;Make sure window is open
    	$VendorFound = PixelSearch(Round(150*$x_ratio), Round(0*$y_ratio), Round(300*$x_ratio), Round(100*$y_ratio), 0xC5C25A) ; checks for the bright spot on bag at top of vendor
    	If Not @error Then
    		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(200)
    		Send("{Escape}")
    		Sleep(500)
    	EndIf
    EndFunc
    
    
    Func CalcTime()
    	$srt = TimerDiff($rt)
    	LogWrite("Runtime: " & Round($srt/1000,2) & " seconds." & @CRLF)
    	$trt = TimerDiff($t)
    	$total = Round((($trt/1000)/60)/60,4)
    
    
    	;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
    	LogWrite("Total Runtime: " & $hours & " hours, "& Ceiling($minutes) &" minutes."& @CRLF)
    EndFunc
    
    
    Func CheckFor($img, $type = "", $startX = 0, $startY = 0, $endX = @DesktopWidth , $endY = @DesktopHeight , $seconds = 5 ,$tolerance = 100)
    	$c = 0
    	$string = $pngLoc & $img & ".png"
    	Do
    		$c +=1
    		Sleep(100)
    		If $c > ($seconds*10) Then ;Make sure we never get stuck here for infinity.
    			If $type = "Area" Then
    				LogWrite("Area not found ")
    			EndIf
    			Return False
    		EndIf
    	Until _ImageSearchArea($string, 1, $startX, $startY, $endX, $endY, $gX, $gY, $tolerance)
    	Return True
    EndFunc
    
    
    Func LeaveGame()
    	$Logout = true
    	Call("RandSleep")
    	LogWrite("Leaving Game" & @CRLF)
    	Sleep(Random(100, 500))
    	Send("{Escape}")
    	Sleep(500)
    	RandClick("left", Round(956*$x_ratio), Round(579*$y_ratio), 120*$x_ratio, 10*$y_ratio) ;Random Click on the leave button
    	Sleep(50)
    	Call("CalcTime")
    EndFunc
    
    
    Func Loot()
    	Sleep(200)
    	LogWrite("Looting" & @CRLF)
    	If $LootSets == True Then
    		$SetCount += LootGear(0x02CE01, 2)
    	EndIf
    	If $LootLegendaries == True Then
    		$LegendaryCount += LootGear(0xBF642F, 0)
    	EndIf
    	If $LootRares == True Then
    		$RareCount += LootGear(0xBBBB00, 2)
    	EndIf
    	If $LootTomes == True Then
    		Call("LootTomes")
    	EndIf
    	If $LootMagic == True Then
    		$MagicCount += LootGear(0x6969FF, 2)
    	EndIf
    	If $LootGems == True Then
    		Call("LootGems")
    	EndIf
    	If $LootCustom == True Then
    		Call("LootCustom")
    	EndIf
    EndFunc
    
    
    Func LootCustom()
    	$currentArrayItem = 0
    	$gX = 0
    	$gY = 0
    	for $i = 0 to ($totalItems - 1)
    		$array = StringSplit($pick[$i],"|")
    		$file = $array[1]
    		$accuracy = $array[2]
    		$urlString = $pngLoc & $file
    		;LogWrite("Looting " & $file & @CRLF)
    		While _ImageSearchArea($pngLoc & $file,1,0,0,@DesktopWidth,@DesktopHeight,$gX,$gY,$accuracy)
    			MouseMove($gX, $gY, 3)
    			sleep(Random(75, 150))
    			MouseClick("left",$gX,$gY,1,1)
    			Moving(1200)
    		WEnd
    	next
    EndFunc
    
    
    Func LootGear($color, $tolerance = 2)
    	$count = 0
    	$Loot = PixelSearch(Round(400*$x_ratio), 0, Round(1690*$x_ratio), Round(900*$y_ratio), $color, $tolerance) ; Magic loot (darker for compatibility)
    	If Not @error Then
    		While Not @error
    			$count += 1
    			MouseClick ('left', $Loot[0], $Loot[1])
    			Moving(900)
    
    
    			;Run at max 10 times per quality
    			If $count >= 10 Then
    				ExitLoop
    			EndIf
    
    
    			$Loot = PixelSearch(Round(400*$x_ratio), 0, Round(1690*$x_ratio), Round(900*$y_ratio), $color, $tolerance) ; Magic loot (darker for compatibility)
    		WEnd
    	EndIf
    	Return $count
    EndFunc
    
    
    Func LootGems()
    	$gX = 0
    	$gY = 0
    
    
    	While _ImageSearchArea($pngLoc & "square.png",1,0,0,@DesktopWidth,@DesktopHeight,$gX,$gY,115)
    		;MouseMove($gX,$gY,3)
    		sleep(Random(75, 150))
    		MouseClick("left",$gX,$gY)
    		$GemCount += 1
    		Moving(900)
    	WEnd
    EndFunc
    
    
    Func LootTomes()
    	$gX = 0
    	$gY = 0
    	$Start = 0
    	;variables are all set, now onto the scan.
    
    
    	While _ImageSearchArea($pngLoc & "tome.png",1,0,0,@DesktopWidth,@DesktopHeight,$gX,$gY,100)
    		;MouseMove($gX,$gY,3)
    		sleep(Random(75, 150))
    		MouseClick("left",$gX,$gY)
    		$TomeCount += 1
    		Moving(900)
    	WEnd
    EndFunc
    
    
    Func Moving($time)
    	Sleep($time/$movementSpeed)
    EndFunc
    
    
    Func RandClick($clickType, $xPos, $yPos, $xOff = 20, $yOff = 20)
    	$randX = Round(Random($xPos-($xOff*$x_ratio), $xPos+($xOff*$x_ratio)))
    	$randY = Round(Random($yPos-($yOff*$y_ratio), $yPos+($yOff*$y_ratio)))
    	MouseClick($clickType, $randX, $randY)
    EndFunc
    
    
    Func RandMove($xPos, $yPos, $xOff = 20, $yOff = 20)
    	$randX = Round(Random($xPos-($xOff*$x_ratio), $xPos+($xOff*$x_ratio)))
    	$randY = Round(Random($yPos-($yOff*$y_ratio), $yPos+($yOff*$y_ratio)))
    	MouseMove($randX, $randY)
    EndFunc
    
    
    Func RandSleep($min = 30, $max = 60, $chance = 5)
    	$randNum = Round(Random(1, 100))
    	;LogWrite("SleepCheck: (" & $randNum & ", " & $chance & ")" & @CRLF)
    
    
    	If $Timer == True And $randNum <= $chance Then
    		$sleepTime = Random($min*1000, $max*1000)
    		LogWrite("Random Sleep - " & Round($sleepTime/1000) & " sec" & @CRLF)
    
    
    		For $c = 0 To 10
    			Sleep($sleepTime/10)
    			ConsoleWrite("|")
    		Next
    		ConsoleWrite(@CRLF)
    	EndIf
    EndFunc
    
    
    Func StashLoot()
    	LogWrite("Putting Items in Stash" & @CRLF)
    	Sleep(Random(1000, 1500))
    	MouseClick("left", 1064*$x_ratio, 256*$y_ratio)
    	Moving(1875)
    
    
    	;Legendaries
    	While $StashLegendary == True
    		Sleep(Random(200, 300))
    		$LegendPixel = PixelSearch(1398*$x_ratio, 572*$y_ratio, 1914*$x_ratio, 888*$y_ratio, 0x4D2C0D, 0)
    		If Not @error Then
    			LogWrite("Stashing Legendary" & @CRLF)
    			MouseClick("right", $LegendPixel[0], $LegendPixel[1])
    		Else
    			ExitLoop
    		EndIf
    	WEnd
    
    
    	;Rares
    	While $StashRare == True
    		Sleep(Random(200, 300))
    		$RarePixel = PixelSearch(1398*$x_ratio, 572*$y_ratio, 1914*$x_ratio, 888*$y_ratio, 0x4A3C0B, 1)
    		If Not @error Then
    			LogWrite("Stashing Rare" & @CRLF)
    			MouseClick("right", $RarePixel[0], $RarePixel[1])
    		Else
    			ExitLoop
    		EndIf
    	WEnd
    
    
    	;Tomes
    	If _ImageSearchArea($pngLoc & "tomeIcon.png",1,1398*$x_ratio, 572*$y_ratio, 1914*$x_ratio, 888*$y_ratio,$gX,$gY,100) And $StashTomes == True Then
    		LogWrite("Stashing Tomes" & @CRLF)
    		MouseClick("left",500*$x_ratio,360*$y_ratio,1,1)
    		Sleep(Random(500, 750))
    		MouseClick("right",$gX,$gY,1,1)
    		Sleep(Random(400, 600))
    		MouseClick("left",500*$x_ratio,200*$y_ratio,1,1)
    		Sleep(Random(200, 500))
    	EndIf
    
    
    	;Magic
    	While $StashMagic == True
    		Sleep(Random(100, 300))
    		$MagicPixel = PixelSearch(1398*$x_ratio, 572*$y_ratio, 1914*$x_ratio, 888*$y_ratio, 0x182037, 2)
    		If Not @error Then
    			LogWrite("Stashing Magic" & @CRLF)
    			MouseClick("right", $MagicPixel[0], $MagicPixel[1])
    		Else
    			ExitLoop
    		EndIf
    	WEnd
    
    
    	Sleep(Random(500, 1000))
    	LogWrite("Done with Stash" & @CRLF)
    	Send("{ESCAPE}")
    EndFunc
    
    
    Func TownPortal()
    	LogWrite("Returning to Town" & @CRLF)
    	Send("t")
    	Sleep(6900)
    	Call("CheckDead")
    EndFunc
    
    
    Func VendorLoot()
    	LogWrite("Vendoring Items" & @CRLF)
    
    
    	If Not $StashLoot Then ;Move from TP towards vendor
    		Sleep(Random(300, 500))
    		MouseClick("left", 1565*$x_ratio, 50*$y_ratio)
    	Else ;Move from Stash towards vendor
    		Sleep(Random(300, 500))
    		MouseClick("left", 1560*$x_ratio, 120*$y_ratio)
    	EndIf
    	Moving(3000)
    	MouseClick("left", 1030*$x_ratio, 210*$y_ratio) ;Talk to vendor
    	Moving(3000)
    
    
    	;All
    	If $vendorAll == True Then
    		For $c = 1 To $vendorCols
    			For $r = 1 To $vendorRows
    				MouseClick("right", (((($c-1)*10)+32+1398)*$x_ratio), (((($r-1)*51)+32+572)*$y_ratio))
    			Next
    		Next
    	EndIf
    
    
    	;Rares
    	If $VendorRare == True Then
    		LogWrite("Selling Rare - ")
    		$c = 0
    		While $VendorRare
    			Sleep(Random(50, 50))
    			$RarePixel = PixelSearch(1398*$x_ratio, 572*$y_ratio, 1914*$x_ratio, 888*$y_ratio, 0x4A3C0B, 1)
    			If Not @error Then
    				MouseClick("right", $RarePixel[0], $RarePixel[1])
    				$c += 1
    			Else
    				LogWrite($c & @CRLF)
    				ExitLoop
    			EndIf
    		WEnd
    	EndIf
    
    
    	;Magic
    	If $VendorMagic == True Then
    		LogWrite("Selling Magic - ")
    		$c = 0
    		While True
    			Sleep(Random(50, 50))
    			$MagicPixel = PixelSearch(1398*$x_ratio, 572*$y_ratio, 1914*$x_ratio, 888*$y_ratio, 0x182037, 2)
    			If Not @error Then
    				MouseClick("right", $MagicPixel[0], $MagicPixel[1])
    				$c += 1
    			Else
    				LogWrite($c & @CRLF)
    				ExitLoop
    			EndIf
    		WEnd
    	EndIf
    
    
    	Sleep(Random(50, 100))
    	LogWrite("Done With Vendor" & @CRLF)
    	Send("{ESCAPE}")
    EndFunc
    
    
    ;Hotkey Functions
    Func Leave()
       $Leave = True
    EndFunc
    
    
    Func Pause()
       $Leave = False
    EndFunc
    
    
    Func Stop() ;to allow the script to stop
    	LogWrite(@CRLF & "Legendary:" & $LegendaryCount & " Set:" & $SetCount & " Rare:" & $RareCount & " Magic:" & $MagicCount & " Gem:" & $GemCount & " Tome:" & $TomeCount & @CRLF)
    	If $CreateLog == True Then
    		FileClose($LogFile)
    	EndIf
        Exit
    EndFunc
    
    
    ;Settings Functions
    Func CreateINI()
    	IniWrite($ini,"Options", "AutoUpdate", $autoUpdate)
    	IniWrite($ini,"Options", "Physical Log", $CreateLog)
    
    
    	IniWrite($ini, "Skills", "Caltrops", $skillCaltrops)
    	IniWrite($ini, "Skills", "Companion", $skillCompanion)
    	IniWrite($ini, "Skills", "Preperation", $skillPreperation)
    	IniWrite($ini, "Skills", "SmokeScreen", $skillSmokeScreen)
    
    
    	IniWrite($ini, "Looting", "Sets", $LootSets)
    	IniWrite($ini, "Looting", "Legendaries", $LootLegendaries)
    	IniWrite($ini, "Looting", "Rares", $LootRares)
    	IniWrite($ini, "Looting", "Magic", $LootMagic)
    	IniWrite($ini, "Looting", "Gems", $LootGems)
    	IniWrite($ini, "Looting", "Tomes", $LootTomes)
    	IniWrite($ini, "Looting", "Custom", $LootCustom)
    
    
    	IniWrite($ini, "Custom Loot", "PNG Location", $pngLoc)
    	IniWrite($ini,"Custom Loot", "Total Items", $totalItems)
    
    
    	;Array of items to loot
    	;$pick[0] = "mythic.png|40"	;png|Tolerance
    	;$pick[1] = "item2.png"
    	;$pick[2] = "item3.png"
    
    
    	IniWrite($ini, "ManageLoot","How Often", $mLoot)
    
    
    	IniWrite($ini, "Stashing", "Loot", $StashLoot)
    	IniWrite($ini, "Stashing", "Legendaries", $StashLegendary)
    	IniWrite($ini, "Stashing", "Rares", $StashRare)
    	IniWrite($ini, "Stashing", "Magic", $StashMagic)
    	IniWrite($ini, "Stashing", "Tomes", $StashTomes)
    
    
    	IniWrite($ini, "Vendoring", "Loot", $VendorLoot)
    	IniWrite($ini, "Vendoring", "Rares", $VendorRare)
    	IniWrite($ini, "Vendoring", "Magic", $VendorMagic)
    
    
    	IniWrite($ini, "Variability", "Timer", $Timer)
    	IniWrite($ini, "Variability", "ManageLoot", $mLootOff)
    
    
    	IniWrite($ini, "Additional", "Movement Speed", $movementSpeed)
    	IniWrite($ini, "Additional", "Pickup Radius", $pickupRadius)
    
    
    	IniWrite($ini, "Beta", "Area", $vendorAll)
    	IniWrite($ini, "Beta", "Rows", $vendorRows)
    	IniWrite($ini, "Beta", "Cols", $vendorCols)
    EndFunc
    
    
    
    
    Func LogWrite($text)
    	ConsoleWrite($text)
    	If $CreateLog == True Then
    		FileWriteLine($LogFile, $text)
    	EndIf
    EndFunc
    
    
    Func UpdateTooltip()
    	ToolTip("Runs: " & $runCount & ", Cellar Found: " & Round(($cellarCount/$runCount)*100) & "%, Deaths: " & $deathCount, 0, $size[1]-30)
    EndFunc
    
    
    Func ReadINI()
    	$autoUpdate = IniRead($ini,"Options", "AutoUpdate", $autoUpdate)
    	$CreateLog = IniRead($ini,"Options","Physical Log",$CreateLog)
    
    
    	$skillCaltrops = IniRead($ini, "Skills","Caltrops",$skillCaltrops)
    	$skillCompanion = IniRead($ini,"Skills","Companion",$skillCompanion)
    	$skillPreperation = IniRead($ini,"Skills","Preperation",$skillPreperation)
    	$skillSmokeScreen = IniRead($ini,"Skills","SmokeScreen",$skillSmokeScreen)
    
    
    	$LootSets = IniRead($ini,"Looting","Sets",$LootSets)
    	$LootLegendaries = IniRead($ini,"Looting","Legendaries",$LootLegendaries)
    	$LootRares = IniRead($ini,"Looting","Rares",$LootRares)
    	$LootMagic = IniRead($ini,"Looting","Magic",$LootMagic)
    	$LootGems = IniRead($ini,"Looting","Gems",$LootGems)
    	$LootTomes = IniRead($ini,"Looting","Tomes",$LootTomes)
    	$LootCustom = IniRead($ini,"Looting","Custom",$LootCustom)
    
    
    	$pngLoc = IniRead($ini,"Custom Loot","PNG Location",$pngLoc)
    	$totalItems = IniRead($ini,"Custom Loot","Total Items",$totalItems)
    
    
    	;Array of items to loot
    	;$pick[0] = "mythic.png|40"	;png|Tolerance
    	;$pick[1] = "item2.png"
    	;$pick[2] = "item3.png"
    
    
    	$mLoot = IniRead($ini,"ManageLoot","How Often",$mLoot)
    
    
    	$StashLoot = IniRead($ini,"Stashing","Loot",$StashLoot)
    	$StashLegendary = IniRead($ini,"Stashing","Legendaries",$StashLegendary)
    	$StashRare = IniRead($ini,"Stashing","Rares",$StashRare)
    	$StashMagic = IniRead($ini,"Stashing","Magic",$StashMagic)
    	$StashTomes = IniRead($ini,"Stashing","Tomes",$StashTomes)
    
    
    	$VendorLoot = IniRead($ini,"Vendoring","Loot",$VendorLoot)
    	$VendorRare = IniRead($ini,"Vendoring","Rares",$VendorRare)
    	$VendorMagic = IniRead($ini,"Vendoring","Magic",$VendorMagic)
    
    
    	$Timer = IniRead($ini,"Variability","Timer",$Timer)
    	$mLootOff = IniRead($ini,"Variability","ManageLoot",$mLootOff)
    
    
    	$movementSpeed = IniRead($ini,"Additional","Movement Speed",$movementSpeed)
    	$pickupRadius = IniRead($ini,"Additional","Pickup Radius",$pickupRadius)
    
    
    
    
    	$vendorAll = IniRead($ini,"Beta","Area",$vendorAll)
    	$vendorRows = IniRead($ini,"Beta","Rows",$vendorRows)
    	$vendorCols = IniRead($ini,"Beta","Cols",$vendorCols)
    EndFunc

  4. #574
    Shimizoki's Avatar Knight-Lieutenant
    Reputation
    32
    Join Date
    Jun 2012
    Posts
    358
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Angrycoder View Post
    I now see why i get a banner from time to time. On the logout.

    When i start the game, if there are mobs at the checkpoint, and those mobs kill you instantly (before you start pathing). This is when it bugs. It will still logout correctly, but the mouse keeps moving as if the script is still running, even tho its logging out. So when you get to the main menu, its clicking and thus opens the banner.

    Seen this twice now, almost back to back, and both times it was when i died at the checkpoint. The other time i seen this happen was teleporting (failed to find the cellar), and died during near the end of the teleport.
    This is the check dead section of the code... as I do not have access to the script right now all I can do is tell you to add it where you see fit.
    Code:
    Call("CheckDead")
    If $Dead Then
    	Return
    EndIf
    I would advise putting it between the main sections of the code. (After the main section, but before the old ruins, after the old ruins but before the dank cellar) Or put it in the Else sections.
    If CheckFor("Place")
    not here
    Else
    here
    Endif

    Im sorry i cant be of more help. I'm just passing by the computer right now.
    -Darkling Lord

  5. #575
    Shimizoki's Avatar Knight-Lieutenant
    Reputation
    32
    Join Date
    Jun 2012
    Posts
    358
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by qzy View Post
    i got this when i try run the script
    [Gold/Item Farming] Shimizoki's Sarkoth DH Script [AutoIt]-error-png
    Diablo 3 isnt running.

    Originally Posted by satan2004 View Post
    I got a question ive been editing a little in your script to make it better for me and its doing something weird,

    i go to the doorway and kill the mobs then its supposed to walk to sarkoth corpse and start Checkloot

    But its goes way north of that and runs against chest, then check loot comes
    I have NO idea what is causing this
    and ive checked the script 50x
    That looks like an older version of the script... If you have a low pickup radius he runs a bit farther up then right to get more gold. Thats probably what you are seeing.
    In the script you sent it doesnt even look like he should be moving.
    -Darkling Lord

  6. #576
    qu9ke's Avatar Master Sergeant
    Reputation
    1
    Join Date
    May 2012
    Posts
    133
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tried so many different things. I tried the whitest part of the bag, the blue area around the bag, large rectangles, small rectangles to hopefully narrow down the pixel possibilites, but still it refuses to work.

  7. #577
    JackLinks's Avatar Corporal
    Reputation
    3
    Join Date
    Jun 2012
    Posts
    33
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    With the latest auto-update; After vendoring, it steps down away from the NPC and idles indefinitely. Sometimes it steps down-right into the open area, sometimes it steps down left which initiates conversation with the Villager NPC with the red shirt.

  8. #578
    Shimizoki's Avatar Knight-Lieutenant
    Reputation
    32
    Join Date
    Jun 2012
    Posts
    358
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by qu9ke View Post
    I tried so many different things. I tried the whitest part of the bag, the blue area around the bag, large rectangles, small rectangles to hopefully narrow down the pixel possibilites, but still it refuses to work.
    Send me a screenshot of you at the vendor... lets see if we can fix this. Ill start fresh

    Originally Posted by JackLinks View Post
    With the latest auto-update; After vendoring, it steps down away from the NPC and idles indefinitely. Sometimes it steps down-right into the open area, sometimes it steps down left which initiates conversation with the Villager NPC with the red shirt.
    Yea I know... The last 5 pages are us trying to figure out why.
    -Darkling Lord

  9. #579
    robble's Avatar Member
    Reputation
    1
    Join Date
    Jan 2011
    Posts
    53
    Thanks G/R
    0/0
    Trade Feedback
    2 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @Robble, I was not able to test in on my system as I dont get disconnected... ever. Because of this I had to make guesses at the proper placement of it. I guessed wrong
    What can we do to help?

    @Robble, Does vendoring actually work when stashing is on? I tried to set it up that it didnt need to. But its highly advised that you do have stashing on so you dont vendor rares and legendaries.
    Yup. It works with stashing on and stops at the villager with stashing off.

  10. #580
    qu9ke's Avatar Master Sergeant
    Reputation
    1
    Join Date
    May 2012
    Posts
    133
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is the screenie you requested. [Gold/Item Farming] Shimizoki's Sarkoth DH Script [AutoIt]-screenshot390-jpg
    According to the post below me, I guess this makes me the winner ;P
    Last edited by qu9ke; 06-16-2012 at 07:29 PM.

  11. #581
    Shimizoki's Avatar Knight-Lieutenant
    Reputation
    32
    Join Date
    Jun 2012
    Posts
    358
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by robble View Post
    What can we do to help?
    Yup. It works with stashing on and stops at the villager with stashing off.
    First person on 1920x1080 that gets me another screenshot at the vendor wins.

    As for the second, I dont see why... but i will look into it.
    -Darkling Lord

  12. #582
    Angrycoder's Avatar Knight-Lieutenant
    Reputation
    20
    Join Date
    Jun 2012
    Posts
    370
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I added
    Code:
    		MouseClick("left",Random(350,369),Random(312,374)) ;Open repair window.
    		Sleep(Random(500,1000))
    		MouseClick("left",Random(84,287),Random(411,431)) ;Pay for repairs.
    		Sleep(Random(500,1000))
    To the end of the VendorLoot() function. No reason to wait til you are yellow / red armored to go repair, when we are already making so many trips to the merchant to sell. Just an option you might want to add, after you get the merchant bugs squashed.

  13. #583
    Shimizoki's Avatar Knight-Lieutenant
    Reputation
    32
    Join Date
    Jun 2012
    Posts
    358
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by qu9ke View Post
    Here is the screenie you requested. [Gold/Item Farming] Shimizoki's Sarkoth DH Script [AutoIt]-screenshot390-jpg
    According to the post below me, I guess this makes me the winner ;P
    Wow.... ninja'd right in there.

    Try this line instead of the others I've told you to edit. (Line 650ish)
    Code:
    $VendorFound = PixelSearch(Round(200*$x_ratio), Round(0*$y_ratio), Round(330*$x_ratio), Round(125*$y_ratio), 0xBFB64D, 2) ; checks for the bright spot on bag at top of vendor
    Ill update in just a second with the new data from your image.

    EDIT:: Actually your data was the same... so it should work.

    Originally Posted by Angrycoder View Post
    I added
    Code:
            MouseClick("left",Random(350,369),Random(312,374)) ;Open repair window.
            Sleep(Random(500,1000))
            MouseClick("left",Random(84,287),Random(411,431)) ;Pay for repairs.
            Sleep(Random(500,1000))
    To the end of the VendorLoot() function. No reason to wait til you are yellow / red armored to go repair, when we are already making so many trips to the merchant to sell. Just an option you might want to add, after you get the merchant bugs squashed.
    Not a bad idea. didn't think of doing it every time. then again some people need to do it seperatly as not everyone uses the vendor options. so this still needs to be fixed. plus its not just the repairs that are failing right now, its vendoring too.
    Last edited by Shimizoki; 06-16-2012 at 07:36 PM.
    -Darkling Lord

  14. #584
    qu9ke's Avatar Master Sergeant
    Reputation
    1
    Join Date
    May 2012
    Posts
    133
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The new code you posted didn't work :'(. There are 2 things that are keeping me on this version as opposed to the previous one. One is that the script gets stuck if I die in the previous one. Two is that I'm still not sure if the previous one stashes legendaries/sets xD. I know for sure this version stashed legendaries as I've seen it happen, so I assume sets as well.

    On a side note, it does amaze me how helpful you actually are when you can just say "here's my script you figure it out". I'm just glad that even though it's your script you choose to help others who are using it.

    EDIT: I noticed you said line 650ish I didn't notice that originally. I'll post back with the results after trying it out.
    Last edited by qu9ke; 06-16-2012 at 07:56 PM.

  15. #585
    Shimizoki's Avatar Knight-Lieutenant
    Reputation
    32
    Join Date
    Jun 2012
    Posts
    358
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by qu9ke View Post
    The new code you posted didn't work :'(. There are 2 things that are keeping me on this version as opposed to the previous one. One is that the script gets stuck if I die in the previous one. Two is that I'm still not sure if the previous one stashes legendaries/sets xD. I know for sure this version stashed legendaries as I've seen it happen, so I assume sets as well.

    On a side note, it does amaze me how helpful you actually are when you can just say "here's my script you figure it out". I'm just glad that even though it's your script you choose to help others who are using it.
    Thanks, The previous version does infact stash sets and legendaries. I did not change the stashing code at all and I just checked (been flawlessly running 1.3.2 for 4 hours) and I got a new helm... It stashed sets and legendaries and rares with minimal error. The best part is that you cant sell unidentified armor. so even if it fails to stash it, it will still be in your bag.

    The death thing I thought I fixed... but I guess not, what I can do however is advise everyone still having issues to use the backup copy (I assume you guys took my advice and kept a previous version) I can try and edit that to fix just the deaths.
    Attached Thumbnails Attached Thumbnails [Gold/Item Farming] Shimizoki's Sarkoth DH Script [AutoIt]-newhelm-png  
    -Darkling Lord

Similar Threads

  1. Replies: 113
    Last Post: 01-06-2014, 12:49 PM
  2. Replies: 36
    Last Post: 08-04-2012, 02:05 PM
  3. Need help [Gold/Item Farming] Shimizoki's Sarkoth DH Script [AutoIt]
    By heina in forum Diablo 3 Bots Questions & Requests
    Replies: 0
    Last Post: 07-13-2012, 12:06 PM
  4. REQUEST: Shimizoki's Sarkoth DH Script [AutoIt] Pick up only itemlvl 63 rares.
    By ALWIN21 in forum Diablo 3 Bots Questions & Requests
    Replies: 0
    Last Post: 07-10-2012, 07:10 PM
  5. [Gold/Item Farming] Shimizoki's Sarkoth DH Script [AutoIt]
    By Shimizoki in forum Diablo 3 Bots and Programs
    Replies: 403
    Last Post: 06-15-2012, 03:42 PM
All times are GMT -5. The time now is 04:39 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search