Advertisement
Guest User

Untitled

a guest
Aug 5th, 2020
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.34 KB | None | 0 0
  1. command /reiniciar [<integer>]:
  2. trigger:
  3. if player is op:
  4. if arg 1 is set:
  5. if arg 1 is more than or equal to 301:
  6. send "&4ERROR: &cPor favor, não coloque um tempo maior que &65 minutos&c (&6300 segundos&c)"
  7. else:
  8. if arg 1 is more than or equal to 20:
  9. set {_restart} to "%arg-1%" parsed as integer
  10. loop 300 times:
  11. wait 1 second
  12. remove 1 from {_restart}
  13. if {_restart} is equal to 300:
  14. broadcast "&6WARNING: &aServidor reiniciando em &65 &aminutos."
  15. if {_restart} is equal to 270:
  16. broadcast "&6WARNING: &aServidor reiniciando em &64 &aminutos e &630 &asegundos."
  17. if {_restart} is equal to 240:
  18. broadcast "&6WARNING: &aServidor reiniciando em &64 &aminutos."
  19. if {_restart} is equal to 210:
  20. broadcast "&6WARNING: &aServidor reiniciando em &63 &aminuto e &630 &asegundos."
  21. if {_restart} is equal to 180:
  22. broadcast "&6WARNING: &aServidor reiniciando em &63 &aminutos."
  23. if {_restart} is equal to 150:
  24. broadcast "&6WARNING: &aServidor reiniciando em &62 &aminuto e &630 &asegundos."
  25. if {_restart} is equal to 120:
  26. broadcast "&6WARNING: &aServidor reiniciando em &62 &aminutos."
  27. if {_restart} is equal to 90:
  28. broadcast "&6WARNING: &aServidor reiniciando em &61 &aminuto e &630 &asegundos."
  29. if {_restart} is equal to 60:
  30. broadcast "&6WARNING: &aServidor reiniciando em &61 &aminuto."
  31. if {_restart} is equal to 30:
  32. broadcast "&6WARNING: &aServidor reiniciando em &630 &asegundos."
  33. if {_restart} is equal to 15:
  34. broadcast "&6WARNING: &aServidor reiniciando em &615 &asegundos."
  35. if {_restart} is equal to 5:
  36. broadcast "&6WARNING: &aServidor reiniciando em &65 &asegundos."
  37. make console execute command "save-all"
  38. broadcast "&2SUCCESSFULLY: &aServidor salvo com sucesso."
  39. if {_restart} is equal to 4:
  40. broadcast "&6WARNING: &aServidor reiniciando em &64 &asegundos."
  41. if {_restart} is equal to 3:
  42. broadcast "&6WARNING: &aServidor reiniciando em &63 &asegundos."
  43. if {_restart} is equal to 2:
  44. broadcast "&6WARNING: &aServidor reiniciando em &62 &asegundos."
  45. if {_restart} is equal to 1:
  46. broadcast "&6WARNING: &aServidor reiniciando em &61 &asegundos."
  47. if {_restart} is equal to 0:
  48. make console execute command "restart"
  49. else:
  50. send "&4ERROR: &cPor favor, não coloque um tempo muito baixo, o mínimo é &620 segundos&c."
  51. else:
  52. broadcast "&6WARNING: &aServidor reiniciando em &630 &asegundos."
  53. wait 15 seconds
  54. broadcast "&6WARNING: &aServidor reiniciando em &615 &asegundos."
  55. wait 5 seconds
  56. broadcast "&6WARNING: &aServidor reiniciando em &65 &asegundos."
  57. make console execute command "save-all"
  58. broadcast "&2SUCCESSFULLY: &aServidor salvo com sucesso."
  59. wait 1 second
  60. broadcast "&6WARNING: &aServidor reiniciando em &64 &asegundos."
  61. wait 1 second
  62. broadcast "&6WARNING: &aServidor reiniciando em &63 &asegundos."
  63. wait 1 second
  64. broadcast "&6WARNING: &aServidor reiniciando em &62 &asegundos."
  65. wait 1 second
  66. broadcast "&6WARNING: &aServidor reiniciando em &61 &asegundo."
  67. wait 1 second
  68. make console execute command "restart"
  69. else:
  70. send "&cSem permissão."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement