Advertisement
twogz

Untitled

Jul 20th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.11 KB | None | 0 0
  1. on script load:
  2. set {queue1} to 0
  3. delete {queue::*}
  4.  
  5. command /reset:
  6. trigger:
  7. delete {queue::*}
  8. set {queue1} to 0
  9.  
  10. command /setspawnpoint [<number>]:
  11. trigger:
  12. set {minigame::spawnpoints::%arg-1%} to location of player
  13.  
  14. command /queue [<text="check">]:
  15. usage: You can either use &c/queue join &for &c/queue leave
  16. trigger:
  17. if arg-1 is "check":
  18. send "&cThere are &e%{queue1}%/16 &cplayers in the queue!" to player
  19. if arg-1 is "join":
  20. if {queue1} >= 8:
  21. execute console command "/queue start"
  22. if {queue1} >= 16:
  23. send "&cThe queue is full!" to player
  24. else if "%{queue::*}%" contains "%player%":
  25. send "&cYou are already in the queue!" to player
  26. else:
  27. add 1 to {queue1}
  28. add "%player%" to {queue::*}
  29. set {queue.%player%} to 1
  30. broadcast "&cThere are now &e%{queue1}%/16 &cplayers in the queue!"
  31. if executor is player:
  32. if arg-1 is "start":
  33. if {queue1} >= 8:
  34. broadcast "&eThe match is about to start!"
  35. broadcast "&cThe match will begin in &e15 seconds.."
  36. wait 10 seconds
  37. broadcast "&cThe match will begin in &e5 seconds.."
  38. wait 1 seconds
  39. broadcast "&cThe match will begin in &e4 seconds.."
  40. wait 1 seconds
  41. broadcast "&cThe match will begin in &e3 seconds.."
  42. wait 1 seconds
  43. broadcast "&cThe match will begin in &e2 seconds.."
  44. wait 1 seconds
  45. broadcast "&cThe match will begin in &e1 seconds.."
  46. wait 1 second
  47. broadcast "&eTeleporting players.."
  48. loop {queue::*}:
  49. teleport loop-value to location of {minigame::spawnpoints::%loop-index%}
  50. delete {queue::*}
  51. delete {queue1}
  52. else:
  53. send "&cNot enough players to start!" to player
  54. if arg-1 is "leave":
  55. if {queue.%player%} is 1:
  56. remove 1 from {queue1}
  57. send "&cYou have been removed from the queue!"
  58. broadcast "&cThere are now &e%{queue1}%/16 &cplayers in the queue!"
  59. remove "%player%" from {queue::*}
  60. else:
  61. send "&cYou are not currently in a queue!"
  62. command /test:
  63. trigger:
  64. send "%{queue::*}%" to player
  65. send "%{queue1}%" to player
  66.  
  67. command /test2:
  68. trigger:
  69. add 1 to {queue1}
  70. broadcast "&cThere are now &e%{queue1}%/16 &cplayers in the queue!"
  71.  
  72. on death:
  73. if {queue.%player%} is 1:
  74. remove 1 from {queue1}
  75. set {queue.%player%} to 0
  76. if {queue1} is 0:
  77. broadcast "&cThe game is now over!"
  78. broadcast "&cUse &e/queue join &cto join the next queue!"
  79.  
  80. on join:
  81. set {queue.%player%} to 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement