Quellcode durchsuchen

尾迹购买初始化

LTCatt vor 6 Jahren
Ursprung
Commit
5974e7799a

+ 1 - 0
data/item/functions/shop/buy_particle0.mcfunction

@@ -1,5 +1,6 @@
 # 关闭粒子 (0 e)
 # 关闭粒子 (0 e)
 # 触发器ID 102
 # 触发器ID 102
+execute unless entity @s[scores={shop_particle_s=0..}] run scoreboard players set @s shop_particle_s 0
 
 
 tellraw @s[scores={shop_particle_s=0}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先在左侧购买尾迹特效才能切换尾迹种类!","color":"red"}]
 tellraw @s[scores={shop_particle_s=0}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先在左侧购买尾迹特效才能切换尾迹种类!","color":"red"}]
 execute as @s[scores={shop_particle_s=0}] at @s run function lib:sounds/error
 execute as @s[scores={shop_particle_s=0}] at @s run function lib:sounds/error

+ 2 - 1
data/item/functions/shop/buy_particle1.mcfunction

@@ -1,5 +1,6 @@
 # 绿光粒子 (0 e)
 # 绿光粒子 (0 e)
 # 触发器ID 103
 # 触发器ID 103
+execute unless entity @s[scores={shop_particle_s=0..}] run scoreboard players set @s shop_particle_s 0
 
 
 tellraw @s[scores={shop_particle_s=0}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先在左侧购买尾迹特效才能切换尾迹种类!","color":"red"}]
 tellraw @s[scores={shop_particle_s=0}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先在左侧购买尾迹特效才能切换尾迹种类!","color":"red"}]
 execute as @s[scores={shop_particle_s=0}] at @s run function lib:sounds/error
 execute as @s[scores={shop_particle_s=0}] at @s run function lib:sounds/error
@@ -7,4 +8,4 @@ execute as @s[scores={shop_particle_s=0}] at @s run function lib:sounds/error
 tellraw @s[scores={shop_particle_s=1..}] ["",{"text":">> ","color":"green","bold":true},"尾迹特效已切换为 ",{"text":"绿光","color":"green"}]
 tellraw @s[scores={shop_particle_s=1..}] ["",{"text":">> ","color":"green","bold":true},"尾迹特效已切换为 ",{"text":"绿光","color":"green"}]
 execute as @s[scores={shop_particle_s=1..}] at @s run function lib:sounds/hit
 execute as @s[scores={shop_particle_s=1..}] at @s run function lib:sounds/hit
 
 
-scoreboard players set @s particle_type 1
+scoreboard players set @s[scores={shop_particle_s=1..}] particle_type 1

+ 1 - 0
data/item/functions/shop/buy_particle2.mcfunction

@@ -1,5 +1,6 @@
 # 素雅粒子 (3 e)
 # 素雅粒子 (3 e)
 # 触发器ID 104
 # 触发器ID 104
+execute unless entity @s[scores={shop_particle_s=0..}] run scoreboard players set @s shop_particle_s 0
 execute unless entity @s[scores={shop_particle_2=0..}] run scoreboard players set @s shop_particle_2 0
 execute unless entity @s[scores={shop_particle_2=0..}] run scoreboard players set @s shop_particle_2 0
 tag @s remove canbuy
 tag @s remove canbuy
 tag @s[scores={shop_particle_s=1..,shop_particle_2=0,green=3..}] add canbuy
 tag @s[scores={shop_particle_s=1..,shop_particle_2=0,green=3..}] add canbuy

+ 1 - 0
data/item/functions/shop/buy_particle3.mcfunction

@@ -1,5 +1,6 @@
 # 水滴粒子 (3 e)
 # 水滴粒子 (3 e)
 # 触发器ID 105
 # 触发器ID 105
+execute unless entity @s[scores={shop_particle_s=0..}] run scoreboard players set @s shop_particle_s 0
 execute unless entity @s[scores={shop_particle_3=0..}] run scoreboard players set @s shop_particle_3 0
 execute unless entity @s[scores={shop_particle_3=0..}] run scoreboard players set @s shop_particle_3 0
 tag @s remove canbuy
 tag @s remove canbuy
 tag @s[scores={shop_particle_s=1..,shop_particle_3=0,green=3..}] add canbuy
 tag @s[scores={shop_particle_s=1..,shop_particle_3=0,green=3..}] add canbuy

+ 1 - 0
data/item/functions/shop/buy_particle4.mcfunction

@@ -1,5 +1,6 @@
 # 烈焰粒子 (6 e)
 # 烈焰粒子 (6 e)
 # 触发器ID 106
 # 触发器ID 106
+execute unless entity @s[scores={shop_particle_s=0..}] run scoreboard players set @s shop_particle_s 0
 execute unless entity @s[scores={shop_particle_4=0..}] run scoreboard players set @s shop_particle_4 0
 execute unless entity @s[scores={shop_particle_4=0..}] run scoreboard players set @s shop_particle_4 0
 tag @s remove canbuy
 tag @s remove canbuy
 tag @s[scores={shop_particle_s=1..,shop_particle_4=0,green=6..}] add canbuy
 tag @s[scores={shop_particle_s=1..,shop_particle_4=0,green=6..}] add canbuy

+ 1 - 0
data/item/functions/shop/buy_particle5.mcfunction

@@ -1,5 +1,6 @@
 # 炫彩粒子 (6 e)
 # 炫彩粒子 (6 e)
 # 触发器ID 107
 # 触发器ID 107
+execute unless entity @s[scores={shop_particle_s=0..}] run scoreboard players set @s shop_particle_s 0
 execute unless entity @s[scores={shop_particle_5=0..}] run scoreboard players set @s shop_particle_5 0
 execute unless entity @s[scores={shop_particle_5=0..}] run scoreboard players set @s shop_particle_5 0
 tag @s remove canbuy
 tag @s remove canbuy
 tag @s[scores={shop_particle_s=1..,shop_particle_5=0,green=6..}] add canbuy
 tag @s[scores={shop_particle_s=1..,shop_particle_5=0,green=6..}] add canbuy

+ 1 - 0
data/item/functions/shop/buy_particle6.mcfunction

@@ -1,5 +1,6 @@
 # 魂焰粒子 (1 eb)
 # 魂焰粒子 (1 eb)
 # 触发器ID 108
 # 触发器ID 108
+execute unless entity @s[scores={shop_particle_s=0..}] run scoreboard players set @s shop_particle_s 0
 execute unless entity @s[scores={shop_particle_6=0..}] run scoreboard players set @s shop_particle_6 0
 execute unless entity @s[scores={shop_particle_6=0..}] run scoreboard players set @s shop_particle_6 0
 tag @s remove canbuy
 tag @s remove canbuy
 tag @s[scores={shop_particle_s=1..,shop_particle_6=0,green=9..}] add canbuy
 tag @s[scores={shop_particle_s=1..,shop_particle_6=0,green=9..}] add canbuy

+ 1 - 1
data/test/functions/reset/emerald.mcfunction

@@ -9,4 +9,4 @@ scoreboard objectives remove shop_particle_5
 scoreboard objectives remove shop_particle_6
 scoreboard objectives remove shop_particle_6
 scoreboard objectives remove particle_type
 scoreboard objectives remove particle_type
 function ltw:init
 function ltw:init
-tellraw @a ["",{"text": ">> ","color": "red","bold":true},{"text":" 已重置绿宝石记分板记录!","color":"red"}]
+tellraw @a ["",{"text": ">> ","color": "red","bold":true},{"text":"已重置绿宝石记分板记录!","color":"red"}]