1
Ошибки / Re: баг с откатом скрипта при сворачивании
« on: April 07, 2015, 07:31:40 PM »
To Vint: не в этом дело, это не решает траблу. Только что проверил, only_tray = 0 не влияет на баг.
Добавлена тема оформления "Clickermann" для кода с подсветкой синтаксиса. Выбирается из выпадающего списка "Код" (рядом с "цвет", "размер" и "шрифт") в режиме редактирования поста. Либо просто BB-тегом "code=clickermann"
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Thread(thr_analys,1)
//wait(1)
waitms(100)
print("Начали")
$rand = RND(1,4)
SWITCH($rand)
case(1)
SETTHREAD (thr_looting, 1)
SETTHREAD (thr_analys, 0)
case(2)
SETTHREAD (thr_teleport, 1)
SETTHREAD (thr_analys, 0)
case(3)
SETTHREAD (thr_run, 1)
SETTHREAD (thr_analys, 0)
END_SWITCH
SETTHREAD (thr_run, 1)
SETTHREAD (thr_analys, 0)
//wait(2)
end_thread
//===================== thr_looting
Thread(thr_looting,0)
waitms(100)
//wait(1)
for($a=1, $a<6)
print("Делай - ", $a)
end_cyc
SETTHREAD (thr_analys, 1)
SETTHREAD (thr_looting, 0)
end_thread
//===================== thr_teleport
Thread(thr_teleport,0)
waitms(100)
//wait(1)
for($a=1, $a<6)
print("Ляляля - ", $a)
end_cyc
SETTHREAD (thr_analys, 1)
SETTHREAD (thr_teleport, 0)
end_thread
//===================== thr_run
Thread(thr_run,0)
waitms(100)
//wait(1)
for($a=1, $a<6)
print("Бубубу - ", $a)
end_cyc
SETTHREAD (thr_analys, 1)
SETTHREAD (thr_run, 0)
end_thread
SUB($trh, $name, $is_start)
$array[0] = "thr_looting"
$array[1] = "thr_teleport"
$array[2] = "thr_run"
for ($i = 0, $i < arrsize($array))
IF($array[$i] ! $name)
SETTHREAD ($array[$i], $is_start)
END_IF
end_cyc
END_SUB
Thread(thr_analys,1)
//wait(5)
waitms(100)
print("Проверяю, что делать")
$rand = RND(1,3)
SETTHREAD (thr_analys, 0)
//wait(2)
end_thread
//===================== thr_looting
Thread(thr_looting,1)
waitms(300)
//wait(1)
if ($rand = 1)
thr(thr_looting,0)
for($a=1, $a<6)
print("Лутаю - ", $a)
end_cyc
thr(thr_looting,1)
SETTHREAD (thr_analys, 1)
end_If
end_thread
//===================== thr_teleport
Thread(thr_teleport,1)
waitms(300)
//wait(1)
if ($rand = 2)
thr(thr_teleport,0)
for($a=1, $a<6)
print("Телепорт - ", $a)
end_cyc
thr(thr_teleport,1)
SETTHREAD (thr_analys, 1)
end_If
end_thread
//===================== thr_run
Thread(thr_run,1)
waitms(300)
//wait(1)
if ($rand = 3)
thr(thr_run,0)
for($a=1, $a<6)
print("Бегу - ", $a)
end_cyc
thr(thr_run,1)
SETTHREAD (thr_analys, 1)
end_If
end_thread
.
SETTHREAD (thr_analys, 1)
SETTHREAD (thr_run, 0)
ELSE
SETTHREAD (thr_teleport, 1)
SETTHREAD (thr_run, 0)
END_IF
Ваша картинка просто "невлазит в область поиска, увеличте область на один пиксель в каждую сторону.
Ни какого глюка, скорее недоработка. Дело в том что для области getscreen вторые два числа нужно указывать на 1 пиксел больше области поиска.
getscreen(671,309, 708,401)
IF_PICTURE_IN(671,309, 708,401, "somepict.bmp")
LOGWRITE("OK")
somesub()
ELSE
LOGWRITE("Not OK")
END_IF
wait(1)
getscreen(671,309, 708,401)
IF_PICTURE_IN(671,309, 708,401, "somepict.bmp")
LOGWRITE("OK")
scanpicture(671,309, 708,401, "somepict.bmp")
while (arrsize($var) > 0)
$y = arrpop($var)
$x = arrpop($var)
print($x,":", $y)
end_cyc
SCREENSHOTEX(671,309, 708,401)
somesub()
ELSE
LOGWRITE("Not OK")
END_IF
wait(1)
getscreen
getscreen(671,309, 708,401)
IF_PICTURE_IN(671,309, 708,401, "somepict.bmp")
LOGWRITE("OK")
scanpicture(671,309, 708,401, "somepict.bmp")
while (arrsize($var) > 0)
$y = arrpop($var)
$x = arrpop($var)
print($x,":", $y)
end_cyc
SCREENSHOTEX(671,309, 708,401)
somesub()
ELSE
LOGWRITE("Not OK")
END_IF
wait(1)
[/spoiler]