Advertisement
CREAMPAN0408

Untitled

Feb 22nd, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. command /startg:
  2. trigger:
  3. broadcast "The game is going to start in 30 seconds"
  4. countDown(30)
  5. #next lines is if you want some action after this countdown
  6. wait 30 seconds
  7. {game.status} is not "stop" #check if game is still running
  8. broadcast "The game is ended with a tie!"
  9.  
  10. #It depends on your game, here I created a command which will stop the countdown
  11.  
  12. command /stopg:
  13. trigger:
  14. set {game.status} to "stop"
  15. broadcast "The game has been stopped!"
  16.  
  17. function countDown(am: number):
  18. if {_am} is 30:
  19. set {time} to "00:30"
  20. set {_w} to 31
  21. else if {_am} is 10:
  22. set {time} to "00:10"
  23. set {_w} to 51
  24. wait 1 second
  25. loop {_am}-1 times:
  26. if {game.status} is "stop":
  27. stop
  28. if {_w} is greater than 50:
  29. set {time} to "00:0%60-{_w}%"
  30. else:
  31. set {time} to "00:%60-{_w}%"
  32. if {time} is "00:15":
  33. broadcast "Something"
  34. add 1 to {_w}
  35. wait 1 second
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement