Advertisement
Guest User

Countdown Numbers Game /mcfunction - PhoenixSC

a guest
Aug 22nd, 2020
14,974
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.79 KB | None | 0 0
  1. ##### IMPORTS #####
  2. #/summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["model"],DisabledSlots:4144959,ArmorItems:[{},{},{},{id:"minecraft:jigsaw",Count:1b,tag:{CustomModelData:0}}]}
  3. scoreboard objectives add countdown dummy
  4. #scoreboard objectives setdisplay sidebar countdown
  5.  
  6.  
  7. ##### MAIN #####
  8. # Modify values with "scoreboard players set large countdown <value>"
  9. execute if score large countdown matches 5.. run tellraw @p {"text":"[Phoenix SC] Large must be < 5"}
  10. execute if score large countdown matches ..-1 run tellraw @p {"text":"[Phoenix SC] Large must be < 5"}
  11. execute unless score large countdown matches 0..4 run scoreboard players set large countdown 0
  12. scoreboard players set small countdown 6
  13. scoreboard players operation small countdown -= large countdown
  14. scoreboard objectives add countdown_value dummy
  15.  
  16. kill @e[distance=..0.1,tag=countdown]
  17. summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["number","small","countdown"],DisabledSlots:4144959,CustomName:'{"text":"1"}'}
  18. summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["number","small","countdown"],DisabledSlots:4144959,CustomName:'{"text":"1"}'}
  19. summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["number","small","countdown"],DisabledSlots:4144959,CustomName:'{"text":"2"}'}
  20. summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["number","small","countdown"],DisabledSlots:4144959,CustomName:'{"text":"2"}'}
  21. summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["number","small","countdown"],DisabledSlots:4144959,CustomName:'{"text":"3"}'}
  22. summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["number","small","countdown"],DisabledSlots:4144959,CustomName:'{"text":"3"}'}
  23. summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["number","small","countdown"],DisabledSlots:4144959,CustomName:'{"text":"4"}'}
  24. summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["number","small","countdown"],DisabledSlots:4144959,CustomName:'{"text":"4"}'}
  25. summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["number","small","countdown"],DisabledSlots:4144959,CustomName:'{"text":"5"}'}
  26. summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["number","small","countdown"],DisabledSlots:4144959,CustomName:'{"text":"5"}'}
  27. summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["number","small","countdown"],DisabledSlots:4144959,CustomName:'{"text":"6"}'}
  28. summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["number","small","countdown"],DisabledSlots:4144959,CustomName:'{"text":"6"}'}
  29. summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["number","small","countdown"],DisabledSlots:4144959,CustomName:'{"text":"7"}'}
  30. summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["number","small","countdown"],DisabledSlots:4144959,CustomName:'{"text":"7"}'}
  31. summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["number","small","countdown"],DisabledSlots:4144959,CustomName:'{"text":"8"}'}
  32. summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["number","small","countdown"],DisabledSlots:4144959,CustomName:'{"text":"8"}'}
  33. summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["number","small","countdown"],DisabledSlots:4144959,CustomName:'{"text":"9"}'}
  34. summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["number","small","countdown"],DisabledSlots:4144959,CustomName:'{"text":"9"}'}
  35. summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["number","small","countdown"],DisabledSlots:4144959,CustomName:'{"text":"10"}'}
  36. summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["number","small","countdown"],DisabledSlots:4144959,CustomName:'{"text":"10"}'}
  37. summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["number","large","countdown"],DisabledSlots:4144959,CustomName:'{"text":"25"}'}
  38. summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["number","large","countdown"],DisabledSlots:4144959,CustomName:'{"text":"50"}'}
  39. summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["number","large","countdown"],DisabledSlots:4144959,CustomName:'{"text":"75"}'}
  40. summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["number","large","countdown"],DisabledSlots:4144959,CustomName:'{"text":"100"}'}
  41.  
  42. scoreboard players set @e[distance=..0.1,tag=countdown,name=1] countdown_value 1
  43. scoreboard players set @e[distance=..0.1,tag=countdown,name=2] countdown_value 2
  44. scoreboard players set @e[distance=..0.1,tag=countdown,name=3] countdown_value 3
  45. scoreboard players set @e[distance=..0.1,tag=countdown,name=4] countdown_value 4
  46. scoreboard players set @e[distance=..0.1,tag=countdown,name=5] countdown_value 5
  47. scoreboard players set @e[distance=..0.1,tag=countdown,name=6] countdown_value 6
  48. scoreboard players set @e[distance=..0.1,tag=countdown,name=7] countdown_value 7
  49. scoreboard players set @e[distance=..0.1,tag=countdown,name=8] countdown_value 8
  50. scoreboard players set @e[distance=..0.1,tag=countdown,name=9] countdown_value 9
  51. scoreboard players set @e[distance=..0.1,tag=countdown,name=10] countdown_value 10
  52. scoreboard players set @e[distance=..0.1,tag=countdown,name=25] countdown_value 25
  53. scoreboard players set @e[distance=..0.1,tag=countdown,name=50] countdown_value 50
  54. scoreboard players set @e[distance=..0.1,tag=countdown,name=75] countdown_value 75
  55. scoreboard players set @e[distance=..0.1,tag=countdown,name=100] countdown_value 100
  56.  
  57. execute if score large countdown matches 0 run kill @e[distance=..0.1,tag=large]
  58. execute if score large countdown matches 0 run kill @e[distance=..0.1,tag=small,limit=14,sort=random]
  59. execute if score large countdown matches 1 run kill @e[distance=..0.1,tag=large,limit=3,sort=random]
  60. execute if score large countdown matches 1 run kill @e[distance=..0.1,tag=small,limit=15,sort=random]
  61. execute if score large countdown matches 2 run kill @e[distance=..0.1,tag=large,limit=2,sort=random]
  62. execute if score large countdown matches 2 run kill @e[distance=..0.1,tag=small,limit=16,sort=random]
  63. execute if score large countdown matches 3 run kill @e[distance=..0.1,tag=large,limit=1,sort=random]
  64. execute if score large countdown matches 3 run kill @e[distance=..0.1,tag=small,limit=17,sort=random]
  65. execute if score large countdown matches 4 run kill @e[distance=..0.1,tag=small,limit=18,sort=random]
  66.  
  67. ## Calculate
  68. scoreboard objectives add countdown_step dummy
  69. #tellraw @p {"text":"\n\n\n\n\n"}
  70. # Step 1
  71. scoreboard players set countdown_step countdown_step 1
  72. execute if score countdown_step countdown_step matches 1 run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,CustomName:'{"text":"add"}',Tags:["operation","add","countdown"],DisabledSlots:4144959}
  73. execute if score countdown_step countdown_step matches 1 run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,CustomName:'{"text":"subtract"}',Tags:["operation","subtract","countdown"],DisabledSlots:4144959}
  74. execute if score countdown_step countdown_step matches 1 run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,CustomName:'{"text":"multiply"}',Tags:["operation","multiply","countdown"],DisabledSlots:4144959}
  75. execute if score countdown_step countdown_step matches 1 run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,CustomName:'{"text":"divide"}',Tags:["operation","divide","countdown"],DisabledSlots:4144959}
  76. execute if score countdown_step countdown_step matches 1 run kill @e[distance=..0.1,tag=operation,limit=3,sort=random]
  77. execute if score countdown_step countdown_step matches 1 run tag @e[distance=..0.1,tag=!selected,tag=number,limit=2,sort=random] add selected
  78. execute if score countdown_step countdown_step matches 1 run tag @e[distance=..0.1,tag=selected,limit=1,sort=random] add selected1
  79. execute if score countdown_step countdown_step matches 1 run tag @e[distance=..0.1,tag=selected,tag=!selected1,limit=1,sort=random] add selected2
  80. execute if score countdown_step countdown_step matches 1 run scoreboard players operation value countdown_step = @e[distance=..0.1,tag=selected1] countdown_value
  81. execute if score countdown_step countdown_step matches 1 run execute if entity @e[distance=..0.1,tag=add] run scoreboard players operation value countdown_step += @e[distance=..0.1,tag=selected2] countdown_value
  82. execute if score countdown_step countdown_step matches 1 run execute if entity @e[distance=..0.1,tag=subtract] run scoreboard players operation value countdown_step -= @e[distance=..0.1,tag=selected2] countdown_value
  83. execute if score countdown_step countdown_step matches 1 run execute if entity @e[distance=..0.1,tag=multiply] run scoreboard players operation value countdown_step *= @e[distance=..0.1,tag=selected2] countdown_value
  84. execute if score countdown_step countdown_step matches 1 run execute if entity @e[distance=..0.1,tag=divide] run scoreboard players operation temp countdown_step = value countdown_step
  85. execute if score countdown_step countdown_step matches 1 run execute if entity @e[distance=..0.1,tag=divide] run scoreboard players operation temp countdown_step %= @e[distance=..0.1,tag=selected2] countdown_value
  86. execute if score countdown_step countdown_step matches 1 run execute if entity @e[distance=..0.1,tag=divide] run execute if score temp countdown_step matches 1.. run function scripts:numbers_game
  87. execute if score countdown_step countdown_step matches 1 run execute if entity @e[distance=..0.1,tag=divide] run execute if score temp countdown_step matches 1.. run scoreboard players set countdown_step countdown_step 0
  88. execute if score countdown_step countdown_step matches 1 run execute if entity @e[distance=..0.1,tag=divide] run scoreboard players operation value countdown_step /= @e[distance=..0.1,tag=selected2] countdown_value
  89. execute if score countdown_step countdown_step matches 1 run execute if score value countdown_step matches ..-1 run function scripts:numbers_game
  90. execute if score countdown_step countdown_step matches 1 run execute if score value countdown_step matches ..-1 run scoreboard players set countdown_step countdown_step 0
  91. #execute if score countdown_step countdown_step matches 1 run tellraw @p {"selector":"@e[tag=selected1]","color":"gray"}
  92. #execute if score countdown_step countdown_step matches 1 run tellraw @p {"selector":"@e[tag=operation]","color":"gray"}
  93. #execute if score countdown_step countdown_step matches 1 run tellraw @p {"selector":"@e[tag=selected2]","color":"gray"}
  94. execute if score countdown_step countdown_step matches 1 run kill @e[tag=operation]
  95. #execute if score countdown_step countdown_step matches 1 run tellraw @p {"score":{"name":"value","objective":"countdown_step"},"color":"dark_gray"}
  96.  
  97. # Step 2
  98. execute if score countdown_step countdown_step matches 1 run scoreboard players set countdown_step countdown_step 2
  99. execute if score countdown_step countdown_step matches 2 run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,CustomName:'{"text":"add"}',Tags:["operation","add","countdown"],DisabledSlots:4144959}
  100. execute if score countdown_step countdown_step matches 2 run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,CustomName:'{"text":"subtract"}',Tags:["operation","subtract","countdown"],DisabledSlots:4144959}
  101. execute if score countdown_step countdown_step matches 2 run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,CustomName:'{"text":"multiply"}',Tags:["operation","multiply","countdown"],DisabledSlots:4144959}
  102. execute if score countdown_step countdown_step matches 2 run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,CustomName:'{"text":"divide"}',Tags:["operation","divide","countdown"],DisabledSlots:4144959}
  103. execute if score countdown_step countdown_step matches 2 run kill @e[distance=..0.1,tag=operation,limit=3,sort=random]
  104. execute if score countdown_step countdown_step matches 2 run tag @e[distance=..0.1,tag=!selected,tag=number,limit=1,sort=random] add selected3
  105. execute if score countdown_step countdown_step matches 2 run execute if entity @e[distance=..0.1,tag=add] run scoreboard players operation value countdown_step += @e[distance=..0.1,tag=selected3] countdown_value
  106. execute if score countdown_step countdown_step matches 2 run execute if entity @e[distance=..0.1,tag=subtract] run scoreboard players operation value countdown_step -= @e[distance=..0.1,tag=selected3] countdown_value
  107. execute if score countdown_step countdown_step matches 2 run execute if entity @e[distance=..0.1,tag=multiply] run scoreboard players operation value countdown_step *= @e[distance=..0.1,tag=selected3] countdown_value
  108. execute if score countdown_step countdown_step matches 2 run execute if entity @e[distance=..0.1,tag=divide] run scoreboard players operation temp countdown_step = value countdown_step
  109. execute if score countdown_step countdown_step matches 2 run execute if entity @e[distance=..0.1,tag=divide] run scoreboard players operation temp countdown_step %= @e[distance=..0.1,tag=selected3] countdown_value
  110. execute if score countdown_step countdown_step matches 2 run execute if entity @e[distance=..0.1,tag=divide] run execute if score temp countdown_step matches 1.. run function scripts:numbers_game
  111. execute if score countdown_step countdown_step matches 2 run execute if entity @e[distance=..0.1,tag=divide] run execute if score temp countdown_step matches 1.. run scoreboard players set countdown_step countdown_step 0
  112. execute if score countdown_step countdown_step matches 2 run execute if entity @e[distance=..0.1,tag=divide] run scoreboard players operation value countdown_step /= @e[distance=..0.1,tag=selected3] countdown_value
  113. execute if score countdown_step countdown_step matches 2 run execute if score value countdown_step matches ..-1 run function scripts:numbers_game
  114. execute if score countdown_step countdown_step matches 2 run execute if score value countdown_step matches ..-1 run scoreboard players set countdown_step countdown_step 0
  115. #execute if score countdown_step countdown_step matches 2 run tellraw @p {"selector":"@e[tag=operation]","color":"gray"}
  116. #execute if score countdown_step countdown_step matches 2 run tellraw @p {"selector":"@e[tag=selected3]","color":"gray"}
  117. execute if score countdown_step countdown_step matches 2 run kill @e[tag=operation]
  118. #execute if score countdown_step countdown_step matches 2 run tellraw @p {"score":{"name":"value","objective":"countdown_step"},"color":"dark_gray"}
  119.  
  120. # Step 3
  121. execute if score countdown_step countdown_step matches 2 run scoreboard players set countdown_step countdown_step 3
  122. execute if score countdown_step countdown_step matches 3 run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,CustomName:'{"text":"add"}',Tags:["operation","add","countdown"],DisabledSlots:4144959}
  123. execute if score countdown_step countdown_step matches 3 run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,CustomName:'{"text":"subtract"}',Tags:["operation","subtract","countdown"],DisabledSlots:4144959}
  124. execute if score countdown_step countdown_step matches 3 run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,CustomName:'{"text":"multiply"}',Tags:["operation","multiply","countdown"],DisabledSlots:4144959}
  125. execute if score countdown_step countdown_step matches 3 run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,CustomName:'{"text":"divide"}',Tags:["operation","divide","countdown"],DisabledSlots:4144959}
  126. execute if score countdown_step countdown_step matches 3 run kill @e[distance=..0.1,tag=operation,limit=3,sort=random]
  127. execute if score countdown_step countdown_step matches 3 run tag @e[distance=..0.1,tag=!selected,tag=number,limit=1,sort=random] add selected4
  128. execute if score countdown_step countdown_step matches 3 run execute if entity @e[distance=..0.1,tag=add] run scoreboard players operation value countdown_step += @e[distance=..0.1,tag=selected4] countdown_value
  129. execute if score countdown_step countdown_step matches 3 run execute if entity @e[distance=..0.1,tag=subtract] run scoreboard players operation value countdown_step -= @e[distance=..0.1,tag=selected4] countdown_value
  130. execute if score countdown_step countdown_step matches 3 run execute if entity @e[distance=..0.1,tag=multiply] run scoreboard players operation value countdown_step *= @e[distance=..0.1,tag=selected4] countdown_value
  131. execute if score countdown_step countdown_step matches 3 run execute if entity @e[distance=..0.1,tag=divide] run scoreboard players operation temp countdown_step = value countdown_step
  132. execute if score countdown_step countdown_step matches 3 run execute if entity @e[distance=..0.1,tag=divide] run scoreboard players operation temp countdown_step %= @e[distance=..0.1,tag=selected4] countdown_value
  133. execute if score countdown_step countdown_step matches 3 run execute if entity @e[distance=..0.1,tag=divide] run execute if score temp countdown_step matches 1.. run function scripts:numbers_game
  134. execute if score countdown_step countdown_step matches 3 run execute if entity @e[distance=..0.1,tag=divide] run execute if score temp countdown_step matches 1.. run scoreboard players set countdown_step countdown_step 0
  135. execute if score countdown_step countdown_step matches 3 run execute if entity @e[distance=..0.1,tag=divide] run scoreboard players operation value countdown_step /= @e[distance=..0.1,tag=selected4] countdown_value
  136. execute if score countdown_step countdown_step matches 3 run execute if score value countdown_step matches ..-1 run function scripts:numbers_game
  137. execute if score countdown_step countdown_step matches 3 run execute if score value countdown_step matches ..-1 run scoreboard players set countdown_step countdown_step 0
  138. #execute if score countdown_step countdown_step matches 3 run tellraw @p {"selector":"@e[tag=operation]","color":"gray"}
  139. #execute if score countdown_step countdown_step matches 3 run tellraw @p {"selector":"@e[tag=selected4]","color":"gray"}
  140. execute if score countdown_step countdown_step matches 3 run kill @e[tag=operation]
  141. #execute if score countdown_step countdown_step matches 3 run tellraw @p {"score":{"name":"value","objective":"countdown_step"},"color":"dark_gray"}
  142.  
  143. # Step 4
  144. execute if score countdown_step countdown_step matches 3 run scoreboard players set countdown_step countdown_step 4
  145. execute if score countdown_step countdown_step matches 4 run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,CustomName:'{"text":"add"}',Tags:["operation","add","countdown"],DisabledSlots:4144959}
  146. execute if score countdown_step countdown_step matches 4 run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,CustomName:'{"text":"subtract"}',Tags:["operation","subtract","countdown"],DisabledSlots:4144959}
  147. execute if score countdown_step countdown_step matches 4 run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,CustomName:'{"text":"multiply"}',Tags:["operation","multiply","countdown"],DisabledSlots:4144959}
  148. execute if score countdown_step countdown_step matches 4 run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,CustomName:'{"text":"divide"}',Tags:["operation","divide","countdown"],DisabledSlots:4144959}
  149. execute if score countdown_step countdown_step matches 4 run kill @e[distance=..0.1,tag=operation,limit=3,sort=random]
  150. execute if score countdown_step countdown_step matches 4 run tag @e[distance=..0.1,tag=!selected,tag=number,limit=1,sort=random] add selected5
  151. execute if score countdown_step countdown_step matches 4 run execute if entity @e[distance=..0.1,tag=add] run scoreboard players operation value countdown_step += @e[distance=..0.1,tag=selected5] countdown_value
  152. execute if score countdown_step countdown_step matches 4 run execute if entity @e[distance=..0.1,tag=subtract] run scoreboard players operation value countdown_step -= @e[distance=..0.1,tag=selected5] countdown_value
  153. execute if score countdown_step countdown_step matches 4 run execute if entity @e[distance=..0.1,tag=multiply] run scoreboard players operation value countdown_step *= @e[distance=..0.1,tag=selected5] countdown_value
  154. execute if score countdown_step countdown_step matches 4 run execute if entity @e[distance=..0.1,tag=divide] run scoreboard players operation temp countdown_step = value countdown_step
  155. execute if score countdown_step countdown_step matches 4 run execute if entity @e[distance=..0.1,tag=divide] run scoreboard players operation temp countdown_step %= @e[distance=..0.1,tag=selected5] countdown_value
  156. execute if score countdown_step countdown_step matches 4 run execute if entity @e[distance=..0.1,tag=divide] run execute if score temp countdown_step matches 1.. run function scripts:numbers_game
  157. execute if score countdown_step countdown_step matches 4 run execute if entity @e[distance=..0.1,tag=divide] run execute if score temp countdown_step matches 1.. run scoreboard players set countdown_step countdown_step 0
  158. execute if score countdown_step countdown_step matches 4 run execute if entity @e[distance=..0.1,tag=divide] run scoreboard players operation value countdown_step /= @e[distance=..0.1,tag=selected5] countdown_value
  159. execute if score countdown_step countdown_step matches 4 run execute if score value countdown_step matches ..-1 run function scripts:numbers_game
  160. execute if score countdown_step countdown_step matches 4 run execute if score value countdown_step matches ..-1 run scoreboard players set countdown_step countdown_step 0
  161. #execute if score countdown_step countdown_step matches 4 run tellraw @p {"selector":"@e[tag=operation]","color":"gray"}
  162. #execute if score countdown_step countdown_step matches 4 run tellraw @p {"selector":"@e[tag=selected5]","color":"gray"}
  163. execute if score countdown_step countdown_step matches 4 run kill @e[tag=operation]
  164. #execute if score countdown_step countdown_step matches 4 run tellraw @p {"score":{"name":"value","objective":"countdown_step"},"color":"dark_gray"}
  165.  
  166. # Step 5
  167. execute if score countdown_step countdown_step matches 4 run scoreboard players set countdown_step countdown_step 5
  168. execute if score countdown_step countdown_step matches 5 run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,CustomName:'{"text":"add"}',Tags:["operation","add","countdown"],DisabledSlots:4144959}
  169. execute if score countdown_step countdown_step matches 5 run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,CustomName:'{"text":"subtract"}',Tags:["operation","subtract","countdown"],DisabledSlots:4144959}
  170. execute if score countdown_step countdown_step matches 5 run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,CustomName:'{"text":"multiply"}',Tags:["operation","multiply","countdown"],DisabledSlots:4144959}
  171. execute if score countdown_step countdown_step matches 5 run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,CustomName:'{"text":"divide"}',Tags:["operation","divide","countdown"],DisabledSlots:4144959}
  172. execute if score countdown_step countdown_step matches 5 run kill @e[distance=..0.1,tag=operation,limit=3,sort=random]
  173. execute if score countdown_step countdown_step matches 5 run tag @e[distance=..0.1,tag=!selected,tag=number,limit=1,sort=random] add selected6
  174. execute if score countdown_step countdown_step matches 5 run execute if entity @e[distance=..0.1,tag=add] run scoreboard players operation value countdown_step += @e[distance=..0.1,tag=selected6] countdown_value
  175. execute if score countdown_step countdown_step matches 5 run execute if entity @e[distance=..0.1,tag=subtract] run scoreboard players operation value countdown_step -= @e[distance=..0.1,tag=selected6] countdown_value
  176. execute if score countdown_step countdown_step matches 5 run execute if entity @e[distance=..0.1,tag=multiply] run scoreboard players operation value countdown_step *= @e[distance=..0.1,tag=selected6] countdown_value
  177. execute if score countdown_step countdown_step matches 5 run execute if entity @e[distance=..0.1,tag=divide] run scoreboard players operation temp countdown_step = value countdown_step
  178. execute if score countdown_step countdown_step matches 5 run execute if entity @e[distance=..0.1,tag=divide] run scoreboard players operation temp countdown_step %= @e[distance=..0.1,tag=selected6] countdown_value
  179. execute if score countdown_step countdown_step matches 5 run execute if entity @e[distance=..0.1,tag=divide] run execute if score temp countdown_step matches 1.. run function scripts:numbers_game
  180. execute if score countdown_step countdown_step matches 5 run execute if entity @e[distance=..0.1,tag=divide] run execute if score temp countdown_step matches 1.. run scoreboard players set countdown_step countdown_step 0
  181. execute if score countdown_step countdown_step matches 5 run execute if entity @e[distance=..0.1,tag=divide] run scoreboard players operation value countdown_step /= @e[distance=..0.1,tag=selected6] countdown_value
  182. execute if score countdown_step countdown_step matches 5 run execute if score value countdown_step matches ..-1 run function scripts:numbers_game
  183. execute if score countdown_step countdown_step matches 5 run execute if score value countdown_step matches ..-1 run scoreboard players set countdown_step countdown_step 0
  184. #execute if score countdown_step countdown_step matches 5 run tellraw @p {"selector":"@e[tag=operation]","color":"gray"}
  185. #execute if score countdown_step countdown_step matches 5 run tellraw @p {"selector":"@e[tag=selected6]","color":"gray"}
  186. execute if score countdown_step countdown_step matches 5 run kill @e[tag=operation]
  187. #execute if score countdown_step countdown_step matches 5 run tellraw @p {"score":{"name":"value","objective":"countdown_step"},"color":"dark_gray"}
  188.  
  189. # Is it three digits?
  190. execute if score countdown_step countdown_step matches 5 run scoreboard players set countdown_step countdown_step 6
  191. execute if score countdown_step countdown_step matches 6 run execute unless score value countdown_step matches 100..999 run function scripts:numbers_game
  192. execute if score countdown_step countdown_step matches 6 run execute unless score value countdown_step matches 100..999 run scoreboard players set countdown_step countdown_step 0
  193.  
  194. ## End
  195. execute if score countdown_step countdown_step matches 6 run tellraw @p {"text":"\n-- [ Numbers Game, PhoenixSC ] ----->>\n","color":"gray"}
  196. execute if score countdown_step countdown_step matches 6 if score large countdown matches 0 run tellraw @p {"selector":"@e[distance=..0.1,tag=small]","color":"aqua"}
  197. execute if score countdown_step countdown_step matches 6 if score large countdown matches 1..4 run tellraw @p ["",{"selector":"@e[distance=..0.1,tag=large]","color":"aqua"},{"text":", ","color":"gray"},{"selector":"@e[distance=..0.1,tag=small]","color":"aqua"}]
  198. execute if score countdown_step countdown_step matches 6 run tellraw @p {"score":{"name":"value","objective":"countdown_step"},"color":"yellow"}
  199. execute if score countdown_step countdown_step matches 6 run tellraw @p {"text":"____________\n","color":"dark_gray"}
  200.  
  201. kill @e[distance=..0.1,tag=countdown]
  202. scoreboard players set countdown_step countdown_step 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement