Func target()
Dim $target_serch = $WinPos[0]+775, $target_serch2 = $WinPos[0]+778, $tar
$npscruz = 0
$npsfrig = 0
$npsbs=0
$nps =0
For $tar = $WinPos[1]+195 To $WinPos[1]+290 Step 19
$nps1= PixelGetColor($target_serch,$tar)
$nps2= PixelGetColor($target_serch2,$tar)
$nps3= PixelGetColor($target_serch,$tar-1)
If $nps1 = 0xC11414 Then
If $nps2 <> $nps1 Then
If $nps3 <> $nps1 Then
$nps = $nps+1
;MsgBox(0, "", "frig")
$npsfrig = $npsfrig+1
EndIf
EndIf
EndIf
If $nps1 = 0xC11414 Then
If $nps2 = $nps1 Then
If $nps3 <> $nps1 Then
$nps = $nps+1
;MsgBox(0, "", "cruz")
$npscruz = $npscruz+1
EndIf
EndIf
EndIf
If $nps1 = 0xC11414 Then
If $nps2 = $nps1 Then
If $nps3 = $nps1 Then
$nps = $nps+1
;MsgBox(0, "", "bs")
$npsbs = $npsbs+1
EndIf
EndIf
EndIf
If $nps1 = 0xC11414 Then CtrlLeftClick($target_serch,$tar)
Sleep(250)
ToolTip($nps & " всего, " &$npsfrig &" фригов, " &$npscruz &" крейсеров, " &$npsbs &" бш", $WinPos[0] + 756, $WinPos[1] + 22)
Sleep(1000)
Next
EndFunc