Написал скрипт, тред который проверяет посещены ли определенные хранители ключей и в зависимости от условий выдаёт сообщение. Он работает так как мне надо, но почему-то полностью засирает консоль варнингами. Помогите разобраться, что не так.
Скрипты:
function StartKeyMasterObserv()
Trigger(NEW_DAY_TRIGGER, "StartKeyMasterObserv", nil );
print("Start keymaster observe thread");
startThread(CheckKeyMasterFoundThread);
end;
function CheckKeyMasterFoundThread()
GreenKeymasterMessageNotShow = true;
RedKeymasterMessageNotShow = true;
TanKeymasterMessageNotShow = true;
repeat
if HasBorderguardKey(PLAYER_1, GREEN_KEY) and GreenKeymasterMessageNotShow then
GreenKeymasterMessageNotShow = false;
MessageBox(GetMapDataPath().."KeymasterMessage/Green.txt");
end;
if HasBorderguardKey(PLAYER_1, RED_KEY) and RedKeymasterMessageNotShow then
RedKeymasterMessageNotShow = false;
MessageBox(GetMapDataPath().."KeymasterMessage/Red.txt");
end;
if HasBorderguardKey(PLAYER_1, TAN_KEY) and TanKeymasterMessageNotShow then
TanKeymasterMessageNotShow = false;
MessageBox(GetMapDataPath().."KeymasterMessage/Tan.txt");
end;
sleep(5);
until(HasAllKeymasterFound())
end;
function HasAllKeymasterFound()
if HasBorderguardKey(PLAYER_1, GREEN_KEY) and HasBorderguardKey(PLAYER_1, RED_KEY) and HasBorderguardKey(PLAYER_1, TAN_KEY) then
MessageBox(GetMapDataPath().."KeymasterMessage/All.txt");
print("Keymaster thread finish");
return true;
end;
return false;
end;
Варнинги:
