Oxalist

Untitled

Jan 14th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.14 KB | None | 0 0
  1. on script load:
  2. set {queue1} to 0
  3. delete {queue::*}
  4.  
  5. command /resetqueue:
  6. trigger:
  7. delete {queue::*}
  8. set {queue1} to 0
  9.  
  10. command /setloc:
  11. trigger:
  12. set {spawn} 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 "&8» &7There are &e%{queue1}%/16 &7players in the queue!" to player
  19. if arg-1 is "join":
  20. if {queue1} >= 1:
  21. execute console command "/queue start"
  22. if {queue1} >= 10:
  23. send "&8» &7The queue is full!" to player
  24. else if "%{queue::*}%" contains "%player%":
  25. send "&8» &7You 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 "&8» &7There are now &e%{queue1}%/16 &7players in the queue!"
  31. if executor is console:
  32. if arg-1 is "start":
  33. if {queue1} >= 2:
  34. broadcast "&8» &7The match is about to start!"
  35. broadcast "&8» &7The match will begin in &e15 &7seconds.."
  36. wait 10 seconds
  37. broadcast "&8» &7The match will begin in &e5 &7seconds.."
  38. wait 1 seconds
  39. broadcast "&8» &7The match will begin in &e4 &7seconds.."
  40. wait 1 seconds
  41. broadcast "&8» &7The match will begin in &e3 &7seconds.."
  42. wait 1 seconds
  43. broadcast "&8» &7The match will begin in &e2 &7seconds.."
  44. wait 1 seconds
  45. broadcast "&8» &7The match will begin in &e1 &7seconds.."
  46. wait 1 second
  47. broadcast "&8» &7The game has now started"
  48. loop {queue::*}:
  49. teleport loop-value parsed as player to {spawn}
  50. delete {queue::*}
  51. delete {queue1}
  52. else:
  53. send "&8» &7Not 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 "&8» &7You have left the queue!"
  58. broadcast "&8» &7There are now &e%{queue1}%/16 &7players in the queue!"
  59. remove "%player%" from {queue::*}
  60. else:
  61. send "&8» &7You 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 "&8» &7There are now &e%{queue1}%/16 &7players 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 "&8» &7The 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