Originally Posted by
MonsterMMORPG
I think it is not properly hitting alt button before start scanning
can you fix that ?
Code:
Func pickItems()
Send("{ALTDOWN}")
Send("{ALTUP}")
$currentArrayItem = 0
For $gI = 0 to ($totalItems - 1)
$urlString = $directory & $pick[$gI]
$Target = _ImageSearchArea($urlString,1,0,0,Round(1920*$x_ratio),Round(1080*$y_ratio),$gX,$gY,100)
While $i <= 10
If $Target Then
MouseClick("left", $gX, $gY)
Sleep(Random(1000,1200))
MouseMove(1,1) ;Reset cursor position, it doesn't need to hover
$Target = _ImageSearchArea($urlString,1,0,0,Round(1920*$x_ratio),Round(1080*$y_ratio),$gX,$gY,100)
Sleep(100)
$i+= 1
Else
ExitLoop
EndIf
WEnd
Next
EndFunc
try inserting the altdown/up there
Code:
Func CheckLoot()
Send("{ALTDOWN}")
Send("{ALTUP}")
Sleep(Random(500,2000))
$SetLoot = PixelSearch(Round(400*$x_ratio), 0, Round(1900*$x_ratio), Round(900*$y_ratio), 0x02CE01, 2) ; set loot
If Not @error Then
MouseClick ('left', $SetLoot[0], $SetLoot[1])
Sleep(Random(1000,1200))
MouseMove(1,1) ;Reset cursor position, it doesn't need to hover
$i+= 1
If $i <= 6 Then
Call("CheckLoot")
EndIf
EndIf
$LegendaryLoot= PixelSearch(Round(400*$x_ratio), 0, Round(1900*$x_ratio), Round(900*$y_ratio), 0xBF642F, 2) ; legendary loot
If Not @error Then
MouseClick ('left', $LegendaryLoot[0], $LegendaryLoot[1])
Sleep(Random(1000,1200))
MouseMove(1,1) ;Reset cursor position, it doesn't need to hover
$i+= 1
If $i <= 6 Then
Call("CheckLoot")
EndIf
EndIf
If $LootRares Then
$RareLoot = PixelSearch(Round(400*$x_ratio), 0, Round(1900*$x_ratio), Round(900*$y_ratio), 0xBBBB00, 2) ; rare loot (darker for compatibility)
If Not @error Then
MouseClick ('left', $RareLoot[0], $RareLoot[1])
Sleep(Random(1000,1200))
MouseMove(1,1) ;Reset cursor position, it doesn't need to hover
$i+= 1
If $i <= 6 Then
Call("CheckLoot")
EndIf
EndIf
EndIf
If $LootGems Then
Call("pickItems")
EndIf
EndFunc
also there