00ll00 6 ani în urmă
părinte
comite
e159d7e812

+ 14 - 18
data/item/functions/shop/buy_apple1.mcfunction

@@ -1,19 +1,15 @@
 # 生命果 (4 gi)
-    # 触发器ID 1
-    execute unless entity @s[scores={shop_apple=0..}] run scoreboard players set @s shop_apple 0
-    tag @s remove canbuy
-    tag @s[scores={shop_apple=0,gold=36..}] add canbuy
-
-    tellraw @s[scores={shop_apple=1..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
-    tellraw @s[scores={shop_apple=0,gold=..35}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金锭来购买这个物品!","color":"red"}]
-    tellraw @s[scores={shop_apple=..-1}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买上一级的物品!","color":"red"}]
-
-    tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"生命果","color":"green"}]
-    execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"生命果","color":"green"}]
-    scoreboard players add @s[tag=canbuy] shop_apple 1
-    scoreboard players remove @s[tag=canbuy] gold 36
-
-    execute as @s[tag=!canbuy] at @s run function lib:sounds/error
-    execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
-
-    execute as @s[tag=canbuy] run function item:shop/refresh_gold
+# 触发器ID 1
+execute unless entity @s[scores={shop_apple=0..}] run scoreboard players set @s shop_apple 0
+tag @s remove canbuy
+tag @s[scores={shop_apple=0,gold=36..}] add canbuy
+tellraw @s[scores={shop_apple=1..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
+tellraw @s[scores={shop_apple=0,gold=..35}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金锭来购买这个物品!","color":"red"}]
+tellraw @s[scores={shop_apple=..-1}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买上一级的物品!","color":"red"}]
+tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"生命果","color":"green"}]
+execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"生命果","color":"green"}]
+scoreboard players add @s[tag=canbuy] shop_apple 1
+scoreboard players remove @s[tag=canbuy] gold 36
+execute as @s[tag=!canbuy] at @s run function lib:sounds/error
+execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
+execute as @s[tag=canbuy] run function item:shop/refresh_gold

+ 14 - 18
data/item/functions/shop/buy_apple2.mcfunction

@@ -1,19 +1,15 @@
 # 附魔生命果 (1 gb)
-    # 触发器ID 2
-    execute unless entity @s[scores={shop_apple=0..}] run scoreboard players set @s shop_apple 0
-    tag @s remove canbuy
-    tag @s[scores={shop_apple=1,gold=81..}] add canbuy
-
-    tellraw @s[scores={shop_apple=2..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
-    tellraw @s[scores={shop_apple=1,gold=..80}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金块来购买这个物品!","color":"red"}]
-    tellraw @s[scores={shop_apple=..0}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买上一级的物品!","color":"red"}]
-
-    tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"附魔生命果","color":"green"}]
-    execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"附魔生命果","color":"green"}]
-    scoreboard players add @s[tag=canbuy] shop_apple 1
-    scoreboard players remove @s[tag=canbuy] gold 81
-
-    execute as @s[tag=!canbuy] at @s run function lib:sounds/error
-    execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
-
-    execute as @s[tag=canbuy] run function item:shop/refresh_gold
+# 触发器ID 2
+execute unless entity @s[scores={shop_apple=0..}] run scoreboard players set @s shop_apple 0
+tag @s remove canbuy
+tag @s[scores={shop_apple=1,gold=81..}] add canbuy
+tellraw @s[scores={shop_apple=2..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
+tellraw @s[scores={shop_apple=1,gold=..80}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金块来购买这个物品!","color":"red"}]
+tellraw @s[scores={shop_apple=..0}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买上一级的物品!","color":"red"}]
+tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"附魔生命果","color":"green"}]
+execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"附魔生命果","color":"green"}]
+scoreboard players add @s[tag=canbuy] shop_apple 1
+scoreboard players remove @s[tag=canbuy] gold 81
+execute as @s[tag=!canbuy] at @s run function lib:sounds/error
+execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
+execute as @s[tag=canbuy] run function item:shop/refresh_gold

+ 14 - 18
data/item/functions/shop/buy_armor1.mcfunction

@@ -1,19 +1,15 @@
 # 金靴子 (1 gi)
-    # 触发器ID 3
-    execute unless entity @s[scores={shop_armor=0..}] run scoreboard players set @s shop_armor 0
-    tag @s remove canbuy
-    tag @s[scores={shop_armor=0,gold=9..}] add canbuy
-
-    tellraw @s[scores={shop_armor=1..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
-    tellraw @s[scores={shop_armor=0,gold=..8}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金锭来购买这个物品!","color":"red"}]
-    tellraw @s[scores={shop_armor=..-1}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买上一级的物品!","color":"red"}]
-
-    tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"金靴子","color":"green"}]
-    execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"金靴子","color":"green"}]
-    scoreboard players add @s[tag=canbuy] shop_armor 1
-    scoreboard players remove @s[tag=canbuy] gold 9
-
-    execute as @s[tag=!canbuy] at @s run function lib:sounds/error
-    execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
-
-    execute as @s[tag=canbuy] run function item:shop/refresh_gold
+# 触发器ID 3
+execute unless entity @s[scores={shop_armor=0..}] run scoreboard players set @s shop_armor 0
+tag @s remove canbuy
+tag @s[scores={shop_armor=0,gold=9..}] add canbuy
+tellraw @s[scores={shop_armor=1..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
+tellraw @s[scores={shop_armor=0,gold=..8}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金锭来购买这个物品!","color":"red"}]
+tellraw @s[scores={shop_armor=..-1}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买上一级的物品!","color":"red"}]
+tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"金靴子","color":"green"}]
+execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"金靴子","color":"green"}]
+scoreboard players add @s[tag=canbuy] shop_armor 1
+scoreboard players remove @s[tag=canbuy] gold 9
+execute as @s[tag=!canbuy] at @s run function lib:sounds/error
+execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
+execute as @s[tag=canbuy] run function item:shop/refresh_gold

+ 14 - 18
data/item/functions/shop/buy_armor2.mcfunction

@@ -1,19 +1,15 @@
 # 金头盔 (4 gi)
-    # 触发器ID 4
-    execute unless entity @s[scores={shop_armor=0..}] run scoreboard players set @s shop_armor 0
-    tag @s remove canbuy
-    tag @s[scores={shop_armor=1,gold=36..}] add canbuy
-
-    tellraw @s[scores={shop_armor=2..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
-    tellraw @s[scores={shop_armor=1,gold=..35}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金锭来购买这个物品!","color":"red"}]
-    tellraw @s[scores={shop_armor=..0}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买上一级的物品!","color":"red"}]
-
-    tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"金头盔","color":"green"}]
-    execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"金头盔","color":"green"}]
-    scoreboard players add @s[tag=canbuy] shop_armor 1
-    scoreboard players remove @s[tag=canbuy] gold 36
-
-    execute as @s[tag=!canbuy] at @s run function lib:sounds/error
-    execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
-
-    execute as @s[tag=canbuy] run function item:shop/refresh_gold
+# 触发器ID 4
+execute unless entity @s[scores={shop_armor=0..}] run scoreboard players set @s shop_armor 0
+tag @s remove canbuy
+tag @s[scores={shop_armor=1,gold=36..}] add canbuy
+tellraw @s[scores={shop_armor=2..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
+tellraw @s[scores={shop_armor=1,gold=..35}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金锭来购买这个物品!","color":"red"}]
+tellraw @s[scores={shop_armor=..0}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买上一级的物品!","color":"red"}]
+tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"金头盔","color":"green"}]
+execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"金头盔","color":"green"}]
+scoreboard players add @s[tag=canbuy] shop_armor 1
+scoreboard players remove @s[tag=canbuy] gold 36
+execute as @s[tag=!canbuy] at @s run function lib:sounds/error
+execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
+execute as @s[tag=canbuy] run function item:shop/refresh_gold

+ 14 - 18
data/item/functions/shop/buy_armor3.mcfunction

@@ -1,19 +1,15 @@
 # 金护腿 (1 gb)
-    # 触发器ID 5
-    execute unless entity @s[scores={shop_armor=0..}] run scoreboard players set @s shop_armor 0
-    tag @s remove canbuy
-    tag @s[scores={shop_armor=2,gold=81..}] add canbuy
-
-    tellraw @s[scores={shop_armor=3..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
-    tellraw @s[scores={shop_armor=2,gold=..80}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金块来购买这个物品!","color":"red"}]
-    tellraw @s[scores={shop_armor=..1}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买上一级的物品!","color":"red"}]
-
-    tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"金护腿","color":"green"}]
-    execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"金护腿","color":"green"}]
-    scoreboard players add @s[tag=canbuy] shop_armor 1
-    scoreboard players remove @s[tag=canbuy] gold 81
-
-    execute as @s[tag=!canbuy] at @s run function lib:sounds/error
-    execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
-
-    execute as @s[tag=canbuy] run function item:shop/refresh_gold
+# 触发器ID 5
+execute unless entity @s[scores={shop_armor=0..}] run scoreboard players set @s shop_armor 0
+tag @s remove canbuy
+tag @s[scores={shop_armor=2,gold=81..}] add canbuy
+tellraw @s[scores={shop_armor=3..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
+tellraw @s[scores={shop_armor=2,gold=..80}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金块来购买这个物品!","color":"red"}]
+tellraw @s[scores={shop_armor=..1}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买上一级的物品!","color":"red"}]
+tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"金护腿","color":"green"}]
+execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"金护腿","color":"green"}]
+scoreboard players add @s[tag=canbuy] shop_armor 1
+scoreboard players remove @s[tag=canbuy] gold 81
+execute as @s[tag=!canbuy] at @s run function lib:sounds/error
+execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
+execute as @s[tag=canbuy] run function item:shop/refresh_gold

+ 14 - 18
data/item/functions/shop/buy_armor4.mcfunction

@@ -1,19 +1,15 @@
 # 金胸甲 (3 gb)
-    # 触发器ID 6
-    execute unless entity @s[scores={shop_armor=0..}] run scoreboard players set @s shop_armor 0
-    tag @s remove canbuy
-    tag @s[scores={shop_armor=3,gold=243..}] add canbuy
-
-    tellraw @s[scores={shop_armor=4..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
-    tellraw @s[scores={shop_armor=3,gold=..242}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金块来购买这个物品!","color":"red"}]
-    tellraw @s[scores={shop_armor=..2}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买上一级的物品!","color":"red"}]
-
-    tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"金胸甲","color":"green"}]
-    execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"金胸甲","color":"green"}]
-    scoreboard players add @s[tag=canbuy] shop_armor 1
-    scoreboard players remove @s[tag=canbuy] gold 243
-
-    execute as @s[tag=!canbuy] at @s run function lib:sounds/error
-    execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
-
-    execute as @s[tag=canbuy] run function item:shop/refresh_gold
+# 触发器ID 6
+execute unless entity @s[scores={shop_armor=0..}] run scoreboard players set @s shop_armor 0
+tag @s remove canbuy
+tag @s[scores={shop_armor=3,gold=243..}] add canbuy
+tellraw @s[scores={shop_armor=4..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
+tellraw @s[scores={shop_armor=3,gold=..242}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金块来购买这个物品!","color":"red"}]
+tellraw @s[scores={shop_armor=..2}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买上一级的物品!","color":"red"}]
+tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"金胸甲","color":"green"}]
+execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"金胸甲","color":"green"}]
+scoreboard players add @s[tag=canbuy] shop_armor 1
+scoreboard players remove @s[tag=canbuy] gold 243
+execute as @s[tag=!canbuy] at @s run function lib:sounds/error
+execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
+execute as @s[tag=canbuy] run function item:shop/refresh_gold

+ 14 - 18
data/item/functions/shop/buy_arrow1.mcfunction

@@ -1,19 +1,15 @@
 # 缓慢之箭 x2 (1 gb)
-    # 触发器ID 9
-    execute unless entity @s[scores={shop_arrow=0..}] run scoreboard players set @s shop_arrow 0
-    tag @s remove canbuy
-    tag @s[scores={shop_arrow=1,gold=81..}] add canbuy
-
-    tellraw @s[scores={shop_arrow=2..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
-    tellraw @s[scores={shop_arrow=1,gold=..80}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金块来购买这个物品!","color":"red"}]
-    tellraw @s[scores={shop_arrow=..0}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买上一级的物品!","color":"red"}]
-
-    tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"缓慢之箭 x2","color":"green"}]
-    execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"缓慢之箭 x2","color":"green"}]
-    scoreboard players add @s[tag=canbuy] shop_arrow 1
-    scoreboard players remove @s[tag=canbuy] gold 81
-
-    execute as @s[tag=!canbuy] at @s run function lib:sounds/error
-    execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
-
-    execute as @s[tag=canbuy] run function item:shop/refresh_gold
+# 触发器ID 9
+execute unless entity @s[scores={shop_arrow=0..}] run scoreboard players set @s shop_arrow 0
+tag @s remove canbuy
+tag @s[scores={shop_arrow=1,gold=81..}] add canbuy
+tellraw @s[scores={shop_arrow=2..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
+tellraw @s[scores={shop_arrow=1,gold=..80}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金块来购买这个物品!","color":"red"}]
+tellraw @s[scores={shop_arrow=..0}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买上一级的物品!","color":"red"}]
+tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"缓慢之箭 x2","color":"green"}]
+execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"缓慢之箭 x2","color":"green"}]
+scoreboard players add @s[tag=canbuy] shop_arrow 1
+scoreboard players remove @s[tag=canbuy] gold 81
+execute as @s[tag=!canbuy] at @s run function lib:sounds/error
+execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
+execute as @s[tag=canbuy] run function item:shop/refresh_gold

+ 14 - 18
data/item/functions/shop/buy_orange.mcfunction

@@ -1,19 +1,15 @@
 # 活跃橙 (3 gb)
-    # 触发器ID 10
-    execute unless entity @s[scores={shop_orange=0..}] run scoreboard players set @s shop_orange 0
-    tag @s remove canbuy
-    tag @s[scores={shop_orange=0,gold=243..}] add canbuy
-
-    tellraw @s[scores={shop_orange=1..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
-    tellraw @s[scores={shop_orange=0,gold=..242}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金块来购买这个物品!","color":"red"}]
-    tellraw @s[scores={shop_orange=..-1}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买上一级的物品!","color":"red"}]
-
-    tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"活跃橙","color":"green"}]
-    execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"活跃橙","color":"green"}]
-    scoreboard players add @s[tag=canbuy] shop_orange 1
-    scoreboard players remove @s[tag=canbuy] gold 243
-
-    execute as @s[tag=!canbuy] at @s run function lib:sounds/error
-    execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
-
-    execute as @s[tag=canbuy] run function item:shop/refresh_gold
+# 触发器ID 10
+execute unless entity @s[scores={shop_orange=0..}] run scoreboard players set @s shop_orange 0
+tag @s remove canbuy
+tag @s[scores={shop_orange=0,gold=243..}] add canbuy
+tellraw @s[scores={shop_orange=1..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
+tellraw @s[scores={shop_orange=0,gold=..242}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金块来购买这个物品!","color":"red"}]
+tellraw @s[scores={shop_orange=..-1}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买上一级的物品!","color":"red"}]
+tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"活跃橙","color":"green"}]
+execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"活跃橙","color":"green"}]
+scoreboard players add @s[tag=canbuy] shop_orange 1
+scoreboard players remove @s[tag=canbuy] gold 243
+execute as @s[tag=!canbuy] at @s run function lib:sounds/error
+execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
+execute as @s[tag=canbuy] run function item:shop/refresh_gold

+ 15 - 19
data/item/functions/shop/buy_weapon1.mcfunction

@@ -1,19 +1,15 @@
-# 钻石锹 (3 gb)
-    # 触发器ID 14
-    execute unless entity @s[scores={shop_weapon=0..}] run scoreboard players set @s shop_weapon 0
-    tag @s remove canbuy
-    tag @s[scores={shop_weapon=3,gold=243..}] add canbuy
-
-    tellraw @s[scores={shop_weapon=4..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
-    tellraw @s[scores={shop_weapon=3,gold=..242}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金块来购买这个物品!","color":"red"}]
-    tellraw @s[scores={shop_weapon=..2}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买上一级的物品!","color":"red"}]
-
-    tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"钻石锹","color":"green"}]
-    execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"钻石锹","color":"green"}]
-    scoreboard players add @s[tag=canbuy] shop_weapon 1
-    scoreboard players remove @s[tag=canbuy] gold 243
-
-    execute as @s[tag=!canbuy] at @s run function lib:sounds/error
-    execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
-
-    execute as @s[tag=canbuy] run function item:shop/refresh_gold
+# 木锹 (1 gi)
+# 触发器ID 11
+execute unless entity @s[scores={shop_weapon=0..}] run scoreboard players set @s shop_weapon 0
+tag @s remove canbuy
+tag @s[scores={shop_weapon=0,gold=9..}] add canbuy
+tellraw @s[scores={shop_weapon=1..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
+tellraw @s[scores={shop_weapon=0,gold=..8}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金锭来购买这个物品!","color":"red"}]
+tellraw @s[scores={shop_weapon=..-1}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买上一级的物品!","color":"red"}]
+tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"木锹","color":"green"}]
+execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"木锹","color":"green"}]
+scoreboard players add @s[tag=canbuy] shop_weapon 1
+scoreboard players remove @s[tag=canbuy] gold 9
+execute as @s[tag=!canbuy] at @s run function lib:sounds/error
+execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
+execute as @s[tag=canbuy] run function item:shop/refresh_gold

+ 3 - 7
data/item/functions/shop/buy_weapon2.mcfunction

@@ -1,19 +1,15 @@
 # 石锹 (4 gi)
-# 触发器ID 11
+# 触发器ID 12
 execute unless entity @s[scores={shop_weapon=0..}] run scoreboard players set @s shop_weapon 0
 tag @s remove canbuy
 tag @s[scores={shop_weapon=1,gold=36..}] add canbuy
-
 tellraw @s[scores={shop_weapon=2..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
 tellraw @s[scores={shop_weapon=1,gold=..35}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金锭来购买这个物品!","color":"red"}]
 tellraw @s[scores={shop_weapon=..0}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买上一级的物品!","color":"red"}]
-
-tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你升级到了 ",{"text":"石锹","color":"green"}]
-execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 升级到了 ",{"text":"石锹","color":"green"}]
+tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"石锹","color":"green"}]
+execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"石锹","color":"green"}]
 scoreboard players add @s[tag=canbuy] shop_weapon 1
 scoreboard players remove @s[tag=canbuy] gold 36
-
 execute as @s[tag=!canbuy] at @s run function lib:sounds/error
 execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
-
 execute as @s[tag=canbuy] run function item:shop/refresh_gold

+ 3 - 7
data/item/functions/shop/buy_weapon3.mcfunction

@@ -1,19 +1,15 @@
 # 铁锹 (1 gb)
-# 触发器ID 12
+# 触发器ID 13
 execute unless entity @s[scores={shop_weapon=0..}] run scoreboard players set @s shop_weapon 0
 tag @s remove canbuy
 tag @s[scores={shop_weapon=2,gold=81..}] add canbuy
-
 tellraw @s[scores={shop_weapon=3..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
 tellraw @s[scores={shop_weapon=2,gold=..80}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金块来购买这个物品!","color":"red"}]
 tellraw @s[scores={shop_weapon=..1}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买上一级的物品!","color":"red"}]
-
-tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你升级到了 ",{"text":"铁锹","color":"green"}]
-execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 升级到了 ",{"text":"铁锹","color":"green"}]
+tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"铁锹","color":"green"}]
+execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"铁锹","color":"green"}]
 scoreboard players add @s[tag=canbuy] shop_weapon 1
 scoreboard players remove @s[tag=canbuy] gold 81
-
 execute as @s[tag=!canbuy] at @s run function lib:sounds/error
 execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
-
 execute as @s[tag=canbuy] run function item:shop/refresh_gold

+ 15 - 0
data/item/functions/shop/buy_weapon4.mcfunction

@@ -0,0 +1,15 @@
+# 钻石锹 (3 gb)
+# 触发器ID 14
+execute unless entity @s[scores={shop_weapon=0..}] run scoreboard players set @s shop_weapon 0
+tag @s remove canbuy
+tag @s[scores={shop_weapon=3,gold=243..}] add canbuy
+tellraw @s[scores={shop_weapon=4..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
+tellraw @s[scores={shop_weapon=3,gold=..242}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金块来购买这个物品!","color":"red"}]
+tellraw @s[scores={shop_weapon=..2}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买上一级的物品!","color":"red"}]
+tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"钻石锹","color":"green"}]
+execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"钻石锹","color":"green"}]
+scoreboard players add @s[tag=canbuy] shop_weapon 1
+scoreboard players remove @s[tag=canbuy] gold 243
+execute as @s[tag=!canbuy] at @s run function lib:sounds/error
+execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
+execute as @s[tag=canbuy] run function item:shop/refresh_gold

+ 3 - 3
data/item/functions/shop/check.mcfunction

@@ -9,8 +9,8 @@ execute if score @s buy_trigger matches 8 run function item:shop/buy_arrow1
 execute if score @s buy_trigger matches 9 run function item:shop/buy_arrow1
 execute if score @s buy_trigger matches 10 run function item:shop/buy_orange
 execute if score @s buy_trigger matches 11 run function item:shop/buy_weapon1
-execute if score @s buy_trigger matches 12 run function item:shop/buy_weapon1
-execute if score @s buy_trigger matches 13 run function item:shop/buy_weapon1
-execute if score @s buy_trigger matches 14 run function item:shop/buy_weapon1
+execute if score @s buy_trigger matches 12 run function item:shop/buy_weapon2
+execute if score @s buy_trigger matches 13 run function item:shop/buy_weapon3
+execute if score @s buy_trigger matches 14 run function item:shop/buy_weapon4
 scoreboard players set @s buy_trigger 0
 scoreboard players enable @s buy_trigger