Browse Source

商店脚本测试

00ll00 6 years ago
parent
commit
05c01f3e16

BIN
data/item/functions/shop/__pycache__/sendcmd.cpython-37.pyc


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

@@ -1,18 +1,19 @@
-# 金苹果 (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
+# 生命果 (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":"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
+    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] 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
+    execute as @s[tag=canbuy] run function item:shop/refresh_gold

+ 19 - 0
data/item/functions/shop/buy_apple1_.mcfunction

@@ -0,0 +1,19 @@
+# 金苹果 (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[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
+,"clickEvent":{"action":"run_command","value":"/trigger buy_trigger set 5"}

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

@@ -1,18 +1,19 @@
-# 附魔金苹果 (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
+# 附魔生命果 (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=..0,gold=81..}] add canbuy
 
-tellraw @s[scores={shop_apple=1..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
-tellraw @s[scores={shop_apple=..0,gold=..80}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金块来购买这个物品!","color":"red"}]
+    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
+    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] 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
+    execute as @s[tag=canbuy] run function item:shop/refresh_gold

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

@@ -1,18 +1,19 @@
-# 皮革头 (4 gi)
+# 金靴子 (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
 
-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=36..}] 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[scores={shop_armor=1..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
-tellraw @s[scores={shop_armor=..0,gold=..35}] ["",{"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
 
-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] 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
+    execute as @s[tag=canbuy] run function item:shop/refresh_gold

+ 15 - 15
data/item/functions/shop/buy_armor2.mcfunction

@@ -1,19 +1,19 @@
-# 皮革裤 (7 gi)
+# 金头盔 (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=..0,gold=36..}] add canbuy
 
-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=63..}] 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[scores={shop_armor=2..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
-tellraw @s[scores={shop_armor=1,gold=..62}] ["",{"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
 
-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 63
+    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] 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
+    execute as @s[tag=canbuy] run function item:shop/refresh_gold

+ 15 - 15
data/item/functions/shop/buy_armor3.mcfunction

@@ -1,19 +1,19 @@
-# 皮革衣 (2 gb)
+# 金护腿 (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=..0,gold=81..}] add canbuy
 
-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=162..}] 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[scores={shop_armor=3..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
-tellraw @s[scores={shop_armor=2,gold=..161}] ["",{"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
 
-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 162
+    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] 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
+    execute as @s[tag=canbuy] run function item:shop/refresh_gold

+ 19 - 0
data/item/functions/shop/buy_armor4.mcfunction

@@ -0,0 +1,19 @@
+# 金胸甲 (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=..0,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

+ 4 - 4
data/item/functions/shop/buy_arrow1.mcfunction

@@ -1,5 +1,5 @@
-# 箭 x2 (1 gi)
-
+# 箭 x1 (1 gi)
+# 触发器ID 7
 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=..0,gold=9..}] add canbuy
@@ -7,8 +7,8 @@ tag @s[scores={shop_arrow=..0,gold=9..}] add canbuy
 tellraw @s[scores={shop_arrow=1..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
 tellraw @s[scores={shop_arrow=..0,gold=..8}] ["",{"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"}]
+tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"箭 x1","color":"green"}]
+execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"箭 x1","color":"green"}]
 scoreboard players add @s[tag=canbuy] shop_arrow 1
 scoreboard players remove @s[tag=canbuy] gold 9
 

+ 5 - 5
data/item/functions/shop/buy_arrow2.mcfunction

@@ -1,17 +1,17 @@
-# 缓慢之箭 x3 (5 gi)
-
+# 箭 x2 (4 gi)
+# 触发器ID 8
 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=45..}] add canbuy
+tag @s[scores={shop_arrow=1,gold=36..}] add canbuy
 
 tellraw @s[scores={shop_arrow=2..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
-tellraw @s[scores={shop_arrow=1,gold=..44}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金锭来购买这个物品!","color":"red"}]
+tellraw @s[scores={shop_arrow=1,gold=..35}] ["",{"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":"缓慢之箭 x3","color":"green"}]
 execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 升级到了 ",{"text":"缓慢之箭 x3","color":"green"}]
 scoreboard players add @s[tag=canbuy] shop_arrow 1
-scoreboard players remove @s[tag=canbuy] gold 45
+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

+ 19 - 0
data/item/functions/shop/buy_arrow3.mcfunction

@@ -0,0 +1,19 @@
+# 缓慢之箭 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=3..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
+tellraw @s[scores={shop_arrow=2,gold=..80}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金锭来购买这个物品!","color":"red"}]
+tellraw @s[scores={shop_arrow=..1}] ["",{"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

+ 1 - 1
data/item/functions/shop/buy_orange.mcfunction

@@ -1,5 +1,5 @@
 # 活跃橙 (3 gb)
-
+# 触发器ID 8
 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

+ 1 - 1
data/item/functions/shop/buy_potion1.mcfunction

@@ -1,5 +1,5 @@
 # 速度药 (1 gb)
-
+# 触发器ID 9
 execute unless entity @s[scores={shop_potion=0..}] run scoreboard players set @s shop_potion 0
 tag @s remove canbuy
 tag @s[scores={shop_potion=..0,gold=81..}] add canbuy

+ 1 - 1
data/item/functions/shop/buy_weapon1.mcfunction

@@ -1,5 +1,5 @@
 # 木铲 (2 gi)
-
+# 触发器ID 10
 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=18..}] add canbuy

+ 1 - 1
data/item/functions/shop/buy_weapon2.mcfunction

@@ -1,5 +1,5 @@
 # 石锹 (4 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=1,gold=36..}] add canbuy

+ 1 - 1
data/item/functions/shop/buy_weapon3.mcfunction

@@ -1,5 +1,5 @@
 # 铁锹 (1 gb)
-
+# 触发器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=2,gold=81..}] add canbuy

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

@@ -1,8 +1,8 @@
-#as player
 execute if score @s buy_trigger matches 1 run function item:shop/buy_apple1
 execute if score @s buy_trigger matches 2 run function item:shop/buy_apple2
 execute if score @s buy_trigger matches 3 run function item:shop/buy_armor1
 execute if score @s buy_trigger matches 4 run function item:shop/buy_armor2
-
+execute if score @s buy_trigger matches 5 run function item:shop/buy_armor3
+execute if score @s buy_trigger matches 6 run function item:shop/buy_armor4
 scoreboard players set @s buy_trigger 0
-scoreboard players enable @s buy_trigger
+scoreboard players enable @s buy_trigger