当前位置: 我的世界 > 游戏攻略 > 正文

MC大佬教你用命令方块制作原力锁喉技(2)

小编:铅笔时间:2018-06-27 18:02回到游戏园首页

  函数一览:

  #锁喉与消耗原力

  tag @a[nbt={Inventory:[{Slot:-106b,tag:{display:{Name:""原力-锁喉"",Lore:["手持检测,副手使用"]}}}]},scores={YL=-1..}] add YLSH1

  scoreboard players add @a[scores={YL=..319}] YL 1

  execute at @a[tag=YLSH1] run summon minecraft:armor_stand ~ ~ ~ {Tags:["YLSHS1","YLSHMKS"],NoGravity:true,Invisible:true,DisabledSlots:true,Invulnerable:true}

  execute at @a[tag=YLSH1] run summon minecraft:armor_stand ~ ~ ~ {Tags:["YLSHS2","YLSHMKS"],NoGravity:true,Invisible:true,DisabledSlots:true,Invulnerable:true}

  execute at @a[tag=YLSH1] run summon minecraft:armor_stand ~ ~ ~ {Tags:["YLSHS3","YLSHMKS"],NoGravity:true,Invisible:true,DisabledSlots:true,Invulnerable:true}

  execute at @a[tag=YLSH1] run summon minecraft:armor_stand ~ ~ ~ {Tags:["YLSHS4","YLSHMKS"],NoGravity:true,Invisible:true,DisabledSlots:true,Invulnerable:true}

  execute at @e[tag=YLSH1] run tp @e[tag=YLSHS1,distance=..3] ^ ^ ^2

  execute at @e[tag=YLSH1] run tp @e[tag=YLSHS2,distance=..5] ^ ^ ^4

  execute at @e[tag=YLSH1] run tp @e[tag=YLSHS3,distance=..7] ^ ^ ^6

  execute at @e[tag=YLSH1] run tp @e[tag=YLSHS4,distance=..9] ^ ^ ^8

  execute at @e[tag=YLSHMKS] run particle minecraft:damage_indicator ~ ~ ~

  execute at @e[tag=YLSHMKS] run scoreboard players add @e[tag=!YLSH1,tag=!YLSH2,tag=!YLSHMKS,tag=!YLSHMK,distance=..2] YLSH 2

  scoreboard players remove @a[tag=YLSH1] YL 3

  scoreboard players set @a[scores={YL=0..0}] YL -100

  scoreboard players set @a[scores={YL=-2..-1}] YL 2

  tag @a remove YLSH1

  kill @e[tag=YLSHMKS]

  #预览目标

  tag @a[nbt={SelectedItem:{tag:{display:{Name:""原力-锁喉"",Lore:["手持检测,副手使用"]}}}},tag=!YLSH2] add YLSH2

  execute at @a[tag=YLSH2] run summon minecraft:armor_stand ~ ~ ~ {Tags:["YLSH3","YLSHMK"],NoGravity:true,Invisible:true,DisabledSlots:true,Invulnerable:true}

  execute at @a[tag=YLSH2] run summon minecraft:armor_stand ~ ~ ~ {Tags:["YLSH4","YLSHMK"],NoGravity:true,Invisible:true,DisabledSlots:true,Invulnerable:true}

  execute at @a[tag=YLSH2] run summon minecraft:armor_stand ~ ~ ~ {Tags:["YLSH5","YLSHMK"],NoGravity:true,Invisible:true,DisabledSlots:true,Invulnerable:true}

  execute at @a[tag=YLSH2] run summon minecraft:armor_stand ~ ~ ~ {Tags:["YLSH6","YLSHMK"],NoGravity:true,Invisible:true,DisabledSlots:true,Invulnerable:true}

  execute at @e[tag=YLSH2] run tp @e[tag=YLSH3,distance=..3] ^ ^ ^2

  execute at @e[tag=YLSH2] run tp @e[tag=YLSH4,distance=..5] ^ ^ ^4

  execute at @e[tag=YLSH2] run tp @e[tag=YLSH5,distance=..7] ^ ^ ^6

  execute at @e[tag=YLSH2] run tp @e[tag=YLSH6,distance=..9] ^ ^ ^8

  execute at @e[tag=YLSHMK] run particle minecraft:flame ~ ~ ~ 0 0 0 0 1

  tag @a remove YLSH2

  kill @e[tag=YLSHMK]

  #一级锁喉[锁喉5秒到5秒]

  tag @e[scores={YLSH=0..100}] add YLSHDIE1

  effect give @e[tag=YLSHDIE1] poison 5 0 true

  effect give @e[tag=YLSHDIE1] slowness 1 1 true

  effect give @e[tag=YLSHDIE1] weakness 1 2 true

  scoreboard players remove @e[scores={YLSH=0..}] YLSH 1

  tag @e[scores={YLSH=..0}] remove YLSHDIE1

  #二级锁喉[锁喉5秒以上]

  tag @e[scores={YLSH=100..}] add YLSHDIE2

  effect give @e[tag=YLSHDIE2] wither 3 1 true

  effect give @e[tag=YLSHDIE2] levitation 1 0 true

  effect give @e[tag=YLSHDIE2] poison 3 0 true

  effect give @e[tag=YLSHDIE2] blindness 1 0 true

  scoreboard players set @e[tag=YLSHDIE2] YLSH 99

  tag @e[tag=YLSHDIE2] remove YLSHDIE2

分享到:更多

游戏信息

我的世界
我的世界类型:休闲娱乐平台:PC,iOS,安卓电脑版下载
  • 游戏大礼包
  • 手游开测表