我的世界服務(wù)器道具制作

槍械指令簡易版2.0
/scoreboard objectives add 傷害 dummy
/scoreboard objectives add 傷害a dummy
/scoreboard objectives add 換彈 dummy
/scoreboard objectives add 彈藥 dummy
[第一個循環(huán),其他全部連鎖,無條件,常開]
[槍械傷害設(shè)置與添加]?
scoreboard players add @a 傷害 0
scoreboard players add @a 換彈 0
scoreboard players add @a 彈藥 0
scoreboard players add @a[scores={傷害=0}] 傷害 5
scoreboard players add @a[hasitem={item=heart_of_the_sea,quantity=1..,location=slot.hotbar}] 傷害 1
tellraw @a[hasitem={item=heart_of_the_sea,quantity=1..,location=slot.hotbar}] {"rawtext":[{"text":"§l§o§b步槍§c傷害+1"}]}
clear @a[hasitem={item=heart_of_the_sea,quantity=1..,location=slot.hotbar}] heart_of_the_sea 0 1
[槍械準(zhǔn)星]?
title @a[hasitem={item=fishing_rod,location=slot.weapon.mainhand}] title §r
title @a[hasitem={item=fishing_rod,location=slot.weapon.mainhand}] subtitle §b+§c
title @a[hasitem={item=fishing_rod,location=slot.weapon.mainhand}] times 0 100 0
[開槍]?
execute @e[type=minecraft:fishing_hook] ~~~ tag @a[scores={彈藥=1..},r=2,hasitem={item=fishing_rod,location=slot.weapon.mainhand}] add 射擊
execute @e[type=minecraft:fishing_hook] ~~~ tag @a[scores={彈藥=1..},r=2,hasitem={item=fishing_rod,location=slot.weapon.mainhand}] add 射擊a
[音效]?
execute @a[tag=射擊] ~~~ playsound mob.zombie.woodbreak @a[r=30] ~~~ 1 2
[后坐力]?
execute @a[tag=射擊] ~~~ camerashake add @s 2 0.05 positional
[扣除子彈]?
scoreboard players remove @a[tag=射擊,scores={彈藥=1..}] 彈藥 1
execute @a[tag=射擊] ^ ^1 ^0.5 detect ~ ~1 ~ air 0 tag @s add 墻
tag @a[tag=射擊,tag=!墻] remove 射擊
[射程]?1
execute @a[tag=射擊] ^ ^0.5 ^1 scoreboard players operation @e[r=1,c=1,tag=!射擊a] 傷害a=@s 傷害
execute @a[tag=射擊] ^ ^1.5 ^1 particle minecraft:balloon_gas_particle ~~~tag @a[tag=射擊] remove 墻
execute @a[tag=射擊] ^ ^0.5 ^2 detect ~ ~1 ~ air 0 tag @s add 墻
tag @a[tag=射擊,tag=!墻] remove 射擊
[射程]?2
execute @a[tag=射擊] ^ ^0.5 ^2 scoreboard players operation @e[r=1,c=1,tag=!射擊a] 傷害a=@s 傷害
execute @a[tag=射擊] ^ ^1.5 ^2 particle minecraft:balloon_gas_particle ~~~tag @a[tag=射擊] remove 墻
execute @a[tag=射擊] ^ ^0.5 ^3 detect ~ ~1 ~ air 0 tag @s add 墻
tag @a[tag=射擊,tag=!墻] remove 射擊
[射程]?3
execute @a[tag=射擊] ^ ^0.5 ^3 scoreboard players operation @e[r=1,c=1,tag=!射擊a] 傷害a=@s 傷害
execute @a[tag=射擊] ^ ^1.5 ^3 particle minecraft:balloon_gas_particle ~~~
tag @a[tag=射擊] remove 墻
execute @a[tag=射擊] ^ ^0.5 ^4 detect ~ ~1 ~ air 0 tag @s add 墻
tag @a[tag=射擊,tag=!墻] remove 射擊
[射程]?4
execute @a[tag=射擊] ^ ^0.5 ^4 scoreboard players operation @e[r=1,c=1,tag=!射擊a] 傷害a=@s 傷害
execute @a[tag=射擊] ^ ^1.5 ^4 particle minecraft:balloon_gas_particle ~~~
tag @a[tag=射擊] remove 墻execute @a[tag=射擊] ^ ^0.5 ^5 detect ~ ~1 ~ air 0 tag @s add 墻
tag @a[tag=射擊,tag=!墻] remove 射擊
[射程]?5
execute @a[tag=射擊] ^ ^0.5 ^5 scoreboard players operation @e[r=1,c=1,tag=!射擊a] 傷害a=@s 傷害
execute @a[tag=射擊] ^ ^1.5 ^5 particle minecraft:balloon_gas_particle ~~~
tag @a[tag=射擊] remove 墻
execute @a[tag=射擊] ^ ^0.5 ^6 detect ~ ~1 ~ air 0 tag @s add 墻
tag @a[tag=射擊,tag=!墻] remove 射擊
[射程]?6
execute @a[tag=射擊] ^ ^0.5 ^6 scoreboard players operation @e[r=1,c=1,tag=!射擊a] 傷害a=@s 傷害
execute @a[tag=射擊] ^ ^1.5 ^6 particle minecraft:balloon_gas_particle ~~~
tag @a[tag=射擊] remove 墻
execute @a[tag=射擊] ^ ^0.5 ^7 detect ~ ~1 ~ air 0 tag @s add 墻
tag @a[tag=射擊,tag=!墻] remove 射擊
[射程]?7
execute @a[tag=射擊] ^ ^0.5 ^7 scoreboard players operation @e[r=1,c=1,tag=!射擊a] 傷害a=@s 傷害
execute @a[tag=射擊] ^ ^1.5 ^7 particle minecraft:balloon_gas_particle ~~~tag @a[tag=射擊] remove 墻
execute @a[tag=射擊] ^ ^0.5 ^8 detect ~ ~1 ~ air 0 tag @s add 墻
tag @a[tag=射擊,tag=!墻] remove 射擊
[射程]?8
execute @a[tag=射擊] ^ ^0.5 ^8 scoreboard players operation @e[r=1,c=1,tag=!射擊a] 傷害a=@s 傷害
execute @a[tag=射擊] ^ ^1.5 ^8 particle minecraft:balloon_gas_particle ~~~
tag @a[tag=射擊] remove 墻
execute @a[tag=射擊] ^ ^0.5 ^9 detect ~ ~1 ~ air 0 tag @s add 墻
tag @a[tag=射擊,tag=!墻] remove 射擊
tag @a[tag=射擊,tag=!墻] remove 射擊
[射程]?9
execute @a[tag=射擊] ^ ^0.5 ^9 scoreboard players operation @e[r=1,c=1,tag=!射擊a] 傷害a=@s 傷害
execute @a[tag=射擊] ^ ^1.5 ^9 particle minecraft:balloon_gas_particle ~~~tag @a[tag=射擊] remove 墻
execute @a[tag=射擊] ^ ^0.5 ^10 detect ~ ~1 ~ air 0 tag @s add 墻
tag @a[tag=射擊,tag=!墻] remove 射擊
[射程]?10
execute @a[tag=射擊] ^ ^0.5 ^10 scoreboard players operation @e[r=1,c=1,tag=!射擊a] 傷害a=@s 傷害
execute @a[tag=射擊] ^ ^1.5 ^10 particle minecraft:balloon_gas_particle ~~~
tag @a[tag=射擊] remove 墻
execute @a[tag=射擊] ^ ^0.5 ^11 detect ~ ~1 ~ air 0 tag @s add 墻
tag @a[tag=射擊,tag=!墻] remove 射擊
[射程]?11
execute @a[tag=射擊] ^ ^0.5 ^11 scoreboard players operation @e[r=1,c=1,tag=!射擊a] 傷害a=@s 傷害
execute @a[tag=射擊] ^ ^1.5 ^11 particle minecraft:balloon_gas_particle ~~~
tag @a[tag=射擊] remove 墻
execute @a[tag=射擊] ^ ^0.5 ^12 detect ~ ~1 ~ air 0 tag @s add 墻
tag @a[tag=射擊,tag=!墻] remove 射擊
[射程]?12
execute @a[tag=射擊] ^ ^0.5 ^12 scoreboard players operation @e[r=1,c=1,tag=!射擊a] 傷害a=@s 傷害
execute @a[tag=射擊] ^ ^1.5 ^12 particle minecraft:balloon_gas_particle ~~~
tag @a[tag=射擊] remove 墻
execute @a[tag=射擊] ^ ^0.5 ^13 detect ~ ~1 ~ air 0 tag @s add 墻
tag @a[tag=射擊,tag=!墻] remove 射擊
[射程]?13
execute @a[tag=射擊] ^ ^0.5 ^13 scoreboard players operation @e[r=1,c=1,tag=!射擊a] 傷害a=@s 傷害
execute @a[tag=射擊] ^ ^1.5 ^13 particle minecraft:balloon_gas_particle ~~~
tag @a[tag=射擊] remove 墻
execute @a[tag=射擊] ^ ^0.5 ^14 detect ~ ~1 ~ air 0 tag @s add 墻
tag @a[tag=射擊,tag=!墻] remove 射擊
[射程]?14
execute @a[tag=射擊] ^ ^0.5 ^14 scoreboard players operation @e[r=1,c=1,tag=!射擊a] 傷害a=@s 傷害
execute @a[tag=射擊] ^ ^1.5 ^14 particle minecraft:balloon_gas_particle ~~~
tag @a[tag=射擊] remove 墻
execute @a[tag=射擊] ^ ^0.5 ^15 detect ~ ~1 ~ air 0 tag @s add 墻
tag @a[tag=射擊,tag=!墻] remove 射擊
[射程]?15
execute @a[tag=射擊] ^ ^0.5 ^15 scoreboard players operation @e[r=1,c=1,tag=!射擊a] 傷害a=@s 傷害
execute @a[tag=射擊] ^ ^1.5 ^15 particle minecraft:balloon_gas_particle ~~~
tag @a[tag=射擊] remove 墻
execute @a[tag=射擊] ^ ^0.5 ^16 detect ~ ~1 ~ air 0 tag @s add 墻
tag @a[tag=射擊,tag=!墻] remove 射擊
[射程]?16
execute @a[tag=射擊] ^ ^0.5 ^16 scoreboard players operation @e[r=1,c=1,tag=!射擊a] 傷害a=@s 傷害
execute @a[tag=射擊] ^ ^1.5 ^16 particle minecraft:balloon_gas_particle ~~~
tag @a[tag=射擊] remove 墻
execute @a[tag=射擊] ^ ^0.5 ^17 detect ~ ~1 ~ air 0 tag @s add 墻
tag @a[tag=射擊,tag=!墻] remove 射擊
[射程]?17
execute @a[tag=射擊] ^ ^0.5 ^17 scoreboard players operation @e[r=1,c=1,tag=!射擊a] 傷害a=@s 傷害
execute @a[tag=射擊] ^ ^1.5 ^17 particle minecraft:balloon_gas_particle ~~~
tag @a[tag=射擊] remove 墻
execute @a[tag=射擊] ^ ^0.5 ^18 detect ~ ~1 ~ air 0 tag @s add 墻
tag @a[tag=射擊,tag=!墻] remove 射擊
[射程]?18
execute @a[tag=射擊] ^ ^0.5 ^18 scoreboard players operation @e[r=1,c=1,tag=!射擊a] 傷害a=@s 傷害
execute @a[tag=射擊] ^ ^1.5 ^18 particle minecraft:balloon_gas_particle ~~~
tag @a[tag=射擊] remove 墻
execute @a[tag=射擊] ^ ^0.5 ^19 detect ~ ~1 ~ air 0 tag @s add 墻
tag @a[tag=射擊,tag=!墻] remove 射擊
[射程]?19
execute @a[tag=射擊] ^ ^0.5 ^19 scoreboard players operation @e[r=1,c=1,tag=!射擊a] 傷害a=@s 傷害
execute @a[tag=射擊] ^ ^1.5 ^19 particle minecraft:balloon_gas_particle ~~~tag @a[tag=射擊] remove 墻
execute @a[tag=射擊] ^ ^0.5 ^20 detect ~ ~1 ~ air 0 tag @s add 墻
tag @a[tag=射擊,tag=!墻] remove 射擊
[射程]?20
execute @a[tag=射擊] ^ ^0.5 ^20 scoreboard players operation @e[r=1,c=1,tag=!射擊a] 傷害a=@s 傷害
execute @a[tag=射擊] ^ ^1.5 ^20 particle minecraft:balloon_gas_particle ~~~
[傷害]?
execute @e[scores={傷害a=120..},type=!item,type=!minecraft:fishing_hook] ~~~ damage @s 120 projectile entity @p[tag=射擊a]
execute @e[scores={傷害a=120..}] ~~~ scoreboard players remove @s 傷害a 120
execute @e[scores={傷害a=60..},type=!item,type=!minecraft:fishing_hook] ~~~ damage @s 60 projectile entity @p[tag=射擊a]execute @e[scores={傷害a=60..}] ~~~ scoreboard players remove @s 傷害a 60
execute @e[scores={傷害a=30..},type=!item,type=!minecraft:fishing_hook] ~~~ damage @s 30 projectile entity @p[tag=射擊a]
execute @e[scores={傷害a=30..}] ~~~ scoreboard players remove @s 傷害a 30
execute @e[scores={傷害a=16..},type=!item,type=!minecraft:fishing_hook] ~~~ damage @s 16 projectile entity @p[tag=射擊a]
execute @e[scores={傷害a=16..}] ~~~ scoreboard players remove @s 傷害a 16
execute @e[scores={傷害a=8..},type=!item,type=!minecraft:fishing_hook] ~~~ damage @s 8 projectile entity @p[tag=射擊a]
execute @e[scores={傷害a=8..}] ~~~ scoreboard players remove @s 傷害a 8
execute @e[scores={傷害a=4..},type=!item,type=!minecraft:fishing_hook] ~~~ damage @s 4 projectile entity @p[tag=射擊a]
execute @e[scores={傷害a=4..}] ~~~ scoreboard players remove @s 傷害a 4
execute @e[scores={傷害a=2..},type=!item,type=!minecraft:fishing_hook] ~~~ damage @s 2 projectile entity @p[tag=射擊a]
execute @e[scores={傷害a=2..}] ~~~ scoreboard players remove @s 傷害a 2
execute @e[scores={傷害a=1..},type=!item,type=!minecraft:fishing_hook] ~~~ damage @s 1 projectile entity @p[tag=射擊a]
execute @e[scores={傷害a=1..}] ~~~ scoreboard players remove @s 傷害a 1
tag @a[tag=墻] remove 墻
tag @a[tag=射擊] remove 射擊
tag @a[tag=射擊a] remove 射擊a
scoreboard players set @a[scores={彈藥=!25..,換彈=0},hasitem={item=diamond,quantity=1..,location=slot.weapon.mainhand}] 換彈 101
scoreboard players remove @a[scores={換彈=1..},hasitem={item=diamond,quantity=1..,location=slot.weapon.mainhand}] 換彈 1
scoreboard players set @a[scores={換彈=2},hasitem={item=diamond,quantity=1..,location=slot.weapon.mainhand}] 彈藥 25
execute @a[scores={換彈=2},hasitem={item=diamond,quantity=1..,location=slot.weapon.mainhand}] ~~~ playsound armor.equip_gold @a[r=10] ~ ~ ~
scoreboard players remove @a[scores={換彈=1..},hasitem={item=diamond,quantity=1..,location=slot.weapon.mainhand}] 換彈 1
clear @a[scores={換彈=1},hasitem={item=diamond,quantity=1..,location=slot.weapon.mainhand}] diamond 0 1
scoreboard players set @a[scores={換彈=1}] 換彈 0
execute @a[hasitem={item=diamond,quantity=1..,location=slot.weapon.mainhand}] ~~~ titleraw @s actionbar {"rawtext":[{"translate":"%%1%%2","with":{"rawtext":[{"translate":"%%7","with":{"rawtext":[{"selector":"@s[scores={換彈=..90}]"},{"selector":"@s[scores={換彈=..70}]"},{"selector":"@s[scores={換彈=..50}]"},{"selector":"@s[scores={換彈=..30}]"},{"selector":"@s[scores={換彈=..10}]"},{"selector":"@s[scores={換彈=0}]"},{"text":"§l§o§f ▅▅▅▅▅§r"},{"text":"§l§o§d ▅▅▅▅▅§r"},{"text":"§l§o§d ▅▅▅▅§f▅§r"},{"text":"§l§o§d ▅▅▅§f▅▅§r"},{"text":"§l§o§d ▅▅§f▅▅▅§r"},{"text":"§l§o§d ▅§f▅▅▅▅§r"},{"text":"§l§o§f ▅▅▅▅▅§r"}]}},{"text":"\n§c[§b正在填充彈藥§c]§r"}]}}]}
execute @a[hasitem={item=fishing_rod,location=slot.weapon.mainhand},scores={彈藥=1..}] ~ ~ ~ titleraw @s actionbar {"rawtext":[{"text":"§l§o§b彈藥§d剩余§r:"},{"score":{"name":"@s","objective":"彈藥"}},{"text":"\n§l§o§b步槍§c傷害§r:"},{"score":{"name":"@s","objective":"傷害"}},{"text":"§r"}]}
execute @a[hasitem={item=fishing_rod,location=slot.weapon.mainhand},scores={彈藥=0}] ~~~ title @s actionbar §l§o§c彈藥不足