我的世界原版箱子商店

原版箱子商店

 

by MCSugar_cane

 

效果图

 

 

原理

 

本系统唯一难点大概就在区分箱子商店创建者,使创建者右键出现撤销的说明,购买者右键出现商店出售信息。其次就是区分是否为补给物品。

 

  对于区分箱子商店创建者,我利用了流动ID分配,在创建时为每个商店分配不同ID,并且时这个ID值=创建者ID值。这样一来,只需要用玩家ID值-商店ID值的结果来区分其是否为该商店创建者。而补给物品依靠展示的item上具有的分数+丢弃物品的检测分数是否=0来判定,具体见代码。

 

 

 

OOC

 

创建与设置部分

 

  1. /summon falling_block ~ ~1.5 ~ {Time:1,Block:minecraft:redstone_block,Motion:[0d,-1d,0d],Passengers:[{id:falling_block,Time:1,Block:minecraft:activator_rail,Passengers:[{id:commandblock_minecart,Command:blockdata ~ ~-2 ~ {auto:0b,Command:""}},{id:commandblock_minecart,Command:"setblock ~2 ~67 ~0 chain_command_block 1 replace {Command:\"clear @a[tag=createdShop] spawn_egg 0 64 {display:{Name:\\\"创建商店\\\"}}\",auto:1b}"},{id:commandblock_minecart,Command:"setblock ~2 ~66 ~0 chain_command_block 1 replace {Command:\"execute @e[name=cShop,score_shopSetting=-1] ~ ~ ~ blockdata ~ ~ ~1 {Text1:\\\"{\\\\\\\"text\\\\\\\":\\\\\\\"ShopID:\\\\\\\",\\\\\\\"bold\\\\\\\":\\\\\\\"true\\\\\\\",\\\\\\\"color\\\\\\\":\\\\\\\"dark_red\\\\\\\",\\\\\\\"extra\\\\\\\":[\\\\\\\"\\\\\\\"],\\\\\\\"clickEvent\\\\\\\":{\\\\\\\"action\\\\\\\":\\\\\\\"run_command\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"\\\\\\\"}}\\\",Text2:\\\"{\\\\\\\"score\\\\\\\":{\\\\\\\"name\\\\\\\":\\\\\\\"@p\\\\\\\",\\\\\\\"objective\\\\\\\":\\\\\\\"getshopid\\\\\\\"},\\\\\\\"color\\\\\\\":\\\\\\\"red\\\\\\\",\\\\\\\"bold\\\\\\\":\\\\\\\"true\\\\\\\",\\\\\\\"extra\\\\\\\":[\\\\\\\"\\\\\\\"],\\\\\\\"clickEvent\\\\\\\":{\\\\\\\"action\\\\\\\":\\\\\\\"run_command\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"\\\\\\\"}}\\\",Text3:\\\"{\\\\\\\"score\\\\\\\":{\\\\\\\"name\\\\\\\":\\\\\\\"@p\\\\\\\",\\\\\\\"objective\\\\\\\":\\\\\\\"getsalep\\\\\\\"},\\\\\\\"color\\\\\\\":\\\\\\\"black\\\\\\\",\\\\\\\"bold\\\\\\\":\\\\\\\"true\\\\\\\",\\\\\\\"extra\\\\\\\":[\\\\\\\"¥/每份\\\\\\\"],\\\\\\\"clickEvent\\\\\\\":{\\\\\\\"action\\\\\\\":\\\\\\\"run_command\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"say More on Ganxiaozhe.com\\\\\\\"}}\\\",Text4:\\\"{\\\\\\\"score\\\\\\\":{\\\\\\\"name\\\\\\\":\\\\\\\"@p\\\\\\\",\\\\\\\"objective\\\\\\\":\\\\\\\"items\\\\\\\"},\\\\\\\"color\\\\\\\":\\\\\\\"black\\\\\\\",\\\\\\\"bold\\\\\\\":\\\\\\\"true\\\\\\\",\\\\\\\"extra\\\\\\\":[\\\\\\\"份/剩余\\\\\\\"],\\\\\\\"clickEvent\\\\\\\":{\\\\\\\"action\\\\\\\":\\\\\\\"run_command\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"\\\\\\\"}}\\\"}\",auto:1b}"},{id:commandblock_minecart,Command:"setblock ~2 ~65 ~0 chain_command_block 1 replace {Command:\"execute @e[name=cShop,score_shopSetting=-1] ~ ~ ~ blockdata ~ ~ ~-1 {Text1:\\\"{\\\\\\\"text\\\\\\\":\\\\\\\"ShopID:\\\\\\\",\\\\\\\"bold\\\\\\\":\\\\\\\"true\\\\\\\",\\\\\\\"color\\\\\\\":\\\\\\\"dark_red\\\\\\\",\\\\\\\"extra\\\\\\\":[\\\\\\\"\\\\\\\"],\\\\\\\"clickEvent\\\\\\\":{\\\\\\\"action\\\\\\\":\\\\\\\"run_command\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"\\\\\\\"}}\\\",Text2:\\\"{\\\\\\\"score\\\\\\\":{\\\\\\\"name\\\\\\\":\\\\\\\"@p\\\\\\\",\\\\\\\"objective\\\\\\\":\\\\\\\"getshopid\\\\\\\"},\\\\\\\"color\\\\\\\":\\\\\\\"red\\\\\\\",\\\\\\\"bold\\\\\\\":\\\\\\\"true\\\\\\\",\\\\\\\"extra\\\\\\\":[\\\\\\\"\\\\\\\"],\\\\\\\"clickEvent\\\\\\\":{\\\\\\\"action\\\\\\\":\\\\\\\"run_command\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"\\\\\\\"}}\\\",Text3:\\\"{\\\\\\\"score\\\\\\\":{\\\\\\\"name\\\\\\\":\\\\\\\"@p\\\\\\\",\\\\\\\"objective\\\\\\\":\\\\\\\"getsalep\\\\\\\"},\\\\\\\"color\\\\\\\":\\\\\\\"black\\\\\\\",\\\\\\\"bold\\\\\\\":\\\\\\\"true\\\\\\\",\\\\\\\"extra\\\\\\\":[\\\\\\\"¥/每份\\\\\\\"],\\\\\\\"clickEvent\\\\\\\":{\\\\\\\"action\\\\\\\":\\\\\\\"run_command\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"say More on Ganxiaozhe.com\\\\\\\"}}\\\",Text4:\\\"{\\\\\\\"score\\\\\\\":{\\\\\\\"name\\\\\\\":\\\\\\\"@p\\\\\\\",\\\\\\\"objective\\\\\\\":\\\\\\\"items\\\\\\\"},\\\\\\\"color\\\\\\\":\\\\\\\"black\\\\\\\",\\\\\\\"bold\\\\\\\":\\\\\\\"true\\\\\\\",\\\\\\\"extra\\\\\\\":[\\\\\\\"份/剩余\\\\\\\"],\\\\\\\"clickEvent\\\\\\\":{\\\\\\\"action\\\\\\\":\\\\\\\"run_command\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"\\\\\\\"}}\\\"}\",auto:1b}"},{id:commandblock_minecart,Command:"setblock ~2 ~64 ~0 chain_command_block 1 replace {Command:\"execute @e[name=cShop,score_shopSetting=-1] ~ ~ ~ blockdata ~1 ~ ~ {Text1:\\\"{\\\\\\\"text\\\\\\\":\\\\\\\"ShopID:\\\\\\\",\\\\\\\"bold\\\\\\\":\\\\\\\"true\\\\\\\",\\\\\\\"color\\\\\\\":\\\\\\\"dark_red\\\\\\\",\\\\\\\"extra\\\\\\\":[\\\\\\\"\\\\\\\"],\\\\\\\"clickEvent\\\\\\\":{\\\\\\\"action\\\\\\\":\\\\\\\"run_command\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"\\\\\\\"}}\\\",Text2:\\\"{\\\\\\\"score\\\\\\\":{\\\\\\\"name\\\\\\\":\\\\\\\"@p\\\\\\\",\\\\\\\"objective\\\\\\\":\\\\\\\"getshopid\\\\\\\"},\\\\\\\"color\\\\\\\":\\\\\\\"red\\\\\\\",\\\\\\\"bold\\\\\\\":\\\\\\\"true\\\\\\\",\\\\\\\"extra\\\\\\\":[\\\\\\\"\\\\\\\"],\\\\\\\"clickEvent\\\\\\\":{\\\\\\\"action\\\\\\\":\\\\\\\"run_command\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"\\\\\\\"}}\\\",Text3:\\\"{\\\\\\\"score\\\\\\\":{\\\\\\\"name\\\\\\\":\\\\\\\"@p\\\\\\\",\\\\\\\"objective\\\\\\\":\\\\\\\"getsalep\\\\\\\"},\\\\\\\"color\\\\\\\":\\\\\\\"black\\\\\\\",\\\\\\\"bold\\\\\\\":\\\\\\\"true\\\\\\\",\\\\\\\"extra\\\\\\\":[\\\\\\\"¥/每份\\\\\\\"],\\\\\\\"clickEvent\\\\\\\":{\\\\\\\"action\\\\\\\":\\\\\\\"run_command\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"say More on Ganxiaozhe.com\\\\\\\"}}\\\",Text4:\\\"{\\\\\\\"score\\\\\\\":{\\\\\\\"name\\\\\\\":\\\\\\\"@p\\\\\\\",\\\\\\\"objective\\\\\\\":\\\\\\\"items\\\\\\\"},\\\\\\\"color\\\\\\\":\\\\\\\"black\\\\\\\",\\\\\\\"bold\\\\\\\":\\\\\\\"true\\\\\\\",\\\\\\\"extra\\\\\\\":[\\\\\\\"份/剩余\\\\\\\"],\\\\\\\"clickEvent\\\\\\\":{\\\\\\\"action\\\\\\\":\\\\\\\"run_command\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"\\\\\\\"}}\\\"}\",auto:1b}"},{id:commandblock_minecart,Command:"setblock ~2 ~63 ~0 chain_command_block 1 replace {Command:\"execute @e[name=cShop,score_shopSetting=-1] ~ ~ ~ blockdata ~-1 ~ ~ {Text1:\\\"{\\\\\\\"text\\\\\\\":\\\\\\\"ShopID:\\\\\\\",\\\\\\\"bold\\\\\\\":\\\\\\\"true\\\\\\\",\\\\\\\"color\\\\\\\":\\\\\\\"dark_red\\\\\\\",\\\\\\\"extra\\\\\\\":[\\\\\\\"\\\\\\\"],\\\\\\\"clickEvent\\\\\\\":{\\\\\\\"action\\\\\\\":\\\\\\\"run_command\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"\\\\\\\"}}\\\",Text2:\\\"{\\\\\\\"score\\\\\\\":{\\\\\\\"name\\\\\\\":\\\\\\\"@p\\\\\\\",\\\\\\\"objective\\\\\\\":\\\\\\\"getshopid\\\\\\\"},\\\\\\\"color\\\\\\\":\\\\\\\"red\\\\\\\",\\\\\\\"bold\\\\\\\":\\\\\\\"true\\\\\\\",\\\\\\\"extra\\\\\\\":[\\\\\\\"\\\\\\\"],\\\\\\\"clickEvent\\\\\\\":{\\\\\\\"action\\\\\\\":\\\\\\\"run_command\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"\\\\\\\"}}\\\",Text3:\\\"{\\\\\\\"score\\\\\\\":{\\\\\\\"name\\\\\\\":\\\\\\\"@p\\\\\\\",\\\\\\\"objective\\\\\\\":\\\\\\\"getsalep\\\\\\\"},\\\\\\\"color\\\\\\\":\\\\\\\"black\\\\\\\",\\\\\\\"bold\\\\\\\":\\\\\\\"true\\\\\\\",\\\\\\\"extra\\\\\\\":[\\\\\\\"¥/每份\\\\\\\"],\\\\\\\"clickEvent\\\\\\\":{\\\\\\\"action\\\\\\\":\\\\\\\"run_command\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"say More on Ganxiaozhe.com\\\\\\\"}}\\\",Text4:\\\"{\\\\\\\"score\\\\\\\":{\\\\\\\"name\\\\\\\":\\\\\\\"@p\\\\\\\",\\\\\\\"objective\\\\\\\":\\\\\\\"items\\\\\\\"},\\\\\\\"color\\\\\\\":\\\\\\\"black\\\\\\\",\\\\\\\"bold\\\\\\\":\\\\\\\"true\\\\\\\",\\\\\\\"extra\\\\\\\":[\\\\\\\"份/剩余\\\\\\\"],\\\\\\\"clickEvent\\\\\\\":{\\\\\\\"action\\\\\\\":\\\\\\\"run_command\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"\\\\\\\"}}\\\"}\",auto:1b}"},{id:commandblock_minecart,Command:setblock ~2 ~62 ~0 chain_command_block 1 replace {Command:"/execute @e[name=cShop,score_shopSetting=-1] ~ ~ ~ scoreboard players operation @p items = @e[name=cShop,c=1] items",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~61 ~0 chain_command_block 1 replace {Command:"/execute @e[name=cShop,score_shopSetting=-1] ~ ~ ~ scoreboard players operation @p getshopid = @e[name=cShop,c=1] shopID",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~60 ~0 chain_command_block 1 replace {Command:"/execute @e[name=cShop,score_shopSetting=-1] ~ ~ ~ scoreboard players operation @p getsalep = @e[name=cShop,c=1] isale",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~59 ~0 chain_command_block 1 replace {Command:"/execute @e[name=cShop,score_shopID_min=0,score_shopID=0] ~ ~ ~ scoreboard players operation @e[r=0,c=1] shopID = @e[type=armor_stand,name=shopIDStats] shopID",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~58 ~0 chain_command_block 1 replace {Command:"/execute @e[name=cShop,score_shopID_min=0,score_shopID=0] ~ ~ ~ scoreboard players add @e[type=armor_stand,name=shopIDStats] shopID 1",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~57 ~0 chain_command_block 1 replace {Command:"/scoreboard players add @e[name=cShop,score_shopSetting_min=1,score_shopSetting=1] shopID 0",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~56 ~0 chain_command_block 1 replace {Command:"/scoreboard players set @e[name=cShop,score_shopSetting_min=4,score_shopSetting=4] shopSetting -1",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~55 ~0 chain_command_block 1 replace {Command:"/scoreboard players add @e[name=cShop,score_shopSetting_min=4,score_shopSetting=4] items 1",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~54 ~0 chain_command_block 1 replace {Command:"/execute @e[name=cShop,score_shopSetting_min=4,score_shopSetting=4] ~ ~ ~ teleport @e[score_createitem=-1,c=1] ~ ~0.5 ~",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~53 ~0 chain_command_block 1 replace {Command:"/scoreboard players tag @a[tag=createdShop] remove setsale",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~52 ~0 chain_command_block 1 replace {Command:"/scoreboard players tag @a[tag=setsale] add createdShop",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~51 ~0 chain_command_block 1 replace {Command:"/scoreboard players tag @a[tag=setsale] remove wcreate",auto:1b}},{id:commandblock_minecart,Command:"setblock ~2 ~50 ~0 chain_command_block 1 replace {Command:\"/execute @a[tag=setsale] ~ ~ ~ /tellraw @p[tag=wcreate] [{\\\"text\\\":\\\"[甘小蔗] \\\",\\\"color\\\":\\\"dark_green\\\",\\\"bold\\\":\\\"true\\\"},{\\\"selector\\\":\\\"@p[tag=setsale]\\\",\\\"color\\\":\\\"gold\\\",\\\"bold\\\":\\\"true\\\"},{\\\"text\\\":\\\" 您的商店已经设置完毕\\\",\\\"color\\\":\\\"green\\\",\\\"bold\\\":true}]\",auto:1b}"},{id:commandblock_minecart,Command:setblock ~2 ~49 ~0 chain_command_block 1 replace {Command:"/execute @e[name=cShop,score_shopSetting_min=4,score_shopSetting=4] ~ ~ ~ scoreboard players operation @p[tag=setsale] shopID = @e[name=cShop,c=1,score_shopID_min=0] shopID",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~48 ~0 chain_command_block 1 replace {Command:"/execute @a[tag=setsale] ~ ~ ~ scoreboard players operation @e[name=cShop,score_shopSetting_min=4,score_shopSetting=4,c=1] isale = @p[tag=setsale] isale",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~47 ~0 chain_command_block 1 replace {Command:"/execute @a[tag=setsale] ~ ~ ~ scoreboard players set @e[name=cShop,score_shopSetting_min=3,score_shopSetting=3,c=1] shopSetting 4",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~46 ~0 chain_command_block 1 replace {Command:"/scoreboard players tag @a[tag=wcreate,score_isale_min=0,score_isale=100000] add setsale",auto:1b}},{id:commandblock_minecart,Command:"setblock ~2 ~45 ~0 chain_command_block 1 replace {Command:\"/execute @e[name=cShop,score_shopSetting_min=3,score_shopSetting=3] ~ ~ ~ title @p[tag=wcreate] actionbar [{\\\"text\\\":\\\"[甘小蔗] \\\",\\\"color\\\":\\\"dark_green\\\",\\\"bold\\\":\\\"true\\\"},{\\\"selector\\\":\\\"@p[tag=wcreate]\\\",\\\"color\\\":\\\"gold\\\",\\\"bold\\\":\\\"true\\\"},{\\\"text\\\":\\\" 请输入\\\",\\\"color\\\":\\\"green\\\",\\\"bold\\\":true},{\\\"text\\\":\\\" /trigger isale set 价钱 \\\",\\\"color\\\":\\\"red\\\",\\\"bold\\\":true},{\\\"text\\\":\\\"以设置你的物品单价(价位0-100000)\\\",\\\"color\\\":\\\"green\\\",\\\"bold\\\":true}]\",auto:1b}"},{id:commandblock_minecart,Command:setblock ~2 ~44 ~0 chain_command_block 1 replace {Command:"/execute @e[name=cShop,score_shopSetting_min=3,score_shopSetting=3] ~ ~ ~ scoreboard players enable @p[tag=wcreate] isale",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~43 ~0 chain_command_block 1 replace {Command:"/execute @e[type=Item,score_createitem=-1] ~ ~ ~ scoreboard players set @e[name=cShop,score_shopSetting_min=2,score_shopSetting=2,r=1] shopSetting 3",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~42 ~0 chain_command_block 1 replace {Command:"/execute @e[name=cShop,score_shopSetting_min=2,score_shopSetting=2] ~ ~ ~ scoreboard players set @p[tag=wcreate] isale -1",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~41 ~0 chain_command_block 1 replace {Command:"/entitydata @e[type=Item,score_createitem=-1] {PickupDelay:10000,Age:-23333,NoGravity:1,Item:{tag:{Ganxiaozhe:1}}}",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~40 ~0 chain_command_block 1 replace {Command:"/execute @e[type=cShop,score_shopSetting_min=2,score_shopSetting=2] ~ ~ ~ teleport @e[type=Item,score_createitem=-1,c=1] ~ ~0.5 ~",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~39 ~0 chain_command_block 1 replace {Command:"/scoreboard players tag @e[type=Item,score_createitem=-1,tag=!ishow] add ishow",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~38 ~0 chain_command_block 1 replace {Command:"/execute @e[type=Item,score_createitem_min=-2,score_createitem=-2] ~ ~ ~ scoreboard players tag @e[name=cShop,c=1] add s_reeds",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~37 ~0 chain_command_block 1 replace {Command:"/execute @e[type=Item,score_createitem_min=-1,score_createitem=-1] ~ ~ ~ scoreboard players tag @e[name=cShop,c=1] add s_iron_ingot",auto:1b}},{id:commandblock_minecart,Command:"setblock ~2 ~36 ~0 chain_command_block 1 replace {Command:\"/execute @e[name=cShop,score_shopSetting_min=2,score_shopSetting=2] ~ ~ ~ scoreboard players set @e[type=Item,r=1] createitem -2 {Item:{id:\\\"minecraft:reeds\\\",Count:1b,Damage:0s}}\",auto:1b}"},{id:commandblock_minecart,Command:"setblock ~2 ~35 ~0 chain_command_block 1 replace {Command:\"/execute @e[name=cShop,score_shopSetting_min=2,score_shopSetting=2] ~ ~ ~ scoreboard players set @e[type=Item,r=1] createitem -1 {Item:{id:\\\"minecraft:iron_ingot\\\",Count:1b,Damage:0s}}\",auto:1b}"},{id:commandblock_minecart,Command:setblock ~2 ~34 ~0 chain_command_block 1 replace {Command:"/scoreboard players set @e[name=cShop,score_shopSetting_min=1,score_shopSetting=1] shopSetting 2",auto:1b}},{id:commandblock_minecart,Command:"setblock ~2 ~33 ~0 chain_command_block 1 replace {Command:\"/execute @e[name=cShop,score_shopSetting_min=1,score_shopSetting=1] ~ ~ ~ tellraw @p[tag=wcreate] [{\\\"text\\\":\\\"[甘小蔗] \\\",\\\"color\\\":\\\"dark_green\\\",\\\"bold\\\":\\\"true\\\"},{\\\"selector\\\":\\\"@p[tag=wcreate]\\\",\\\"color\\\":\\\"gold\\\",\\\"bold\\\":\\\"true\\\"},{\\\"text\\\":\\\" 请丢弃(一个)你要出售的物品以进行设置(在过程中请勿移动)\\\",\\\"color\\\":\\\"green\\\",\\\"bold\\\":true}]\",auto:1b}"},{id:commandblock_minecart,Command:setblock ~2 ~32 ~0 chain_command_block 1 replace {Command:"/execute @e[name=cShop,score_shopSetting_min=1,score_shopSetting=1] ~ ~ ~ tp @p[tag=wcreate] @e[name=cShop,c=1]",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~31 ~0 chain_command_block 1 replace {Command:"/scoreboard players reset @a[score_whocreate_min=1] whocreate",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~30 ~0 chain_command_block 1 replace {Command:"/scoreboard players tag @a[score_whocreate_min=1] add wcreate",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~29 ~0 chain_command_block 1 replace {Command:"/kill @e[type=bat,name=CreateShop]",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~28 ~0 chain_command_block 1 replace {Command:"/execute @a[score_whocreate_min=1] ~ ~ ~ scoreboard players set @e[name=cShop,c=1] shopSetting 1",auto:1b}},{id:commandblock_minecart,Command:"setblock ~2 ~27 ~0 chain_command_block 1 replace {Command:\"/execute @a[score_whocreate_min=1] ~ ~ ~ execute @e[name=CreateShop,c=1] ~ ~ ~ /summon Villager ~ ~ ~ {CustomName:\\\"cShop\\\",NoAI:1b,Silent:1b,Offers:{Recipes:[]},ActiveEffects:[{Id:14,Duration:9999999,Amplifier:50,Ambient:1}]}\",auto:1b}"},{id:commandblock_minecart,Command:setblock ~2 ~26 ~0 chain_command_block 1 replace {Command:"/execute @a[score_whocreate_min=1,score_createfacing_min=4,score_createfacing=4] ~ ~ ~ execute @e[name=CreateShop,c=1] ~ ~ ~ setblock ~ ~ ~-1 wall_sign 1",auto:1b}},{id:commandblock_minecart,Command:"setblock ~2 ~25 ~0 chain_command_block 1 replace {Command:\"/execute @a[score_whocreate_min=1,score_createfacing_min=4,score_createfacing=4] ~ ~ ~ execute @e[name=CreateShop,c=1] ~ ~ ~ setblock ~ ~ ~ chest 1 masked {Lock:\\\"Locked by ganxiaozhe\\\"}\",auto:1b}"},{id:commandblock_minecart,Command:setblock ~2 ~24 ~0 chain_command_block 1 replace {Command:"/execute @a[score_whocreate_min=1,score_createfacing_min=3,score_createfacing=3] ~ ~ ~ execute @e[name=CreateShop,c=1] ~ ~ ~ setblock ~1 ~ ~ wall_sign 5",auto:1b}},{id:commandblock_minecart,Command:"setblock ~2 ~23 ~0 chain_command_block 1 replace {Command:\"/execute @a[score_whocreate_min=1,score_createfacing_min=3,score_createfacing=3] ~ ~ ~ execute @e[name=CreateShop,c=1] ~ ~ ~ setblock ~ ~ ~ chest 5 masked {Lock:\\\"Locked by ganxiaozhe\\\"}\",auto:1b}"},{id:commandblock_minecart,Command:setblock ~2 ~22 ~0 chain_command_block 1 replace {Command:"/execute @a[score_whocreate_min=1,score_createfacing_min=2,score_createfacing=2] ~ ~ ~ execute @e[name=CreateShop,c=1] ~ ~ ~ setblock ~ ~ ~1 wall_sign 3",auto:1b}},{id:commandblock_minecart,Command:"setblock ~2 ~21 ~0 chain_command_block 1 replace {Command:\"/execute @a[score_whocreate_min=1,score_createfacing_min=2,score_createfacing=2] ~ ~ ~ execute @e[name=CreateShop,c=1] ~ ~ ~ setblock ~ ~ ~ chest 3 masked {Lock:\\\"Locked by ganxiaozhe\\\"}\",auto:1b}"},{id:commandblock_minecart,Command:setblock ~2 ~20 ~0 chain_command_block 1 replace {Command:"/execute @a[score_whocreate_min=1,score_createfacing_min=1,score_createfacing=1] ~ ~ ~ execute @e[name=CreateShop,c=1] ~ ~ ~ setblock ~-1 ~ ~ wall_sign 4",auto:1b}},{id:commandblock_minecart,Command:"setblock ~2 ~19 ~0 chain_command_block 1 replace {Command:\"/execute @a[score_whocreate_min=1,score_createfacing_min=1,score_createfacing=1] ~ ~ ~ execute @e[name=CreateShop,c=1] ~ ~ ~ setblock ~ ~ ~ chest 4 masked {Lock:\\\"Locked by ganxiaozhe\\\"}\",auto:1b}"},{id:commandblock_minecart,Command:setblock ~2 ~18 ~0 chain_command_block 1 replace {Command:"/scoreboard players set @a[score_whocreate_min=1,rym=-45,ry=45] createfacing 4",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~17 ~0 chain_command_block 1 replace {Command:"/scoreboard players set @a[score_whocreate_min=1,rym=46,ry=135] createfacing 3",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~16 ~0 chain_command_block 1 replace {Command:"/scoreboard players set @a[score_whocreate_min=1,rym=135,ry=-135] createfacing 2",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~15 ~0 chain_command_block 1 replace {Command:"/scoreboard players set @a[score_whocreate_min=1,rym=-135,ry=-45] createfacing 1",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~14 ~0 chain_command_block 1 replace {Command:"execute @e[type=Item,score_createitem_min=1,score_createitem=1] ~ ~ ~ execute @e[score_createitem_min=2,score_createitem=2,r=1,c=1] ~ ~ ~ kill @e[type=Item,score_createitem_min=1,r=1]",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~13 ~0 chain_command_block 1 replace {Command:"execute @e[type=Item,score_createitem_min=1,score_createitem=1] ~ ~ ~ execute @e[score_createitem_min=2,score_createitem=2,r=1,c=1] ~ ~ ~ particle totem ~ ~1 ~ 0.2 0.6 0.2 0.2 80",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~12 ~0 chain_command_block 1 replace {Command:"execute @e[type=Item,score_createitem_min=1,score_createitem=1] ~ ~ ~ execute @e[score_createitem_min=2,score_createitem=2,r=1,c=1] ~ ~ ~ playsound minecraft:entity.armorstand.break voice @a[r=8]",auto:1b}},{id:commandblock_minecart,Command:"setblock ~2 ~11 ~0 chain_command_block 1 replace {Command:\"execute @e[type=Item,score_createitem_min=1,score_createitem=1] ~ ~ ~ execute @e[score_createitem_min=2,score_createitem=2,r=1,c=1] ~ ~ ~ summon Item ~ ~0.5 ~ {Item:{id:\\\"minecraft:spawn_egg\\\",Count:1b,tag:{EntityTag:{id:\\\"minecraft:bat\\\",CustomName:\\\"CreateShop\\\",NoAI:1,Silent:1b,ActiveEffects:[{Id:14,Duration:9999999,Amplifier:50,Ambient:1}]},HideFlags:127,ench:[{id:34,lvl:10}],display:{Name:\\\"创建商店\\\",Lore:[\\\"www.Ganxiaozhe.com\\\"]}}},Motion:[0.0,0.4,0.0]}\",auto:1b}"},{id:commandblock_minecart,Command:"setblock ~2 ~10 ~0 chain_command_block 1 replace {Command:\"/scoreboard players set @e[type=Item] createitem 2 {Item:{id:\\\"minecraft:sign\\\",Count:1b,Damage:0s},OnGround:1b}\",auto:1b}"},{id:commandblock_minecart,Command:"setblock ~2 ~9 ~0 chain_command_block 1 replace {Command:\"/scoreboard players set @e[type=Item] createitem 1 {Item:{id:\\\"minecraft:chest\\\",Count:1b,Damage:0s},OnGround:1b}\",auto:1b}"},{id:commandblock_minecart,Command:setblock ~2 ~8 ~0 chain_command_block 1 replace {Command:/scoreboard objectives add items dummy,auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~7 ~0 chain_command_block 1 replace {Command:/scoreboard objectives add getshopid dummy,auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~6 ~0 chain_command_block 1 replace {Command:/scoreboard objectives add getsalep dummy,auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~5 ~0 chain_command_block 1 replace {Command:/scoreboard objectives add isale trigger,auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~4 ~0 chain_command_block 1 replace {Command:/scoreboard objectives add shopID dummy,auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~3 ~0 chain_command_block 1 replace {Command:/scoreboard objectives add shopSetting dummy,auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~2 ~0 chain_command_block 1 replace {Command:/scoreboard objectives add whocreate stat.useItem.minecraft.spawn_egg,auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~1 ~0 chain_command_block 1 replace {Command:/scoreboard objectives add createfacing dummy,auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~-1 ~0 chain_command_block 1 replace {Command:fill ~ ~ ~ ~ ~-1 ~ air,auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~0 ~0 repeating_command_block 1 replace {Command:/scoreboard objectives add createitem dummy,auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~-2 ~0 repeating_command_block 1 replace {Command:summon armor_stand ~ ~ ~ {CustomName:"shopIDStats"},auto:1b}},{id:commandblock_minecart,Command:setblock ~ ~1 ~ command_block 0 replace {auto:1b,Command:fill ~ ~ ~ ~ ~-2 ~ air}},{id:commandblock_minecart,Command:kill @e[type=commandblock_minecart,r=1]}]}]}

存货与购买与撤销部分

 

  1. <blockquote>/summon falling_block ~ ~1.5 ~ {Time:1,Block:minecraft:redstone_block,Motion:[0d,-1d,0d],Passengers:[{id:falling_block,Time:1,Block:minecraft:activator_rail,Passengers:[{id:commandblock_minecart,Command:blockdata ~ ~-2 ~ {auto:0b,Command:""}},{id:commandblock_minecart,Command:setblock ~2 ~77 ~0 chain_command_block 1 replace {Command:"/scoreboard players reset @a[score_btimer_min=3,score_ibuy=0] btimer",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~76 ~0 chain_command_block 1 replace {Command:"/scoreboard players tag @a[tag=buyer,score_btimer_min=3,score_ibuy=0] remove buyer",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~75 ~0 chain_command_block 1 replace {Command:"/scoreboard players set @a[tag=buyer,score_btimer_min=3,score_ibuy=0] ibuy -1",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~74 ~0 chain_command_block 1 replace {Command:"/execute @e[name=cShop,score_shopSetting=-1,score_selling_min=1,tag=s_reeds] ~ ~ ~ give @p[tag=buyer,score_btimer_min=3] reeds 1 0",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~73 ~0 chain_command_block 1 replace {Command:"/execute @e[name=cShop,score_shopSetting=-1,score_selling_min=1,tag=s_iron_ingot] ~ ~ ~ give @p[tag=buyer,score_btimer_min=3] iron_ingot 1 0",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~72 ~0 chain_command_block 1 replace {Command:"/execute @a[tag=buyer,score_btimer_min=3] ~ ~ ~ scoreboard players operation @e[name=cShop,score_shopSetting=-1,c=1] savecash += @e[name=cShop,score_shopSetting=-1,c=1] isale",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~71 ~0 chain_command_block 1 replace {Command:"/execute @a[tag=buyer,score_btimer_min=3] ~ ~ ~ scoreboard players operation @p cash -= @e[name=cShop,score_shopSetting=-1,c=1] isale",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~70 ~0 chain_command_block 1 replace {Command:"/execute @a[tag=buyer,score_btimer_min=3] ~ ~ ~ scoreboard players remove @e[name=cShop,score_shopSetting=-1,c=1] items 1",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~69 ~0 chain_command_block 1 replace {Command:"/execute @a[tag=buyer,score_btimer_min=3] ~ ~ ~ scoreboard players remove @p ibuy 1",auto:1b}},{id:commandblock_minecart,Command:"setblock ~2 ~68 ~0 chain_command_block 1 replace {Command:\"tellraw @a[tag=buyer,score_btimer_min=3,score_btimer=3] [{\\\"text\\\":\\\"[甘小蔗] \\\",\\\"color\\\":\\\"dark_green\\\",\\\"bold\\\":\\\"true\\\"},{\\\"text\\\":\\\" 购买成功!请稍等片刻。\\\",\\\"color\\\":\\\"green\\\",\\\"bold\\\":true}]\",auto:1b}"},{id:commandblock_minecart,Command:setblock ~2 ~67 ~0 chain_command_block 1 replace {Command:"/execute @a[tag=buyer,score_btimer_min=3] ~ ~ ~ scoreboard players set @e[name=cShop,score_shopSetting=-1,c=1] selling 1",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~66 ~0 chain_command_block 1 replace {Command:"scoreboard players set @e[tag=selling] selling 0",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~65 ~0 chain_command_block 1 replace {Command:"/scoreboard players reset @a[score_bpd_min=0,score_bpd=0,score_btimer_min=2,score_btimer=2] btimer",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~64 ~0 chain_command_block 1 replace {Command:"/scoreboard players tag @a[score_bpd_min=0,score_bpd=0,score_btimer_min=2,score_btimer=2] remove buyer",auto:1b}},{id:commandblock_minecart,Command:"setblock ~2 ~63 ~0 chain_command_block 1 replace {Command:\"/tellraw @a[score_bpd_min=0,score_bpd=0,score_btimer_min=2,score_btimer=2] [{\\\"text\\\":\\\"[甘小蔗] \\\",\\\"color\\\":\\\"dark_green\\\",\\\"bold\\\":\\\"true\\\"},{\\\"text\\\":\\\" 您的现金不足,购买失败\\\",\\\"color\\\":\\\"red\\\",\\\"bold\\\":true}]\",auto:1b}"},{id:commandblock_minecart,Command:setblock ~2 ~62 ~0 chain_command_block 1 replace {Command:"/scoreboard players set @p[score_btemp=0,score_btimer_min=2,score_btimer=2] bpd 1",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~61 ~0 chain_command_block 1 replace {Command:"/execute @a[tag=buyer,score_btimer_min=2,score_btimer=2] ~ ~ ~ scoreboard players operation @p btemp -= @p cash",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~60 ~0 chain_command_block 1 replace {Command:"/execute @a[tag=buyer,score_btimer_min=2,score_btimer=2] ~ ~ ~ scoreboard players operation @p btemp *= @e[name=cShop,score_shopSetting=-1,c=1] isale",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~59 ~0 chain_command_block 1 replace {Command:"/execute @a[tag=buyer,score_btimer_min=2,score_btimer=2] ~ ~ ~ scoreboard players operation @p btemp = @p ibuy",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~58 ~0 chain_command_block 1 replace {Command:"/scoreboard players set @a[tag=buyer,score_btimer_min=2,score_btimer=2] bpd 0",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~57 ~0 chain_command_block 1 replace {Command:"/scoreboard players reset @a[score_bpd_min=0,score_bpd=0,score_btimer_min=1,score_btimer=1] btimer",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~56 ~0 chain_command_block 1 replace {Command:"/scoreboard players tag @a[score_bpd_min=0,score_bpd=0,score_btimer_min=1,score_btimer=1] remove buyer",auto:1b}},{id:commandblock_minecart,Command:"setblock ~2 ~55 ~0 chain_command_block 1 replace {Command:\"/tellraw @a[score_bpd_min=0,score_bpd=0,score_btimer_min=1,score_btimer=1] [{\\\"text\\\":\\\"[甘小蔗] \\\",\\\"color\\\":\\\"dark_green\\\",\\\"bold\\\":\\\"true\\\"},{\\\"text\\\":\\\" 当前商品存库不足,购买失败\\\",\\\"color\\\":\\\"red\\\",\\\"bold\\\":true}]\",auto:1b}"},{id:commandblock_minecart,Command:setblock ~2 ~54 ~0 chain_command_block 1 replace {Command:"/scoreboard players set @p[score_btemp=0,score_btimer_min=1,score_btimer=1] bpd 1",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~53 ~0 chain_command_block 1 replace {Command:"/execute @a[tag=buyer,score_btimer_min=1,score_btimer=1] ~ ~ ~ scoreboard players operation @p btemp -= @e[name=cShop,score_shopSetting=-1,c=1] items",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~52 ~0 chain_command_block 1 replace {Command:"/execute @a[tag=buyer,score_btimer_min=1,score_btimer=1] ~ ~ ~ scoreboard players operation @p btemp = @p ibuy",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~51 ~0 chain_command_block 1 replace {Command:"/scoreboard players set @a[tag=buyer,score_btimer_min=1,score_btimer=1] bpd 0",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~50 ~0 chain_command_block 1 replace {Command:"/scoreboard players add @a[tag=buyer,score_btimer_min=0] btimer 1",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~49 ~0 chain_command_block 1 replace {Command:"/scoreboard players tag @a[score_ibuy_min=1] remove noper",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~48 ~0 chain_command_block 1 replace {Command:"/scoreboard players tag @a[tag=delshoper] remove delshoper",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~47 ~0 chain_command_block 1 replace {Command:"/scoreboard players tag @a[tag=delshoper] remove createdShop",auto:1b}},{id:commandblock_minecart,Command:"setblock ~2 ~46 ~0 chain_command_block 1 replace {Command:\"/tellraw @a[tag=delshoper] [{\\\"text\\\":\\\"[甘小蔗] \\\",\\\"color\\\":\\\"dark_green\\\",\\\"bold\\\":\\\"true\\\"},{\\\"text\\\":\\\" 撤销成功!\\\",\\\"color\\\":\\\"red\\\",\\\"bold\\\":true}]\",auto:1b}"},{id:commandblock_minecart,Command:setblock ~2 ~45 ~0 chain_command_block 1 replace {Command:"/execute @a[tag=delshoper] ~ ~ ~ kill @e[name=cShop,score_shopSetting=-1,c=1]",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~44 ~0 chain_command_block 1 replace {Command:"/execute @a[tag=delshoper] ~ ~ ~ execute @e[name=cShop,score_shopSetting=-1,c=1] ~ ~ ~ entitydata @e[type=Item,tag=ishow,r=2] {PickupDelay:0,NoGravity:0}",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~43 ~0 chain_command_block 1 replace {Command:"/execute @a[tag=delshoper] ~ ~ ~ execute @e[name=cShop,score_shopSetting=-1,c=1] ~ ~ ~ scoreboard players reset @e[type=Item,tag=ishow,r=2] createitem",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~42 ~0 chain_command_block 1 replace {Command:"/execute @a[tag=delshoper] ~ ~ ~ execute @e[name=cShop,score_shopSetting=-1,c=1] ~ ~ ~ setblock ~ ~ ~ air 0 destory",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~41 ~0 chain_command_block 1 replace {Command:"/scoreboard players reset @a[tag=delshoper] delshop",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~40 ~0 chain_command_block 1 replace {Command:"/scoreboard players tag @a[score_delshop_min=1] remove per",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~39 ~0 chain_command_block 1 replace {Command:"/scoreboard players reset @a[score_ctemp_min=300] ctemp",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~38 ~0 chain_command_block 1 replace {Command:"/scoreboard players tag @a[score_ctemp_min=300] remove per",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~37 ~0 chain_command_block 1 replace {Command:"/scoreboard players tag @a[score_ctemp_min=300] remove noper",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~36 ~0 chain_command_block 1 replace {Command:"/scoreboard players tag @a[score_ctemp_min=300] remove clicker",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~35 ~0 chain_command_block 1 replace {Command:"/scoreboard players tag @a[tag=per,score_ctemp_min=1,score_delshop_min=1,score_delshop=1,score_ctemp=299] add delshoper",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~34 ~0 chain_command_block 1 replace {Command:"/scoreboard players add @a[tag=noper,score_ctemp_min=1,score_ctemp=299,score_ibuy_min=1] btimer 0",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~33 ~0 chain_command_block 1 replace {Command:"/scoreboard players tag @a[tag=noper,score_ctemp_min=1,score_ctemp=299,score_ibuy_min=1] add buyer",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~32 ~0 chain_command_block 1 replace {Command:"/scoreboard players enable @a[tag=per,score_ctemp_min=1] delshop",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~31 ~0 chain_command_block 1 replace {Command:"/scoreboard players enable @a[tag=noper,score_ctemp_min=1] ibuy",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~30 ~0 chain_command_block 1 replace {Command:"/scoreboard players set @a[tag=per,score_ctemp_min=1,score_ctemp=1] delshop -1",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~29 ~0 chain_command_block 1 replace {Command:"/scoreboard players set @a[tag=noper,score_ctemp_min=1,score_ctemp=1] ibuy -1",auto:1b}},{id:commandblock_minecart,Command:"setblock ~2 ~28 ~0 chain_command_block 1 replace {Command:\"/execute @e[name=cShop,score_shopSetting=-1] ~ ~ ~ tellraw @p[tag=per,score_ctemp_min=1,score_ctemp=1,r=8] [{\\\"text\\\":\\\"[甘小蔗] \\\",\\\"color\\\":\\\"dark_green\\\",\\\"bold\\\":\\\"true\\\"},{\\\"text\\\":\\\" 如需撤销请在15秒内输入\\\\u00a7c\\\\u00a7l /trigger delshop set 1 \\\\u00a7a\\\\u00a7l进行撤销\\\",\\\"color\\\":\\\"green\\\",\\\"bold\\\":true}]\",auto:1b}"},{id:commandblock_minecart,Command:"setblock ~2 ~27 ~0 chain_command_block 1 replace {Command:\"/execute @e[name=cShop,score_shopSetting=-1] ~ ~ ~ tellraw @p[tag=noper,score_ctemp_min=1,score_ctemp=1,r=8] [{\\\"text\\\":\\\"[甘小蔗] \\\",\\\"color\\\":\\\"dark_green\\\",\\\"bold\\\":\\\"true\\\"},{\\\"text\\\":\\\" 当前商品存库为\\\",\\\"color\\\":\\\"green\\\",\\\"bold\\\":true},{\\\"score\\\":{\\\"name\\\":\\\"@p\\\",\\\"objective\\\":\\\"items\\\"},\\\"color\\\":\\\"gold\\\",\\\"bold\\\":\\\"true\\\"},{\\\"text\\\":\\\"\\\\n在15秒内输入\\\\u00a7c\\\\u00a7l /trigger ibuy set 数量 \\\\u00a7a\\\\u00a7l进行购买,请在购买时不要移动\\\",\\\"color\\\":\\\"green\\\",\\\"bold\\\":true}]\",auto:1b}"},{id:commandblock_minecart,Command:setblock ~2 ~26 ~0 chain_command_block 1 replace {Command:"/scoreboard players add @a[tag=clicker] ctemp 1",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~25 ~0 chain_command_block 1 replace {Command:"/scoreboard players tag @a[tag=whoclick] remove whoclick",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~24 ~0 chain_command_block 1 replace {Command:"/scoreboard players reset @a[tag=whoclick] ctemp",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~23 ~0 chain_command_block 1 replace {Command:"/scoreboard players reset @a[tag=clicker] IDtemp",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~22 ~0 chain_command_block 1 replace {Command:"/scoreboard players tag @a[tag=whoclick] add clicker",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~21 ~0 chain_command_block 1 replace {Command:"/scoreboard players tag @a[score_IDtemp_min=0,score_IDtemp=0] add per",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~20 ~0 chain_command_block 1 replace {Command:"/scoreboard players tag @a[score_IDtemp=-1] add noper",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~19 ~0 chain_command_block 1 replace {Command:"/scoreboard players tag @a[score_IDtemp_min=1] add noper",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~18 ~0 chain_command_block 1 replace {Command:"/execute @a[tag=whoclick] ~ ~ ~ scoreboard players operation @p IDtemp -= @e[name=cShop,score_shopSetting=-1] shopID",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~17 ~0 chain_command_block 1 replace {Command:"/execute @a[tag=whoclick] ~ ~ ~ scoreboard players operation @p IDtemp = @p shopID",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~16 ~0 chain_command_block 1 replace {Command:"/scoreboard players set @a[score_iclick_min=1] iclick 0",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~15 ~0 chain_command_block 1 replace {Command:"/execute @e[name=cShop,score_shopSetting=-1] ~ ~ ~ scoreboard players tag @a[r=6,score_iclick_min=1] add whoclick",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~14 ~0 chain_command_block 1 replace {Command:"/kill @e[type=Item,score_savei_min=0,score_savei=0]",auto:1b}},{id:commandblock_minecart,Command:"setblock ~2 ~13 ~0 chain_command_block 1 replace {Command:\"/execute @e[type=Item,score_savei_min=0,score_savei=0] ~ ~ ~ tellraw @p[tag=createdShop,r=6] [{\\\"text\\\":\\\"[甘小蔗] \\\",\\\"color\\\":\\\"dark_green\\\",\\\"bold\\\":\\\"true\\\"},{\\\"selector\\\":\\\"@p[tag=createdShop]\\\",\\\"color\\\":\\\"gold\\\",\\\"bold\\\":\\\"true\\\"},{\\\"text\\\":\\\" 成功增加存库\\\\u00a7a+1\\\",\\\"color\\\":\\\"green\\\",\\\"bold\\\":true}]\",auto:1b}"},{id:commandblock_minecart,Command:setblock ~2 ~12 ~0 chain_command_block 1 replace {Command:"/execute @e[type=Item,score_savei_min=0,score_savei=0] ~ ~ ~ scoreboard players add @e[name=cShop,score_shopSetting=-1,c=1] items 1",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~11 ~0 chain_command_block 1 replace {Command:"/execute @e[type=Item,score_savei_min=1] ~ ~ ~ scoreboard players operation @e[type=Item,c=1] savei += @e[type=Item,score_createitem=-1] createitem",auto:1b}},{id:commandblock_minecart,Command:"setblock ~2 ~10 ~0 chain_command_block 1 replace {Command:\"/execute @e[name=cShop,score_shopSetting=-1] ~ ~ ~ scoreboard players set @e[type=Item,r=1,tag=!ishow] savei 2 {Item:{id:\\\"minecraft:reeds\\\",Count:1b,Damage:0s}}\",auto:1b}"},{id:commandblock_minecart,Command:"setblock ~2 ~9 ~0 chain_command_block 1 replace {Command:\"/execute @e[name=cShop,score_shopSetting=-1] ~ ~ ~ scoreboard players set @e[type=Item,r=1,tag=!ishow] savei 1 {Item:{id:\\\"minecraft:iron_ingot\\\",Count:1b,Damage:0s}}\",auto:1b}"},{id:commandblock_minecart,Command:setblock ~2 ~8 ~0 chain_command_block 1 replace {Command:/scoreboard objectives add savecash dummy,auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~7 ~0 chain_command_block 1 replace {Command:/scoreboard objectives add selling dummy,auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~6 ~0 chain_command_block 1 replace {Command:/scoreboard objectives add bpd dummy,auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~5 ~0 chain_command_block 1 replace {Command:/scoreboard objectives add btimer dummy,auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~4 ~0 chain_command_block 1 replace {Command:/scoreboard objectives add btemp dummy,auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~3 ~0 chain_command_block 1 replace {Command:/scoreboard objectives add delshop trigger,auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~2 ~0 chain_command_block 1 replace {Command:/scoreboard objectives add ibuy trigger,auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~1 ~0 chain_command_block 1 replace {Command:/scoreboard objectives add ctemp dummy,auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~0 ~0 chain_command_block 1 replace {Command:/scoreboard objectives add IDtemp dummy,auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~-1 ~0 chain_command_block 1 replace {Command:/scoreboard objectives add iclick stat.talkedToVillager,auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~-2 ~0 repeating_command_block 1 replace {Command:/scoreboard objectives add savei dummy,auto:1b}},{id:commandblock_minecart,Command:setblock ~ ~1 ~ command_block 0 replace {auto:1b,Command:fill ~ ~ ~ ~ ~-2 ~ air}},{id:commandblock_minecart,Command:kill @e[type=commandblock_minecart,r=1]}]}]}

发表评论

您必须 登录 才能发表留言!