То же самое, без циклов. Таким образом можно "распараллеливать" выполнение скрипта без потоков
IF($camouflage != 0 & $time_camouflage < $_time_t)
SWITCH($search_clo4k)
CASE(0)
GETSCREEN ($FlashPlayer_left, $FlashPlayer_top, $FlashPlayer_width, $FlashPlayer_height)
IF_PICTURE_IN($FlashPlayer_left, $FlashPlayer_top, $FlashPlayer_width, $FlashPlayer_height, STRCONCAT("data\pictures\camouflage_", STRCUT("XL,XS", $clo4k_type, 2), ".bmp"), -1, 100)
$_xclo4k = $_return1
$_yclo4k = $_return2
$search_clo4k = 2
$clo4k_type = STRCUT("XL,XS", $clo4k_type, 2)
PRINT("Камуфляжный процессор: ", $clo4k_type)
ELSE
$clo4k_type = $clo4k_type + 4
END_IF
IF($clo4k_type == 8)
PRINT("Камуфляжный процессор не найден")
$camouflage = 0
END_IF
CASE(1)
GETSCREEN ($_xclo4k - 17, $_yclo4k - 13, $_xclo4k + 17, $_yclo4k + 24)
IF(PXLCOUNT($_xclo4k - 17, $_yclo4k - 13, $_xclo4k + 17, $_yclo4k + 24, 2959912) != 0)
PRINT("Камуфляжный процессор: ", $clo4k_type, " израсходован")
$camouflage = 0
ELSE
$search_clo4k = 2
END_IF
CASE(2)
GETSCREEN ($_xclo4k - 17, $_yclo4k - 13, $_xclo4k + 17, $_yclo4k - 9)
IF(PXLCOUNT($_xclo4k - 17, $_yclo4k - 13, $_xclo4k + 17, $_yclo4k - 9, 9204268) != 0)
LCLICK($_xclo4k + 1 + RND(-5,5), $_yclo4k + 10 + RND(-5,5))
$total_num = $total_num + 1
PRINT("Использован камуфляжный процессор: ", $clo4k_type, " | ", "Всего использованно: ", $total_num)
$time_camouflage = $_time_t + 1
$search_clo4k = 1
END_IF
END_SWITCH
END_IF