-- Auto Notice by Mongreldogg
-- Format:
-- Put an interval when notice must appear (in seconds), then a notice text after comma, as in example.
-- Installation
-- Put this row into on_login, on_player_dead, npc contact script whatever:
-- auto_notice_check()
auto_notices_array = {
-- Example:
1300, "Посетите наш веб-сайт

, чтобы следить за новостями, обновлениями или получить информацию о серверах",
1300, "Visit our website:

to look up for news, updates and get additional info about servers",
1500, "Никогда не давайте сомнительным лицам логин аккаунта или пароль и не используйте никакие сервисы, которые предусматривают ввод логина и пароля вашего аккаунта на серверах кроме нашего веб-сайта! mourikite.net/rz",
1500, "Never give to anyone your login or password if you dont trust this person. Also don't use services that requires your account information, except our website! mourikite.net/rz"
}
function auto_notice_check()
for i = 1, table.getn(auto_notices_array) / 2 do
if get_global_variable( i .. "_autonotice_last_time" ) == "" then
set_global_variable( i .. "_autonotice_last_time", get_os_time() )
notice( auto_notices_array[i * 2] )
elseif get_os_time() - get_global_variable( i .. "_autonotice_last_time" ) > auto_notices_array[i * 2 - 1] then
set_global_variable( i .. "_autonotice_last_time", get_os_time() )
notice( auto_notices_array[i * 2] )
end
end
end