hay guys. i am making a bot for a small pay to win browser flash game.
everything go nicely but sometimesthe crafter discover a new recipie and the item i want to craft change position so i use pixelsearch because new recipe names are blue instead of white until you craft them once.
i took a picture of the game and with photoshop i got the hexa value of the colour. if i set any sensibility (like 1) it always detect even if i put a black background. if i set it to 0 he detect nothing
here it is:
the position he scan is good.
thanks for your help
everything go nicely but sometimesthe crafter discover a new recipie and the item i want to craft change position so i use pixelsearch because new recipe names are blue instead of white until you craft them once.
i took a picture of the game and with photoshop i got the hexa value of the colour. if i set any sensibility (like 1) it always detect even if i put a black background. if i set it to 0 he detect nothing
here it is:
Code:
Global $newItemX = 250, $newItemY = 280, $newItemWidth = 100, $newItemHeight = 25, $newItemSpace = 105 , $newItemColor1 = 0x085b91
Func SelectItem()
Local $try = 0
;MouseMove($newItemX + $xGamePos + $try * $selectItemSpaceX, $newItemY + $yGamePos, 0)
While 1
Sleep(1000)
Local $coord = PixelSearch($newItemX + $xGamePos + $try * $selectItemSpaceX, $newItemY + $yGamePos, $newItemWidth, $newItemHeight, $newItemColor1, 0)
If Not @error Then
$try = $try + 1
ConsoleWrite($newItemX + $xGamePos + $try * $selectItemSpaceX)
Else
ExitLoop
EndIf
If $try > 5 Then
ExitLoop
EndIf
WEnd
MouseMove($selectItemX + $xGamePos + $selectItemSpaceX * $try, $selectItemY + $yGamePos, 0)
;MouseClick("left")
EndFunc
thanks for your help