buy_arrow1.mcfunction 808 B

1234567891011121314151617
  1. # 箭 x2 (1 gi)
  2. tag @s remove canbuy
  3. tag @s[scores={shop_arrow=..0,gold=9..}] add canbuy
  4. tellraw @s[scores={shop_arrow=1..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
  5. tellraw @s[scores={shop_arrow=..0,gold=..8}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金锭来购买这个物品!","color":"red"}]
  6. tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},{"text":"你购买了 箭 x2!","color":"green"}]
  7. scoreboard players add @s[tag=canbuy] shop_arrow 1
  8. scoreboard players remove @s[tag=canbuy] gold 9
  9. execute as @s[tag=!canbuy] at @s run function lib:sounds/error
  10. execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
  11. function ltw:shop/refresh_gold
  12. function ltw:shop/refresh_equip