【我的世界】扭蛋機(jī)指令教程來(lái)了qwq

創(chuàng)建記分板
/scoreboard objectives add 扭蛋1 dummy
/scoreboard objectives add 扭蛋2 dummy
/scoreboard objectives add 扭蛋隨機(jī) dummy
后臺(tái)指令
第一個(gè)是循環(huán)保開其他全部連鎖無(wú)條件
execute @e[hasitem={location=slot.weapon.mainhand,item=heart_of_the_sea}] ~~~ title @s actionbar §l§a上下§e搖動(dòng)§b視角§d打開§6扭蛋
execute @e[hasitem={location=slot.weapon.mainhand,item=heart_of_the_sea}] ~~~ title @s title §r
execute @e[hasitem={location=slot.weapon.mainhand,item=heart_of_the_sea}] ~~~ tag @s add yd
execute @e[tag=yd,rx=60] ~~~ scoreboard players set @s 扭蛋1 1
execute @e[tag=yd,rxm=60] ~~~ scoreboard players set @s 扭蛋2 1
execute @e[tag=yd,scores={扭蛋1=1,扭蛋2=1}] ~~~ tag @s add hd
execute @e[tag=yd,scores={扭蛋1=1,扭蛋2=1}] ~~~ tag @s remove yd
execute @a[tag=hd] ~~~ title @s subtitle §l§a-扭蛋已開啟-
execute @a[tag=hd] ~~~scoreboard players set @s 扭蛋1 0
execute @a[tag=hd] ~~~scoreboard players set @s 扭蛋2 0
scoreboard players random @a[tag=hd] 扭蛋隨機(jī) 1 4
execute @a[tag=hd,scores={扭蛋隨機(jī)=1}] ~~~ structure load 獎(jiǎng)品1 ~ ~ ~
execute @a[tag=hd,scores={扭蛋隨機(jī)=2}] ~~~ structure load 獎(jiǎng)品2 ~ ~ ~
execute @a[tag=hd,scores={扭蛋隨機(jī)=3}] ~~~ structure load 獎(jiǎng)品3 ~ ~ ~
execute @a[tag=hd,scores={扭蛋隨機(jī)=4}] ~~~ structure load 獎(jiǎng)品4 ~ ~ ~
execute @a[tag=hd] ~~~ tag @s remove hd
execute @a[scores={扭蛋隨機(jī)=1..}] ~~~ clear @s heart_of_the_sea 0 1
execute @a[scores={扭蛋隨機(jī)=1..}] ~~~ scoreboard players set @s 扭蛋隨機(jī) 0
玩家操作指令
/scoreboard players test @p 金幣 * 100
脈沖紅石控制
title @p title §l§c--金幣不足--
連鎖無(wú)條件
scoreboard players test @p "金幣" 100 *
連鎖有條件
scoreboard players remove @p 金幣 100
連鎖有條件
title @p title §l§a--兌換成功--
連鎖有條件
/give @p heart_of_the_sea 1
連鎖有條件
求個(gè)3連qwq