check.mcfunction 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # 范围检测
  2. execute if score @s buy_trigger matches 001..099 at @s unless entity @s[x=-3,z=-63,y=6,dx=25,dy=6,dz=30] run function item:shop/error/piglin
  3. execute if score @s buy_trigger matches 100..199 at @s unless entity @s[x=1,z=-63,y=20,dx=5,dy=4,dz=6] run function item:shop/error/piglin
  4. execute if score @s buy_trigger matches 200..299 at @s unless entity @s[x=-22,z=-75,y=18,dx=10,dy=4,dz=5] run function item:shop/error/villager
  5. execute if score @s buy_trigger matches 666..999 at @s unless entity @s[x=-3,z=-49,y=27,dx=5,dy=4,dz=5] run function item:shop/error/dice
  6. # 普通商店
  7. execute if score @s buy_trigger matches 011 if score $state mem matches 0 run function item:shop/buy/011_bow
  8. execute if score @s buy_trigger matches 012 if score $state mem matches 0 run function item:shop/buy/012_bow
  9. execute if score @s buy_trigger matches 013 if score $state mem matches 0 run function item:shop/buy/013_bow
  10. execute if score @s buy_trigger matches 021 if score $state mem matches 0 run function item:shop/buy/021_arrow
  11. execute if score @s buy_trigger matches 022 if score $state mem matches 0 run function item:shop/buy/022_arrow
  12. execute if score @s buy_trigger matches 023 if score $state mem matches 0 run function item:shop/buy/023_arrow
  13. execute if score @s buy_trigger matches 031 if score $state mem matches 0 run function item:shop/buy/031_apple
  14. execute if score @s buy_trigger matches 032 if score $state mem matches 0 run function item:shop/buy/032_apple
  15. execute if score @s buy_trigger matches 041 if score $state mem matches 0 run function item:shop/buy/041_float
  16. execute if score @s buy_trigger matches 042 if score $state mem matches 0 run function item:shop/buy/042_float
  17. execute if score @s buy_trigger matches 051 if score $state mem matches 0 run function item:shop/buy/051_axe
  18. execute if score @s buy_trigger matches 052 if score $state mem matches 0 run function item:shop/buy/052_axe
  19. execute if score @s buy_trigger matches 053 if score $state mem matches 0 run function item:shop/buy/053_axe
  20. execute if score @s buy_trigger matches 061 if score $state mem matches 0 run function item:shop/buy/061_armor
  21. execute if score @s buy_trigger matches 062 if score $state mem matches 0 run function item:shop/buy/062_armor
  22. execute if score @s buy_trigger matches 063 if score $state mem matches 0 run function item:shop/buy/063_armor
  23. execute if score @s buy_trigger matches 064 if score $state mem matches 0 run function item:shop/buy/064_armor
  24. execute if score @s buy_trigger matches 071 if score $state mem matches 0 run function item:shop/buy/071_fish
  25. execute if score @s buy_trigger matches 072 if score $state mem matches 0 run function item:shop/buy/072_fish
  26. execute if score @s buy_trigger matches 073 if score $state mem matches 0 run function item:shop/buy/073_fish
  27. execute if score @s buy_trigger matches 074 if score $state mem matches 0 run function item:shop/buy/074_fish
  28. # 隐藏商店
  29. execute if score @s buy_trigger matches 101 if score $state mem matches 0 run function item:shop/buy/101_hint
  30. execute if score @s buy_trigger matches 102 if score $state mem matches 0 run function item:shop/buy/102_bgm
  31. execute if score @s buy_trigger matches 103 if score $state mem matches 0 run function item:shop/buy/103_pig
  32. # 村民尾迹商店
  33. execute if score @s buy_trigger matches 201 if score $state mem matches 0 run function item:shop/buy/201_particle_close
  34. execute if score @s buy_trigger matches 211 if score $state mem matches 0 run function item:shop/buy/211_particle
  35. execute if score @s buy_trigger matches 212 if score $state mem matches 0 run function item:shop/buy/212_particle
  36. execute if score @s buy_trigger matches 213 if score $state mem matches 0 run function item:shop/buy/213_particle
  37. execute if score @s buy_trigger matches 214 if score $state mem matches 0 run function item:shop/buy/214_particle
  38. execute if score @s buy_trigger matches 215 if score $state mem matches 0 run function item:shop/buy/215_particle
  39. # 骰子房
  40. execute if score @s buy_trigger matches 999 if score $state mem matches 0 run function item:shop/buy/999_dice
  41. # 彩蛋
  42. execute if score @s buy_trigger matches 114514 if score $state mem matches 0 run function item:shop/buy/easter_egg
  43. # 重置
  44. scoreboard players set @s buy_trigger 0
  45. execute if score $state mem matches 0 run scoreboard players enable @s buy_trigger