So I wrote a simple AutoIt bot to do Sarkoth very similarly to the ones that have been posted on the site already. It runs Sarkoth, teleports to town, checks if your backpack is full, when it is sells all items except for gems/tome of secrets then stashes gems/tome of secrets, exits the game. Rinse and repeat.
The issue I'm having is that I would rather salvage the blue items rather than just vendor them as I can get more on the AH for their salvaged commodities. I can't figure out a way to determine if an item is blue with AutoIt [or I guess any screenscraping method] so posting here for help.
Here are my existing functions, take in x & y [for example top left item is 1,1] and added a slow parameter since there seemed to be an odd race condition/queuing issue happening where AutoIt was screwing up when I did a lot of PixelSearch() calls. Added some delay seemed to fix it.
check_for_sellable_item
Code:
Func check_for_sellable_item($x,$y,$slow)
If $slow Then
Sleep(Random(1000,1250))
Else
Sleep(Random(125,175))
EndIf
$old_checksum = PixelChecksum(1015 + (($x - 1) * 35) - 20,433 + (($y - 1) * 34) - 20,1015 + (($x - 1) * 35) - 15,433 + (($y - 1) * 34) + 15)
MouseMove(1015 + (($x - 1) * 35) - 2 + Random(0,5),433 + (($y - 1) * 34) - 2 + Random(0,5),0)
If $slow Then
Sleep(Random(1000,1250))
Else
Sleep(Random(125,175))
EndIf
$new_checksum = PixelChecksum(1015 + (($x - 1) * 35) - 20,433 + (($y - 1) * 34) - 20,1015 + (($x - 1) * 35) - 15,433 + (($y - 1) * 34) + 15)
return $old_checksum <> $new_checksum
EndFunc
check_for_gem_color
Code:
Func check_for_gem_color($x,$y)
$shade_variance = 40
$check = PixelSearch(1015 + (($x - 1) * 35),433 + (($y - 1) * 34),1015 + (($x - 1) * 35),433 + (($y - 1) * 34),0x7F4100,$shade_variance)
If Not @error Then
Return true
EndIf
$check = PixelSearch(1015 + (($x - 1) * 35),433 + (($y - 1) * 34),1015 + (($x - 1) * 35),433 + (($y - 1) * 34),0xA56100,$shade_variance)
If Not @error Then
Return true
EndIf
$check = PixelSearch(1015 + (($x - 1) * 35),433 + (($y - 1) * 34),1015 + (($x - 1) * 35),433 + (($y - 1) * 34),0x6E00A1,$shade_variance)
If Not @error Then
Return true
EndIf
$check = PixelSearch(1015 + (($x - 1) * 35),433 + (($y - 1) * 34),1015 + (($x - 1) * 35),433 + (($y - 1) * 34),0x9000D6,$shade_variance)
If Not @error Then
Return true
EndIf
$check = PixelSearch(1015 + (($x - 1) * 35),433 + (($y - 1) * 34),1015 + (($x - 1) * 35),433 + (($y - 1) * 34),0x820508,$shade_variance)
If Not @error Then
Return true
EndIf
$check = PixelSearch(1015 + (($x - 1) * 35),433 + (($y - 1) * 34),1015 + (($x - 1) * 35),433 + (($y - 1) * 34),0xC90808,$shade_variance)
If Not @error Then
Return true
EndIf
$check = PixelSearch(1015 + (($x - 1) * 35),433 + (($y - 1) * 34),1015 + (($x - 1) * 35),433 + (($y - 1) * 34),0x236823,$shade_variance)
If Not @error Then
Return true
EndIf
$check = PixelSearch(1015 + (($x - 1) * 35),433 + (($y - 1) * 34),1015 + (($x - 1) * 35),433 + (($y - 1) * 34),0x30A630,$shade_variance)
If Not @error Then
Return true
EndIf
Return false
EndFunc
Should also note I have this working only for the 1360x768 resolution, feel free to modify for any others