
 
Neophyte
Сообщений: 10
Регистрация: 21.12.2013 Группа: Пользователи Наличность: 0
Пользователь №: 16.508
Возраст: 23

|
походу все-таки есть глюк, выкладываю весь код: так работает
Код //start_script 1 wait 1s call c
:start repeat 5 :q left 374, 229 wait 3s set #a 0 set #a findcolor (175, 215 207, 243 1 1 171082 %a 2) if #a = 0 left 705, 229 wait 3s call c goto q end_if left 272, 469 wait 3s set #a 0 set #a findcolor (415, 413 482, 452 1 1 1420910 %a 2) if #a = 0 left 705, 229 wait 3s call c goto q end_if left 614, 621 wait 3s set $a 480, 364 7497289 set $b 480, 364 if ($a) and ($b 7497289) left 480, 364 wait 3s left 462, 515 wait 3s end_if left 335, 642 wait 7s left 439, 493 wait 3s call c wait 280s :e left 542, 229 wait 3s set #a 0 set #a findcolor (175, 215 207, 243 1 1 171082 %a 2) if #a = 0 left 705, 229 wait 3s call c goto e end_if wait 3s left 526, 487 wait 3s set $a 484, 462 6313276 set $b 484, 462 if ($a) and ($b 6313276) left 484, 462 wait 3s else left 412, 487 wait 3s left 526, 487 wait 3s set $a 484, 462 6313276 set $b 484, 462 call b // так работает end_if call c if #b.2 = 1 :taverna left 473, 228 wait 3s set #a 0 set #a findcolor (181, 217 202, 235 1 1 312557 %a 2) if #a = 0 left 705, 229 wait 3s call c goto taverna end_if left 260, 325 wait 3s left 534, 573 wait 3s resume_script 2 call c end_if if #b.1 = 1 :r left 787, 254 wait 3s set $a 754, 246 16578789 set $b 754, 246 if ($a) and ($b 16578789) left 754, 246 wait 3s end_if set #a 0 set #a findcolor (175, 215 207, 243 1 1 171082 %a 2) if #a = 0 left 705, 229 wait 3s call c goto r end_if left 638, 579 wait 3s resume_script 1 left 451, 476 wait 3s set $a 574, 325 16578789 set $b 574, 325 if ($a) and ($b 16578789) left 754, 246 wait 3s end_if call c end_if end_repeat :t left 639, 229 wait 3s set #a 0 set #a findcolor (175, 215 207, 243 1 1 171082 %a 2) if #a = 0 left 705, 229 wait 3s call c goto t end_if left 558, 564 wait 3s call c goto start end_script
proc b left 526, 487 wait 3s set $a 484, 462 6313276 set $b 484, 462 if ($a) and ($b 6313276) left 484, 462 wait 3s else left 412, 487 wait 3s end_if end_proc
proc c :a left 829, 307 wait 3s set $a 754, 246 16578789 set $b 754, 246 if ($a) and ($b 16578789) left 754, 246 wait 3s end_if set #a 0 set #a findcolor (646, 420 670, 449 1 1 9878482 %a 2) if #a = 0 left 705, 229 wait 3s goto a end_if end_proc так не работает
Код //start_script 1 wait 1s call c
:start repeat 5 :q left 374, 229 wait 3s set #a 0 set #a findcolor (175, 215 207, 243 1 1 171082 %a 2) if #a = 0 left 705, 229 wait 3s call c goto q end_if left 272, 469 wait 3s set #a 0 set #a findcolor (415, 413 482, 452 1 1 1420910 %a 2) if #a = 0 left 705, 229 wait 3s call c goto q end_if left 614, 621 wait 3s set $a 480, 364 7497289 set $b 480, 364 if ($a) and ($b 7497289) left 480, 364 wait 3s left 462, 515 wait 3s end_if left 335, 642 wait 7s left 439, 493 wait 3s call c wait 280s :e left 542, 229 wait 3s set #a 0 set #a findcolor (175, 215 207, 243 1 1 171082 %a 2) if #a = 0 left 705, 229 wait 3s call c goto e end_if wait 3s left 526, 487 wait 3s set $a 484, 462 6313276 set $b 484, 462 if ($a) and ($b 6313276) left 484, 462 wait 3s else left 412, 487 wait 3s left 526, 487 wait 3s set $a 484, 462 6313276 set $b 484, 462 left 526, 487 wait 3s set $a 484, 462 6313276 // процедура "call b" set $b 484, 462 if ($a) and ($b 6313276) left 484, 462 wait 3s else left 412, 487 wait 3s end_if // которая в этом виде не работает end_if call c if #b.2 = 1 :taverna left 473, 228 wait 3s set #a 0 set #a findcolor (181, 217 202, 235 1 1 312557 %a 2) if #a = 0 left 705, 229 wait 3s call c goto taverna end_if left 260, 325 wait 3s left 534, 573 wait 3s resume_script 2 call c end_if if #b.1 = 1 :r left 787, 254 wait 3s set $a 754, 246 16578789 set $b 754, 246 if ($a) and ($b 16578789) left 754, 246 wait 3s end_if set #a 0 set #a findcolor (175, 215 207, 243 1 1 171082 %a 2) if #a = 0 left 705, 229 wait 3s call c goto r end_if left 638, 579 wait 3s resume_script 1 left 451, 476 wait 3s set $a 574, 325 16578789 set $b 574, 325 if ($a) and ($b 16578789) left 754, 246 wait 3s end_if call c end_if end_repeat // здесь выдает сообщение: Ошибка интерпретации скрипта (end_repeat). :t left 639, 229 wait 3s set #a 0 set #a findcolor (175, 215 207, 243 1 1 171082 %a 2) if #a = 0 left 705, 229 wait 3s call c goto t end_if left 558, 564 wait 3s call c goto start end_script
proc c :a left 829, 307 wait 3s set $a 754, 246 16578789 set $b 754, 246 if ($a) and ($b 16578789) left 754, 246 wait 3s end_if set #a 0 set #a findcolor (646, 420 670, 449 1 1 9878482 %a 2) if #a = 0 left 705, 229 wait 3s goto a end_if end_proc вот в чем тут может быть проблема я уже хз, прогонял в отдельной вкладке глючную часть кода => заработала, а вот в целом коде нифига, повторяюсь что проблема решается процедурой, ошибиться при тесте не мог т.к. прописал кусок кода с помощью копирования из рабочего. хотя вопрос этот наверное уже для новой темы в игре частенько вылазит всякий мусор поэтому часто использую проверки + откат на нескольких строк кода как результат большая длина кода (по крайней мере для меня всего лишь 5 день шаманю)
|