Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.33 KB | None | 0 0
  1. command /join:
  2. permission: sk.join
  3. trigger:
  4. set {tekitou} to 1
  5. if {tekitou} is set:
  6. if {tdm} is 1:
  7. send "&c既にTDMが始まっています" to player
  8. if {tdm} is not set:
  9. if {%player%.tdm} is 2:
  10. send "&cあなたは既にエントリーしています" to player
  11. if {%player%.tdm} is not 1:
  12. send "&aTDMにエントリーしました" to player
  13. set {%player%.tdm} to 1
  14. add 1 to {tdm.ninzu}
  15. add player to {tdm.team::*}
  16. if {tdm.ninzu} >= 1:
  17. if {tdm.atumatta} is not set:
  18. set {tdm.atumatta} to 1
  19. broadcast "&aTDMに必要な人数が集まりました"
  20. wait 3 tick
  21. broadcast "&a30秒後にTDMを開始します"
  22. set {tdm.kaisi.timer} to 30
  23. loop 30 times:
  24. wait 1 second
  25. set {tdm.kaisi.timer} to {tdm.kaisi.timer} - 1
  26. if {tdm.kaisi.timer} is 20:
  27. broadcast "&a残り20秒でTDMを開始します"
  28. if {tdm.kaisi.timer} is 10:
  29. broadcast "&a残り10秒でTDMを開始します"
  30. if {tdm.kaisi.timer} <= 5:
  31. broadcast "&a残り%{tdm.kaisi.timer}%秒でTDMを開始します"
  32. else:
  33. loop 100 times:
  34. wait 1 seconds
  35. if {tdm.kaisi.timer} = 0:
  36. stop loop
  37.  
  38. clear {tdm.kaisi.timer}
  39. clear {tdm.atumatta}
  40. loop {tdm.team::*}:
  41. add 1 to {tdm.team.ninzu}
  42. add loop-value to {tdm.team.blue::*}
  43. remove loop-value from {tdm.kaisi.timer}
  44. if {tdm.team.ninzu} = {tdm.ninzu}:
  45. stop loop
  46. add 1 to {tdm.team.ninzu}
  47. add loop-value to {tdm.team.red::*}
  48. remove loop-value from {tdm.kaisi.timer}
  49. if {tdm.team.ninzu} = {tdm.ninzu}:
  50. stop loop
  51. clear {tdm.team.ninzu}
  52. loop all players:
  53. if {tdm.team.blue::*} contains loop-player:
  54. teleport the loop-player to {tdm.blue.location}
  55. set {%loop-player%.tdm.joined} to 1
  56. set {%loop-player%.tdm.blue} to 1
  57. if {tdm.team.red::*} contains loop-player:
  58. teleport the loop-player to {tdm.red.location}
  59. set {%loop-player%.tdm.joined} to 1
  60. set {%loop-player%.tdm.red} to 1
  61. clear {%player%.tdm}
  62. clear {tdm.team::*}
  63. clear {tdm.team.ninzu}
  64. clear {tdm.ninzu}
  65. set {tdm} to 1
  66. set {tdm.timer.pvp} to 100
  67. loop 100 times:
  68. wait 1 second
  69. set {tdm.timer.pvp} to {tdm.timer.pvp} - 1
  70. if {tdm.timer.pvp} <= 10:
  71. broadcast "&aTDM終了まで残り%{tdm.timer.pvp}%秒"
  72. if {tdm.red.kill} >= 30:
  73. stop loop
  74. if {tdm.blue.kill} >= 30:
  75. stop loop
  76. if {stop} is 1:
  77. stop loop
  78. broadcast "&aTDMが終了しました"
  79. if {tdm.red.kill} is more than {tdm.blue.kill}:
  80. broadcast "&c赤チームの勝利です"
  81. if {tdm.blue.kill} is more than {tdm.red.kill}:
  82. broadcast "&b青チームの勝利です"
  83. loop all players:
  84. if {%loop-player%.tdm.joined} = 1:
  85. teleport the loop-player to {spawn.location}
  86. clear {%player%.tdm}
  87. clear {tdm.team::*}
  88. clear {tdm.team.ninzu}
  89. clear {tdm.ninzu}
  90. clear {tdm.kaisi.timer}
  91. clear {tdm.team.blue::*}
  92. clear {tdm.team.red::*}
  93. clear {tdm.blue.kill}
  94. clear {tdm.red.kill}
  95. clear {tdm}
  96. clear {stop}
  97.  
  98. on respawn:
  99. teleport the player to {spawn.location}
  100. wait tick
  101. if {tdm.team.blue::*} contains player:
  102. teleport the player to {tdm.blue.location}
  103.  
  104. if {tdm.team.red::*} contains player:
  105. teleport the player to {tdm.red.location}
  106.  
  107.  
  108.  
  109. command /tdmstop:
  110. permission: sk.tdm
  111. trigger:
  112. clear {%player%.tdm}
  113. clear {tdm.team::*}
  114. clear {tdm.team.ninzu}
  115. clear {tdm.ninzu}
  116. clear {tdm.kaisi.timer}
  117. clear {tdm.team.blue::*}
  118. clear {tdm.team.red::*}
  119. clear {tdm.blue.kill}
  120. clear {tdm.red.kill}
  121. clear {tdm}
  122. set {stop} to 1
  123. wait 2 second
  124. clear {stop}
  125.  
  126. command /tdmadd [<text>]:
  127. trigger:
  128. if arg 1 is "red":
  129. add 1 to {tdm.red.kill}
  130. if arg 1 is "blue":
  131. add 1 to {tdm.blue.kill}
  132.  
  133.  
  134.  
  135.  
  136. command /redset:
  137. permission: sk.tdm
  138. trigger:
  139. set {tdm.red.location} to location of player
  140. send "redの位置をセットしました" to player
  141. command /blueset:
  142. permission: sk.tdm
  143. trigger:
  144. set {tdm.blue.location} to location of player
  145. send "blueの位置をセットしました" to player
  146. on death:
  147. wait tick
  148. if {tdm.team.blue::*} contains attacker:
  149. add 1 to {tdm.blue.kill}
  150. broadcast "&b{tdm.blue.kill}"
  151.  
  152. if {tdm.team.red::*} contains attacker:
  153. add 1 to {tdm.red.kill}
  154. broadcast "&c{tdm.red.kill}"
  155.  
  156. on damage:
  157. attacker is a player
  158. if {tdm.team.blue::*} contains victim:
  159. if {tdm.team.blue::*} contains attacker:
  160. cancel event
  161. if {tdm.team.red::*} contains victim:
  162. if {tdm.team.red::*} contains attacker:
  163. cancel event
  164. on damage:
  165. attacker is a player
  166. victim is a player
  167. set {%victim%.loc.block} to location of the block 2 meter under the victim
  168. loop blocks in radius 0.5 around {%victim%.loc.block}:
  169. loop-block is glowstone
  170. cancel event
  171.  
  172. command /spawnset:
  173. permission: sk.tdm
  174. trigger:
  175. set {spawn.location} to location of player
  176. send "spawnの位置をセットしました" to player
  177.  
  178. every tick:
  179. loop all players:
  180. if {tdm.team.blue::*} contains loop-player:
  181. display 1 redstone particle at location of loop-player with color 0, 0, 255 offset by 0.0, 0.0, 0.0
  182. if {tdm.team.red::*} contains loop-player:
  183. display 1 redstone particle at location of loop-player with color 255, 0, 0 offset by 0.0, 0.0, 0.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement