Piccola release molto facile nella sua esecuzione che a tanti potrà non servire ma ad alcuni può tornare utile!
Buon uso!!!
PHP:
quest manutenzione begin
state start begin
when letter with pc.is_gm() and pc.get_name() == "[GF]Pincopallo" begin -- lettera limitata al [GF]Pincopallo ovviamente cambiate con il vostro
send_letter("GM: Shutdown")
end
when button or info begin
say_title ("Shutdown:")
say ( "Coasa vuoi fare?" )
local siono = select ("Shutdown","No login player","Disattiva No login player","Esci")
if siono == 4 then
return
elseif siono == 1 then
say_title("Shutdown:")
say( "Inserisci motivazione" )
ciao = tostring(input())
server_timer("shut1", 60*15)
notice_all("Manutenzione fra 30 minuti!")
notice_all("Motivazione: " .. ciao)
notice_all("Ogni perdita di item non è nostra responsabilita!")
elseif siono == 2 then
game.set_event_flag("test", 1)
elseif siono == 3 then
game.set_event_flag("test", 0)
end
clear_letter()
send_letter("GM: Shutdown")
end
when login or kill or levelup or enter or leave with game.get_event_flag("test") == 1 begin
if pc.is_gm() then
return
else
command("logout")
end
end
when shut1.server_timer begin
notice_all("Manutenzione fra 15 minuti!")
notice_all("Motivazione: " .. ciao)
notice_all("Ogni perdita di item non è nostra responsabilita!")
server_timer("shut2", 60*10)
end
when shut2.server_timer begin
notice_all("Manutenzione fra 5 minuti!")
notice_all("Motivazione: " .. ciao)
notice_all("Ogni perdita di item non è nostra responsabilita!")
game.set_event_flag("test", 1)
server_timer("shut3", 60*4)
end
when shut3.server_timer begin
notice_all("Manutenzione fra 1 minuto!")
notice_all("Motivazione: " .. ciao)
notice_all("Ogni perdita di item non è nostra responsabilita!")
server_timer("shut4", 60)
end
when shut4.server_timer begin
notice_all ( "Manutenzione!" )
server_timer("shut5", 10)
end
when shut5.server_timer begin
os.execute("cd /usr/files && sh close.sh &") -- cambiare con il vostro percorso
end
end
end