test_treasure.mcfunction 9.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. tag @a remove get_treasure
  2. execute positioned 1009.50 14.50 1007.50 as @a[tag=!treasure1,team=playing,gamemode=!spectator,distance=..2] unless entity @a[tag=treasure1] run tellraw @a ["",{"text": ">> ","color":"gold","bold": true},{"selector": "@s","color":"gold"} , " 第一个获得了 ",{"text": "营地屋顶","color":"gold"}," 的宝藏!"]
  3. execute positioned 1009.50 14.50 1007.50 as @a[tag=!treasure1,team=playing,gamemode=!spectator,distance=..2] run tag @s add get_treasure
  4. execute positioned 1009.50 14.50 1007.50 as @a[tag=!treasure1,team=playing,gamemode=!spectator,distance=..2] run tag @s add treasure1
  5. execute positioned 1009.50 14.50 1007.50 run particle minecraft:crit ~ ~0.9 ~ 0.25 0.25 0.25 0.2 5 normal @a[tag=!treasure1]
  6. execute positioned 1009.50 14.50 1007.50 run particle minecraft:totem_of_undying ~ ~0.9 ~ 0.2 0.2 0.2 0.2 2 normal @a[tag=treasure1]
  7. execute positioned 1020.50 15.50 1016.50 as @a[tag=!treasure2,team=playing,gamemode=!spectator,distance=..2] unless entity @a[tag=treasure2] run tellraw @a ["",{"text": ">> ","color":"gold","bold": true},{"selector": "@s","color":"gold"} , " 第一个获得了 ",{"text": "沙漠骨骸","color":"gold"}," 的宝藏!"]
  8. execute positioned 1020.50 15.50 1016.50 as @a[tag=!treasure2,team=playing,gamemode=!spectator,distance=..2] run tag @s add get_treasure
  9. execute positioned 1020.50 15.50 1016.50 as @a[tag=!treasure2,team=playing,gamemode=!spectator,distance=..2] run tag @s add treasure2
  10. execute positioned 1020.50 15.50 1016.50 run particle minecraft:crit ~ ~0.9 ~ 0.25 0.25 0.25 0.2 5 normal @a[tag=!treasure2]
  11. execute positioned 1020.50 15.50 1016.50 run particle minecraft:totem_of_undying ~ ~0.9 ~ 0.2 0.2 0.2 0.2 2 normal @a[tag=treasure2]
  12. execute positioned 1008.50 30.50 1020.50 as @a[tag=!treasure3,team=playing,gamemode=!spectator,distance=..2] unless entity @a[tag=treasure3] run tellraw @a ["",{"text": ">> ","color":"gold","bold": true},{"selector": "@s","color":"gold"} , " 第一个获得了 ",{"text": "神庙立柱","color":"gold"}," 的宝藏!"]
  13. execute positioned 1008.50 30.50 1020.50 as @a[tag=!treasure3,team=playing,gamemode=!spectator,distance=..2] run tag @s add get_treasure
  14. execute positioned 1008.50 30.50 1020.50 as @a[tag=!treasure3,team=playing,gamemode=!spectator,distance=..2] run tag @s add treasure3
  15. execute positioned 1008.50 30.50 1020.50 run particle minecraft:crit ~ ~0.9 ~ 0.25 0.25 0.25 0.2 5 normal @a[tag=!treasure3]
  16. execute positioned 1008.50 30.50 1020.50 run particle minecraft:totem_of_undying ~ ~0.9 ~ 0.2 0.2 0.2 0.2 2 normal @a[tag=treasure3]
  17. execute positioned 1011.50 19.50 1058.50 as @a[tag=!treasure4,team=playing,gamemode=!spectator,distance=..2] unless entity @a[tag=treasure4] run tellraw @a ["",{"text": ">> ","color":"gold","bold": true},{"selector": "@s","color":"gold"} , " 第一个获得了 ",{"text": "下界之门","color":"gold"}," 的宝藏!"]
  18. execute positioned 1011.50 19.50 1058.50 as @a[tag=!treasure4,team=playing,gamemode=!spectator,distance=..2] run tag @s add get_treasure
  19. execute positioned 1011.50 19.50 1058.50 as @a[tag=!treasure4,team=playing,gamemode=!spectator,distance=..2] run tag @s add treasure4
  20. execute positioned 1011.50 19.50 1058.50 run particle minecraft:crit ~ ~0.9 ~ 0.25 0.25 0.25 0.2 5 normal @a[tag=!treasure4]
  21. execute positioned 1011.50 19.50 1058.50 run particle minecraft:totem_of_undying ~ ~0.9 ~ 0.2 0.2 0.2 0.2 2 normal @a[tag=treasure4]
  22. execute positioned 1026.50 18.50 1047.00 as @a[tag=!treasure5,team=playing,gamemode=!spectator,distance=..2] unless entity @a[tag=treasure5] run tellraw @a ["",{"text": ">> ","color":"gold","bold": true},{"selector": "@s","color":"gold"} , " 第一个获得了 ",{"text": "落日森林","color":"gold"}," 的宝藏!"]
  23. execute positioned 1026.50 18.50 1047.00 as @a[tag=!treasure5,team=playing,gamemode=!spectator,distance=..2] run tag @s add get_treasure
  24. execute positioned 1026.50 18.50 1047.00 as @a[tag=!treasure5,team=playing,gamemode=!spectator,distance=..2] run tag @s add treasure5
  25. execute positioned 1026.50 18.50 1047.00 run particle minecraft:crit ~ ~0.9 ~ 0.25 0.25 0.25 0.2 5 normal @a[tag=!treasure5]
  26. execute positioned 1026.50 18.50 1047.00 run particle minecraft:totem_of_undying ~ ~0.9 ~ 0.2 0.2 0.2 0.2 2 normal @a[tag=treasure5]
  27. execute positioned 1004.50 18.50 1043.50 as @a[tag=!treasure6,team=playing,gamemode=!spectator,distance=..2] unless entity @a[tag=treasure6] run tellraw @a ["",{"text": ">> ","color":"gold","bold": true},{"selector": "@s","color":"gold"} , " 第一个获得了 ",{"text": "地狱之顶","color":"gold"}," 的宝藏!"]
  28. execute positioned 1004.50 18.50 1043.50 as @a[tag=!treasure6,team=playing,gamemode=!spectator,distance=..2] run tag @s add get_treasure
  29. execute positioned 1004.50 18.50 1043.50 as @a[tag=!treasure6,team=playing,gamemode=!spectator,distance=..2] run tag @s add treasure6
  30. execute positioned 1004.50 18.50 1043.50 run particle minecraft:crit ~ ~0.9 ~ 0.25 0.25 0.25 0.2 5 normal @a[tag=!treasure6]
  31. execute positioned 1004.50 18.50 1043.50 run particle minecraft:totem_of_undying ~ ~0.9 ~ 0.2 0.2 0.2 0.2 2 normal @a[tag=treasure6]
  32. execute positioned 1013.00 08.50 1041.00 as @a[tag=!treasure7,team=playing,gamemode=!spectator,distance=..2] unless entity @a[tag=treasure7] run tellraw @a ["",{"text": ">> ","color":"gold","bold": true},{"selector": "@s","color":"gold"} , " 第一个获得了 ",{"text": "节奏舞厅","color":"gold"}," 的宝藏!"]
  33. execute positioned 1013.00 08.50 1041.00 as @a[tag=!treasure7,team=playing,gamemode=!spectator,distance=..2] run tag @s add get_treasure
  34. execute positioned 1013.00 08.50 1041.00 as @a[tag=!treasure7,team=playing,gamemode=!spectator,distance=..2] run tag @s add treasure7
  35. execute positioned 1013.00 08.50 1041.00 run particle minecraft:crit ~ ~0.9 ~ 0.25 0.25 0.25 0.2 5 normal @a[tag=!treasure7]
  36. execute positioned 1013.00 08.50 1041.00 run particle minecraft:totem_of_undying ~ ~0.9 ~ 0.2 0.2 0.2 0.2 2 normal @a[tag=treasure7]
  37. execute positioned 1007.50 13.50 1025.50 as @a[tag=!treasure8,team=playing,gamemode=!spectator,distance=..2] unless entity @a[tag=treasure8] run tellraw @a ["",{"text": ">> ","color":"gold","bold": true},{"selector": "@s","color":"gold"} , " 第一个获得了 ",{"text": "末路营火","color":"gold"}," 的宝藏!"]
  38. execute positioned 1007.50 13.50 1025.50 as @a[tag=!treasure8,team=playing,gamemode=!spectator,distance=..2] run tag @s add get_treasure
  39. execute positioned 1007.50 13.50 1025.50 as @a[tag=!treasure8,team=playing,gamemode=!spectator,distance=..2] run tag @s add treasure8
  40. execute positioned 1007.50 13.50 1025.50 run particle minecraft:crit ~ ~0.9 ~ 0.25 0.25 0.25 0.2 5 normal @a[tag=!treasure8]
  41. execute positioned 1007.50 13.50 1025.50 run particle minecraft:totem_of_undying ~ ~0.9 ~ 0.2 0.2 0.2 0.2 2 normal @a[tag=treasure8]
  42. execute positioned 1024.50 29.50 1038.50 as @a[tag=!treasure9,team=playing,gamemode=!spectator,distance=..2] unless entity @a[tag=treasure9] run tellraw @a ["",{"text": ">> ","color":"gold","bold": true},{"selector": "@s","color":"gold"} , " 第一个获得了 ",{"text": "活塞平台","color":"gold"}," 的宝藏!"]
  43. execute positioned 1024.50 29.50 1038.50 as @a[tag=!treasure9,team=playing,gamemode=!spectator,distance=..2] run tag @s add get_treasure
  44. execute positioned 1024.50 29.50 1038.50 as @a[tag=!treasure9,team=playing,gamemode=!spectator,distance=..2] run tag @s add treasure9
  45. execute positioned 1024.50 29.50 1038.50 run particle minecraft:crit ~ ~0.9 ~ 0.25 0.25 0.25 0.2 5 normal @a[tag=!treasure9]
  46. execute positioned 1024.50 29.50 1038.50 run particle minecraft:totem_of_undying ~ ~0.9 ~ 0.2 0.2 0.2 0.2 2 normal @a[tag=treasure9]
  47. execute positioned 1014.50 19.50 1024.50 as @a[tag=!treasure10,team=playing,gamemode=!spectator,distance=..2] unless entity @a[tag=treasure10] run tellraw @a ["",{"text": ">> ","color":"gold","bold": true},{"selector": "@s","color":"gold"} , " 第一个获得了 ",{"text": "沙漠密室","color":"gold"}," 的宝藏!"]
  48. execute positioned 1014.50 19.50 1024.50 as @a[tag=!treasure10,team=playing,gamemode=!spectator,distance=..2] run tag @s add get_treasure
  49. execute positioned 1014.50 19.50 1024.50 as @a[tag=!treasure10,team=playing,gamemode=!spectator,distance=..2] run tag @s add treasure10
  50. execute positioned 1014.50 19.50 1024.50 run particle minecraft:crit ~ ~0.9 ~ 0.25 0.25 0.25 0.2 5 normal @a[tag=!treasure10]
  51. execute positioned 1014.50 19.50 1024.50 run particle minecraft:totem_of_undying ~ ~0.9 ~ 0.2 0.2 0.2 0.2 2 normal @a[tag=treasure10]
  52. scoreboard players add @a[tag=get_treasure] treasure 1
  53. tellraw @a[tag=get_treasure,scores={treasure=..9}] ["",{"text":">> ","color":"green","bold": true},"你已获得 ",{"score": {"objective": "treasure","name": "*"},"color":"green"},{"text": " 份 ","color":"green"},"宝藏!"]
  54. execute as @a[tag=get_treasure,scores={treasure=10}] run function mini:parkour/player_finished
  55. execute as @a[tag=get_treasure] at @s run function lib:sounds/levelup
  56. execute as @a[tag=get_treasure] if score @s treasure matches 4 run advancement grant @s only ltw:parkour/treasure1
  57. execute as @a[tag=get_treasure] if score @s treasure matches 7 run advancement grant @s only ltw:parkour/treasure2
  58. execute as @a[tag=get_treasure] if score @s treasure matches 10 run advancement grant @s only ltw:parkour/treasure3