Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.69 KB | None | 0 0
  1. command /queue:
  2. trigger:
  3. if {Playing.%player%} is true:
  4. send "&cYou are already in-game!"
  5. stop
  6. if {inQueue.%player%} is true:
  7. set {inQueue.%player%} to false
  8. send "&cYou have left the queue!"
  9. else:
  10. set {inQueue.%player%} to true
  11. send "&aYou have joined the queue!"
  12.  
  13. options:
  14. prefix: &c[&eGameControl-System&c] &a
  15. variables:
  16. {Playing.%player%} = false
  17. command /gamecontrol [<text>]:
  18. aliases: /gc
  19. permission: system.gamecontrol
  20. trigger:
  21. if arg-1 is not set:
  22. send "&e===GAME-CONTROL-SYSTEM BY GAMESAWAYHD V0.1==="
  23. send "&e/gamecontrol start - Starts the game!"
  24. send "&e/gamecontrol stop - Stops the game!"
  25. send "&e/gamecontrol queue - Checks the queue!"
  26. send "&e===GAME-CONTROL-SYSTEM BY GAMESAWAYHD V0.1==="
  27. else:
  28. if arg-1 is "start":
  29. if {gameStarted} is true:
  30. send "{@prefix} &cThe game is already started!"
  31. stop
  32. else:
  33. startGame()
  34. send "{@prefix} You have successfuly started the game!"
  35. stop
  36. if arg-1 is "stop":
  37. if {gameStarted} is not set:
  38. send "{@prefix} &cThe game is already stopped!"
  39. stop
  40. if {gameStarted} is false:
  41. send "{@prefix} &cThe game is already stopped!"
  42. stop
  43. if {gameStarted} is true:
  44. stopGame()
  45. send "{@prefix} You have successfuly stopped the game!"
  46. #FUNCTIONS
  47. #START GAME FUNCTION#
  48. function startGame():
  49. set {gameStarted} to true
  50. loop all players:
  51. if {inQueue.%loop-player%} is true:
  52. set {Playing.%loop-player%} to true
  53. set {inQueue.%loop-player%} to false
  54. #TP PROCESS
  55. send "&aThe game has been started!" to loop-player
  56. wait 1 second
  57. send "&eTeleportation will occur in 5 seconds..." to loop-player
  58. wait 1 second
  59. send "&eTeleportation will occur in 4 seconds..." to loop-player
  60. wait 1 second
  61. send "&eTeleportation will occur in 3 seconds..." to loop-player
  62. wait 1 second
  63. send "&eTeleportation will occur in 2 seconds..." to loop-player
  64. wait 1 second
  65. send "&eTeleportation will occur in 1 second..." to loop-player
  66. wait 1 second
  67. send "&eTeleported!" to loop-player
  68. #TP PROCESS
  69. wait 1 second
  70. send "&eThe game will start in 10 seconds..." to loop-player
  71. wait 1 second
  72. send "&eThe game will start in 9 seconds..." to loop-player
  73. wait 1 second
  74. send "&eThe game will start in 8 seconds..." to loop-player
  75. wait 1 second
  76. send "&eThe game will start in 7 seconds..." to loop-player
  77. wait 1 second
  78. send "&eThe game will start in 6 seconds..." to loop-player
  79. wait 1 second
  80. send "&eThe game will start in 5 seconds..." to loop-player
  81. wait 1 second
  82. send "&eThe game will start in 4 seconds..." to loop-player
  83. wait 1 second
  84. send "&eThe game will start in 3 seconds..." to loop-player
  85. wait 1 second
  86. send "&eThe game will start in 2 seconds..." to loop-player
  87. wait 1 second
  88. send "&eThe game will start in 1 second..." to loop-player
  89. wait 1 second
  90. send "&eThe game has started!" to loop-player
  91. #GIVE KITS PROCESS
  92.  
  93. #GIVE KITS PROCESS
  94.  
  95. #PICK RANDOM TEAM PROCESS
  96. if "%random integer between 1 and 2%" is "1":
  97. send "&eYou are now in the &c&lRED TEAM&e!" to loop-player
  98. else:
  99. send "&eYou are now in the &9&lBLUE TEAM&e!" to loop-player
  100. #PICK RANDOM TEAM PROCESS
  101. set {gameStarted} to true
  102. #STOP GAME FUNCTION#
  103. function stopGame():
  104. loop all players:
  105. if {Playing.%loop-player%} is true:
  106. set {Playing.%loop-player%} to false
  107. make console execute command "spawn %loop-player%"
  108. send "&cThe game ended!" to loop-player
  109. set {gameStarted} to false
  110. stop
  111.  
  112. every second:
  113. if {gameTime} is 0:
  114. stopGame()
  115. stop
  116. else:
  117. if {gameTime} is greater than 0:
  118. remove 1 from {gameTime}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement