Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /reiniciar [<integer>]:
- trigger:
- if player is op:
- if arg 1 is set:
- if arg 1 is more than or equal to 301:
- send "&4ERROR: &cPor favor, não coloque um tempo maior que &65 minutos&c (&6300 segundos&c)"
- else:
- if arg 1 is more than or equal to 20:
- set {_restart} to "%arg-1%" parsed as integer
- loop 300 times:
- wait 1 second
- remove 1 from {_restart}
- if {_restart} is equal to 300:
- broadcast "&6WARNING: &aServidor reiniciando em &65 &aminutos."
- if {_restart} is equal to 270:
- broadcast "&6WARNING: &aServidor reiniciando em &64 &aminutos e &630 &asegundos."
- if {_restart} is equal to 240:
- broadcast "&6WARNING: &aServidor reiniciando em &64 &aminutos."
- if {_restart} is equal to 210:
- broadcast "&6WARNING: &aServidor reiniciando em &63 &aminuto e &630 &asegundos."
- if {_restart} is equal to 180:
- broadcast "&6WARNING: &aServidor reiniciando em &63 &aminutos."
- if {_restart} is equal to 150:
- broadcast "&6WARNING: &aServidor reiniciando em &62 &aminuto e &630 &asegundos."
- if {_restart} is equal to 120:
- broadcast "&6WARNING: &aServidor reiniciando em &62 &aminutos."
- if {_restart} is equal to 90:
- broadcast "&6WARNING: &aServidor reiniciando em &61 &aminuto e &630 &asegundos."
- if {_restart} is equal to 60:
- broadcast "&6WARNING: &aServidor reiniciando em &61 &aminuto."
- if {_restart} is equal to 30:
- broadcast "&6WARNING: &aServidor reiniciando em &630 &asegundos."
- if {_restart} is equal to 15:
- broadcast "&6WARNING: &aServidor reiniciando em &615 &asegundos."
- if {_restart} is equal to 5:
- broadcast "&6WARNING: &aServidor reiniciando em &65 &asegundos."
- make console execute command "save-all"
- broadcast "&2SUCCESSFULLY: &aServidor salvo com sucesso."
- if {_restart} is equal to 4:
- broadcast "&6WARNING: &aServidor reiniciando em &64 &asegundos."
- if {_restart} is equal to 3:
- broadcast "&6WARNING: &aServidor reiniciando em &63 &asegundos."
- if {_restart} is equal to 2:
- broadcast "&6WARNING: &aServidor reiniciando em &62 &asegundos."
- if {_restart} is equal to 1:
- broadcast "&6WARNING: &aServidor reiniciando em &61 &asegundos."
- if {_restart} is equal to 0:
- make console execute command "restart"
- else:
- send "&4ERROR: &cPor favor, não coloque um tempo muito baixo, o mínimo é &620 segundos&c."
- else:
- broadcast "&6WARNING: &aServidor reiniciando em &630 &asegundos."
- wait 15 seconds
- broadcast "&6WARNING: &aServidor reiniciando em &615 &asegundos."
- wait 5 seconds
- broadcast "&6WARNING: &aServidor reiniciando em &65 &asegundos."
- make console execute command "save-all"
- broadcast "&2SUCCESSFULLY: &aServidor salvo com sucesso."
- wait 1 second
- broadcast "&6WARNING: &aServidor reiniciando em &64 &asegundos."
- wait 1 second
- broadcast "&6WARNING: &aServidor reiniciando em &63 &asegundos."
- wait 1 second
- broadcast "&6WARNING: &aServidor reiniciando em &62 &asegundos."
- wait 1 second
- broadcast "&6WARNING: &aServidor reiniciando em &61 &asegundo."
- wait 1 second
- make console execute command "restart"
- else:
- send "&cSem permissão."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement