Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.04 KB | None | 0 0
  1. command /queue:
  2. permission: queue.use
  3. permission message: §cYou shouldn't be seeing this, contact and admin please!
  4. trigger:
  5. if {ingame} is not true:
  6. if {queue::*} != player:
  7. remove player from {queue::*}
  8. add player to {queue::*}
  9. send "&eJoined queue!"
  10. stop
  11. if {queue::*} = player:
  12. remove player from {queue::*}
  13. send "&eLeft queue!"
  14. stop
  15.  
  16.  
  17. variables:
  18. {ingame} = false
  19. {gametime} = 200
  20. {tpcountdownannouncement} = 5
  21. {playing.%player%} = false
  22.  
  23.  
  24. command /gamecontrol [<text>] [<integer>]:
  25. permission: gamecontrol.use
  26. aliases: gco
  27. permission message: §cYou do not have the required permission for this command, &bgamecontrol.use&c!
  28. trigger:
  29. if arg-1 is not set:
  30. send "&7--- &bGamecontrol v.0.1 &7---"
  31. send "&e/gco start &7Start a game."
  32. send "&e/gco stop &7Stop a game."
  33. send "&e/gco queue &7Check current queue."
  34. send "&e/gco game &7Check current game."
  35. send "&e/gco setgametime <integer> &7Set game's time limit."
  36. send "&7--- &bby Elluss &7---"
  37. if arg-1 is "start":
  38. set {ingame} to true
  39. broadcast "&bGamcontrol v.0.1 &7: &eA game has been manually started by &b%player%&e!"
  40. set {ingametime} to {gametime}
  41. loop {queue::*}:
  42. set {gamestart.%loop-value%} to true
  43. wait 1 second
  44. clear {queue::*}
  45. if arg-1 is "stop":
  46. broadcast "&bGamcontrol v.0.1 &7: &eA game has been manually stopped by &b%player%&e!"
  47. set {ingame} to false
  48. set {gameover} to true
  49.  
  50.  
  51. if arg-1 is "setgametime":
  52. if arg-2 is not set:
  53. send "&ePlease define a integer for the game time!"
  54. else:
  55. set {gametime} to arg-2
  56. send "&bGametime updated to &f%arg-2%&b seconds!"
  57. if arg-1 is "queue":
  58. send "&7--- &bThe Queue &7---"
  59. loop {queue::*}:
  60. send "&7- &b%loop-value%"
  61. if arg-1 is "game":
  62. send "&7--- &bThe Game &7---"
  63. loop {game::*}:
  64. send "&7- &b%loop-value%"
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71. every second:
  72. loop all players:
  73. if {gamestart.%loop-player%} is true:
  74. set {gamestart.%loop-player%} to false
  75. add loop-player to {game::*}
  76. set {playing.%loop-player%} to true
  77. # add stuff like, giving items and such here! #
  78. #TELEPORT ANNOUNCEMENT#
  79.  
  80. if {playing.%loop-player%} is true:
  81. if {tpcountdownannouncement} is greater than 0:
  82. send "&eTeleportation will occur in %{tpcountdownannouncement}% seconds" to loop-player
  83. #TELEPORT ANNOUNCEMENT#
  84.  
  85.  
  86. #GIVE ITEMS!#
  87. #GIVE ITEMS!#
  88.  
  89.  
  90. #PICK RANDOM TEAM!#
  91.  
  92. #PICK RANDOM TEAM!#
  93.  
  94. if {ingame} is true:
  95. if {ingametime} is greater than 0:
  96. remove 1 from {ingametime}
  97. if {ingametime} is 0:
  98. set {ingame} to false
  99. set {gameover} to true
  100.  
  101. if {gameover.%loop-player%} is true:
  102. set {gameover.%loop-player%} to false
  103. remove loop-player from {game::*}
  104. clear loop-player's inventory
  105. make console execute "spawn %loop-player%"
  106. send "&eThe game has ended!" to loop-player
  107. loop all players:
  108. set {playing.%loop-player-2%} to false
  109. set {notAllowedToAnnounce} to false
  110. set {tpcountdownannouncement} to 5
  111. every second:
  112. if {gameover} is true:
  113. set {gameover} to false
  114. loop {game::*}:
  115. set {gameover.%loop-value%} to true
  116.  
  117.  
  118. command /setcountdown <text>:
  119. permission: not.u
  120. trigger:
  121. set {tpcountdownannouncement} to arg-1
  122. every second:
  123. if {notAllowedToAnnounce} is true:
  124. stop
  125. if {tpcountdownannouncement} is greater than 0:
  126. remove 1 from {tpcountdownannouncement}
  127. if {tpcountdownannouncement} is 0:
  128. set {tpcountdownannouncement} to -1
  129. loop all players:
  130. if {playing.%loop-player%} is true:
  131. send "&eTeleported!" to loop-player
  132.  
  133. set {notAllowedToAnnounce} to true
  134.  
  135. stop
  136.  
  137.  
  138. command /tpcountdown:
  139. permission: not.u
  140. trigger:
  141. send "%{tpcountdownannouncement}%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement