17173有料社区

查看: 1071|回复: 0

[互助技巧] 打打打!【命令方块连杀系统】+OOC一键命令

[复制链接]

423

主题

1212

帖子

3969

积分

正式版主

Rank: 15Rank: 15Rank: 15Rank: 15Rank: 15Rank: 15

绝地求生版面勋章

发表于 2017-12-20 15:17:21 | 显示全部楼层 |阅读模式
今天带来的是连杀系统教程,先上一张效果图:
211818sjij1dpo89b00kcb.gif

如图,连续击杀生物或人后,底部会给所有玩家显示xx连杀。如果玩家在杀死一个生物之后6秒没有继续击杀生物,则连杀会重置。

下面给指令外加讲解:
首先创建计分板:

  • /scoreboard objectives add ls dummy
  • /scoreboard objectives add sr totalKillCount
  • /scoreboard objectives add js dummy

[color=rgb(51, 102, 153) !important]复制代码

第二个准则是击杀实体
  • /scoreboard players add @a[score_sr_min=1] ls 1

[color=rgb(51, 102, 153) !important]复制代码

给击杀实体的玩家ls积分加1
  • /execute @a[score_sr_min=1,score_ls_min=2] ~ ~ ~ title @A actionbar [{"selector":"@p","color":"gold","bold":"true"},{"score":{"name":"@p","objective":"ls"},"color":"red","bold":"true"},{"text":"连杀","color":"gold","bold":true}]

[color=rgb(51, 102, 153) !important]复制代码

播报连杀信息(杀两人以上才会播报)
  • /scoreboard players set @a[score_sr_min=1] js 0

[color=rgb(51, 102, 153) !important]复制代码

击杀生物即给计时清零
  • /scoreboard players set @a[score_sr_min=1] sr 0

[color=rgb(51, 102, 153) !important]复制代码

重置玩家击杀积分
  • /scoreboard players add @a js 1

[color=rgb(51, 102, 153) !important]复制代码

给玩家计时
  • /scoreboard players set @a[score_js_min=120,score_js=120] ls 0

[color=rgb(51, 102, 153) !important]复制代码

玩家计时到6秒就重置连杀积分(120为6秒,20分一秒可自行修改)

注意:只有玩家在六秒之内继续击杀生物才会播报。否则重置连杀






下面给出OOC(复制到命令方块直接激活使用)

  • /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 ~3 ~0 chain_command_block 1 replace {Command:"/scoreboard players set @a[score_js_min=120,score_js=120] ls 0",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~2 ~0 chain_command_block 1 replace {Command:"/scoreboard players add @a[score_js=120] js 1",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~1 ~0 chain_command_block 1 replace {Command:"/scoreboard players set @a[score_sr_min=1] sr 0",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~0 ~0 chain_command_block 1 replace {Command:"/scoreboard players set @a[score_sr_min=1] js 0",auto:1b}},{id:commandblock_minecart,Command:"setblock ~2 ~-1 ~0 chain_command_block 1 replace {Command:"/execute @a[score_sr_min=1,score_ls_min=2] ~ ~ ~ title @a actionbar [{\\"selector\\":\\"@p\\",\\"color\\":\\"gold\\",\\"bold\\":\\"true\\"},{\\"score\\":{\\"name\\":\\"@p\\",\\"objective\\":\\"ls\\"},\\"color\\":\\"red\\",\\"bold\\":\\"true\\"},{\\"text\\":\\"杀\\",\\"color\\":\\"gold\\",\\"bold\\":true}]",auto:1b}"},{id:commandblock_minecart,Command:setblock ~2 ~-2 ~0 repeating_command_block 1 replace {Command:"/scoreboard players add @a[score_sr_min=1] ls 1",auto:1b}},{id:commandblock_minecart,Command:/scoreboard objectives add ls dummy},{id:commandblock_minecart,Command:/scoreboard objectives add sr totalKillCount},{id:commandblock_minecart,Command:/scoreboard objectives add js dummy},{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]}]}]}



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

点击这里给我发消息 点击链接加入【17173社区玩家群1】