返回资讯

展开

可可软件园> 手游攻略> 攻略秘籍

我的世界如何做雷鸣剑 OOC攻略教学

作者:诗韵梵吟 人气:

今天小编给大家带来的是改进后的版本,在击中怪物之后会有一点点的延迟才会掉落雷,而且让武器有击退的效果,这样可以避免劈到玩家,那么小编就开始讲解我的世界如何做雷鸣剑,一起来看看吧。上期小编教的我的世界怎么做枪,大家都学会了吗?

下面直接给出指令,而且会稍加讲解:

  我们先创建四个计分板:

/scoreboard objectives add ss dummy

/scoreboard objectives add sc dummy

/scoreboard objectives add zc stat.damageDealt

/scoreboard objectives add mz dummy

  以下指令第一个循环接后面连锁:

/scoreboard players set [url=home.php?mod=space&uid=311230]@A[/url] sc 2 {SelectedItem:{id:"minecraft:golden_sword",Count:1b,Damage:0s,tag:{display:{Name:"雷鸣剑"}}}}

而这条指令探测玩家手持名为雷鸣剑的金剑,并设定改玩家sc为2分。

/scoreboard players remove @a[score_sc_min=1] sc 1

给sc至少为1的玩家减去一分,结合上面一条指令,能让玩家手持雷鸣剑时分数为1,一旦不手持分数归零。

/scoreboard players set @e[type=!Player] ss 1 {HurtTime:10s}

用来探测生物受伤,设定ss为1分

/execute @a[score_zc_min=1,score_sc_min=1,score_sc=2] ~ ~ ~ /scoreboard players set @e[score_ss_min=1,r=5,type=!Player] mz 1

探测手持雷鸣剑,还能造成伤害的玩家的周围的受伤的生物,设定mz为1分

/scoreboard players add @e[score_mz_min=1] mz 1

给mz至少为1的生物加分

/execute @e[score_mz_min=10,score_mz=10] ~ ~ ~ /summon Lightning_bolt ~ ~ ~

当一个生物mz加到10分时(0.5秒,20分为一秒,可自己改落雷延迟)给生物召唤闪电。

/scoreboard players set @a[score_zc_min=1] zc 0

清零造成伤害

/scoreboard players set @e[score_mz_min=11] mz 0

清零延迟

后面给自己一个名为雷鸣剑的金剑就OK啦

/give @p minecraft:golden_sword 1 0 {ench:[{id:19s,lvl:2s}],display:{Name:"雷鸣剑"},Unbreakable:1}

  解析结束,以下是OOC部分:

我们先手动输入4条指令来创建计分板:

/scoreboard objectives add ss dummy

/scoreboard objectives add sc dummy

/scoreboard objectives add zc stat.damageDealt

/scoreboard objectives add mz dummy

  后面执行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 ~6 ~0 chain_command_block 1 replace {Command:"/scoreboard players set @e[score_mz_min=11] mz 0",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~5 ~0 chain_command_block 1 replace {Command:"/scoreboard players set @a[score_zc_min=1] zc 0",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~4 ~0 chain_command_block 1 replace {Command:"/execute @e[score_mz_min=10,score_mz=10] ~ ~ ~ /summon Lightning_bolt ~ ~ ~",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~3 ~0 chain_command_block 1 replace {Command:"/scoreboard players add @e[score_mz_min=1] mz 1",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~2 ~0 chain_command_block 1 replace {Command:"/execute @a[score_zc_min=1,score_sc_min=1,score_sc=2] ~ ~ ~ /scoreboard players set @e[score_ss_min=1,r=5,type=!Player] mz 1",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~1 ~0 chain_command_block 1 replace {Command:"/scoreboard players set @e[type=!Player] ss 1 {HurtTime:10s}",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~0 ~0 chain_command_block 1 replace {Command:"/scoreboard players remove @a[score_sc_min=1] sc 1",auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~-1 ~0 chain_command_block 1 replace {Command:/scoreboard players set @a sc 2 {SelectedItem:{id:"minecraft:golden_sword",Count:1b,Damage:0s,tag:{display:{Name:"雷鸣剑"}}}},auto:1b}},{id:commandblock_minecart,Command:setblock ~2 ~-2 ~0 repeating_command_block 1 replace {Command:/testfor @a,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]}]}]}

我的世界如何做雷鸣剑就为大家讲解到这里,希望玩家会喜欢这篇文章,也祝大家游戏中玩的嗨皮。

相关教程
猜你喜欢