2
0

refresh_equip.mcfunction 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # 刷新单个玩家购买的物品
  2. clear @s bow
  3. give @s[scores={shop_bow=1}] bow{display:{Name:'{"text":"弓","italic":false,"color":"gray"}'},Damage:381}
  4. clear @s wooden_shovel
  5. clear @s stone_shovel
  6. clear @s iron_shovel
  7. clear @s diamond_shovel
  8. give @s[scores={shop_weapon=1}] wooden_shovel{display:{Name:'{"text":"木锹","italic":false,"color":"gray"}'}}
  9. give @s[scores={shop_weapon=2}] stone_shovel{display:{Name:'{"text":"石锹","italic":false,"color":"gray"}'}}
  10. give @s[scores={shop_weapon=3}] iron_shovel{display:{Name:'{"text":"铁锹","italic":false,"color":"gray"}'}}
  11. give @s[scores={shop_weapon=4}] diamond_shovel{display:{Name:'{"text":"钻石锹","italic":false,"color":"gray"}'}}
  12. clear @s splash_potion
  13. give @s[scores={shop_potion_spd=1}] splash_potion{CustomPotionEffects:[{Id:1,Amplifier:0,Duration:300}],CustomPotionColor:8039610,display:{Name:'{"text":"喷溅型迅捷药水","italic":false,"color":"gray"}'}}
  14. give @s[scores={shop_potion_spd=2}] splash_potion{CustomPotionEffects:[{Id:1,Amplifier:1,Duration:300}],CustomPotionColor:8039610,display:{Name:'{"text":"喷溅型迅捷药水","italic":false,"color":"gray"}'}}
  15. give @s[scores={shop_potion_rst=1}] splash_potion{CustomPotionEffects:[{Id:11,Amplifier:0,Duration:400}],CustomPotionColor:9913400,display:{Name:'{"text":"喷溅型抵抗药水","italic":false,"color":"gray"}'}}
  16. clear @s golden_apple
  17. clear @s enchanted_golden_apple
  18. give @s[scores={shop_apple=1}] golden_apple{display:{Lore:['{"text":"恢复 4 颗心或生命 +1","italic":false,"color":"gray"}'],Name:'{"text":"生命果","italic":false,"color":"green"}'}}
  19. give @s[scores={shop_apple=2}] enchanted_golden_apple{display:{Name:'{"text":"附魔生命果","italic":false}',Lore:['{"text":"恢复到满血或生命加倍","italic":false,"color":"gray"}']}}
  20. scoreboard players reset @s shop_apple
  21. clear @s arrow
  22. give @s[scores={shop_arrow=1}] arrow
  23. give @s[scores={shop_arrow=2}] arrow 2
  24. give @s[scores={shop_arrow=3}] tipped_arrow{Potion:"minecraft:slowness"} 2
  25. clear @s firework_rocket
  26. give @s[scores={shop_firework=1}] minecraft:firework_rocket{Fireworks:{Flight:1b,Explosions:[{Type:0b,Colors:[I;11743532,15435844,14602026,4312372,6719955,2437522,8073150],Flicker:1b}]}} 1
  27. replaceitem entity @s armor.head air
  28. replaceitem entity @s[scores={shop_armor=2}] armor.head golden_helmet{display:{Name:'{"text":"金头盔","italic":false,"color":"gray"}'}}
  29. replaceitem entity @s armor.chest air
  30. replaceitem entity @s[scores={shop_armor=4}] armor.chest golden_chestplate{display:{Name:'{"text":"金胸甲","italic":false,"color":"gray"}'}}
  31. replaceitem entity @s armor.legs air
  32. replaceitem entity @s[scores={shop_armor=3}] armor.legs golden_leggings{display:{Name:'{"text":"金护腿","italic":false,"color":"gray"}'}}
  33. replaceitem entity @s armor.feet air
  34. replaceitem entity @s[scores={shop_armor=1}] armor.legs golden_boots{display:{Name:'{"text":"金靴子","italic":false,"color":"gray"}'}}