- UID
- 135638
- 阅读权限
- 30
- 注册时间
- 2017-5-6
- 最后登录
- 1970-1-1
- 在线时间
- 小时
- 人气
- 点
- MC币
- 个
- 贡献
- 点
TA的每日心情 | 怒 2018-5-31 08:38 |
---|
签到天数: 1 天 [LV.1]初来乍到
|
[ 本帖最后由 aa1771336151 于 2019-5-21 13:21 编辑 ]\n\n============================标题:适用于多人生存的多功能书 (是否适用于服务器待定)原作者:橙子Mikan最后一次更新时间:2019.5.8 23:00============================主体书:/give Allening minecraft:written_book{pages:['{"text":"【传送列表】\\n\\n",color:red,bold:true,hoverEvent:{action:show_text,value:{text:"(点击下列地点即可传送)",color:blue}},extra:[{"text":"Teleport to point 1\\n",color:dark_green,underlined:true,clickEvent:{action:run_command,value:"/trigger A set 1"},hoverEvent:{action:show_text,value:{text:"点击进行传送1",color:yellow}}},{text:"(添加描述)\\n",color:blue,bold:false,hoverEvent:{action:show_text,value:{text:"地点描述",color:white}}},{text:"Teleport to point 2\\n",color:dark_green,underlined:true,clickEvent:{action:run_command,value:"/trigger A set 2"},hoverEvent:{action:show_text,value:{text:"点击进行传送2",color:yellow}}},{text:"(添加描述)\\n",color:blue,bold:false,hoverEvent:{action:show_text,value:{text:"地点描述",color:white}}},{text:"Teleport to point 3\\n",color:dark_green,underlined:true,clickEvent:{action:run_command,value:"/trigger A set 3"},hoverEvent:{action:show_text,value:{text:"点击进行传送3",color:yellow}}},{text:"(添加描述)\\n",color:blue,bold:false,hoverEvent:{action:show_text,value:{text:"地点描述",color:white}}},{text:"Teleport to point 4\\n",color:dark_green,underlined:true,clickEvent:{action:run_command,value:"/trigger A set 4"},hoverEvent:{action:show_text,value:{text:"点击进行传送4",color:yellow}}},{text:"(添加描述)\\n",color:blue,bold:false,hoverEvent:{action:show_text,value:{text:"地点描述",color:white}}},{text:"\\n\\n\\n下一页-功能列表\\n",color:blue,underlined:true,hoverEvent:{action:show_text,value:{text:"(支持更多功能)",color:blue}}}]}','
/give Allening minecraft:written_book{pages:['{"text":"【传送列表】\\n\\n",color:red,bold:true,hoverEvent:{action:show_text,value:{text:"(点击下列地点即可传送)",color:blue}},extra:[{"text":"Teleport to point 1\\n",color:dark_green,underlined:true,clickEvent:{action:run_command,value:"/trigger A set 1"},hoverEvent:{action:show_text,value:{text:"回出生点",color:yellow}}},{text:"(添加描述)\\n",color:blue,bold:false,hoverEvent:{action:show_text,value:{text:"出生点禁止破坏,农田摘了及时补种",color:white}}},{text:"Teleport to point 2\\n",color:dark_green,underlined:true,clickEvent:{action:run_command,value:"/trigger A set 2"},hoverEvent:{action:show_text,value:{text:"地点描述",color:yellow}}},{text:"(添加描述)\\n",color:blue,bold:false,hoverEvent:{action:show_text,value:{text:"地点描述",color:white}}},{text:"Teleport to point 3\\n",color:dark_green,underlined:true,clickEvent:{action:run_command,value:"/trigger A set 3"},hoverEvent:{action:show_text,value:{text:"点击进行传送3",color:yellow}}},{text:"(添加描述)\\n",color:blue,bold:false,hoverEvent:{action:show_text,value:{text:"地点描述",color:white}}},{text:"Teleport to point 4\\n",color:dark_green,underlined:true,clickEvent:{action:run_command,value:"/trigger A set 4"},hoverEvent:{action:show_text,value:{text:"点击进行传送4",color:yellow}}},{text:"(添加描述)\\n",color:blue,bold:false,hoverEvent:{action:show_text,value:{text:"地点描述",color:white}}},{text:"\\n\\n\\n下一页-功能列表\\n",color:blue,underlined:true,hoverEvent:{action:show_text,value:{text:"(支持更多功能)",color:blue}}}]}'],author:"Rin_Arashi",title:"MultiFunBook.v1",Unbreakable:true,ench:[{id:3,lvl:3}],display:{Name:"{\"text\":\"官方主群:194736921\",\"color\":\"yellow\",\"bold\":true,\"italic\":false}",Lore:["194736921"]},AttributeModifiers:[{Slot:"offhand",AttributeName:"generic.luck",Name:"Luck",Amount:0.15,Operation:1,UUIDLeast:1,UUIDMost:1},{Slot:"mainhand",AttributeName:"generic.movementSpeed",Name:"MoveSpeed",Amount:0.075,Operation:1,UUIDLeast:1,UUIDMost:1}]}{"text":"【功能列表】\\n\\n",color:red,bold:true,hoverEvent:{action:show_text,value:{text:"(单击功能即可激活)",color:blue}},extra:[{"text":"全体玩家发光\\n\\n",color:gold,underlined:true,clickEvent:{action:run_command,value:"/trigger B set 1"},hoverEvent:{action:show_text,value:{text:"获得一个无粒子的永久发光效果",color:yellow}}},{"text":"自我救赎\\n\\n",color:dark_red,underlined:true,clickEvent:{action:run_command,value:"/trigger B set 2"},hoverEvent:{action:show_text,value:{text:"谨慎使用!",color:red}}},{text:"\\n\\n\\n\\n\\n\\n\\n下一页-积分商城\\n",color:blue,underlined:true,hoverEvent:{action:show_text,value:{text:"(在这里消费积分)",color:blue}}}]}','{"text":"【积分商城】\\n\\n",color:blue,bold:true,hoverEvent:{action:show_text,value:{text:"(需要积分才可操作,若积分不足则无法生效)",color:yellow}},extra:[{"text":"超级挖掘\\n\\n",color:green,underlined:true,clickEvent:{action:run_command,value:"/trigger B set 3"},hoverEvent:{action:show_text,value:{text:"快速挖掘90s需要200积分",color:yellow}}},{"text":"佛系传送\\n\\n",color:gold,underlined:true,clickEvent:{action:run_command,value:"/trigger B set 4"},hoverEvent:{action:show_text,value:{text:"传送至最远的一个玩家需要125积分",color:yellow}}},{"text":"感知之眼\\n\\n",color:red,underlined:true,clickEvent:{action:run_command,value:"/trigger B set 5"},hoverEvent:{action:show_text,value:{text:"感知所有生物2min需要250积分\\n(不包括新生成的生物)",color:yellow}}},{text:"\\n\\n\\n\\n\\n下一页-队伍更变\\n",color:blue,underlined:true,hoverEvent:{action:show_text,value:{text:"(在这里改变队伍)",color:blue}}}]}','{"text":"【队伍更变】\\n\\n",color:green,bold:true,hoverEvent:{action:show_text,value:{text:"(单击加入队伍)",color:blue}},extra:[{"text":"玩家队伍\\n\\n",color:dark_green,underlined:true,clickEvent:{action:run_command,value:"/trigger C set 1"},hoverEvent:{action:show_text,value:{text:"队伍颜色为天蓝",color:aqua}}},{"text":"怪物队伍\\n\\n",color:dark_green,underlined:true,clickEvent:{action:run_command,value:"/trigger C set 2"},hoverEvent:{action:show_text,value:{text:"队伍颜色为红色",color:red}}},{"text":"生物队伍\\n\\n",color:dark_green,underlined:true,clickEvent:{action:run_command,value:"/trigger C set 3"},hoverEvent:{action:show_text,value:{text:"队伍颜色为绿色",color:green}}},{"text":"退出当前队伍\\n\\n",color:red,underlined:true,clickEvent:{action:run_command,value:"/trigger C set 4"},hoverEvent:{action:show_text,value:{text:"你将不属于任何队伍!",color:yellow}}},{text:"\\n\\n\\n下一页-特效选项\\n",color:blue,underlined:true,hoverEvent:{action:show_text,value:{text:"(加且只能加持一种特效)",color:blue}}}]}','{"text":"【特效选项】\\n\\n",color:gold,bold:true,extra:[{"text":"火焰围绕 ",color:red,hoverEvent:{action:show_text,value:{text:"火焰粒子在你身上",color:yellow}}},{"text":"开启",color:green,underlined:true,clickEvent:{action:run_command,value:"/trigger D set 1"}},{"text":" "},{"text":"关闭\\n",color:red,underlined:true,clickEvent:{action:run_command,value:"/trigger D set 9"}},{"text":"云雾飘渺 ",color:red,hoverEvent:{action:show_text,value:{text:"头顶一片小云朵",color:yellow}}},{"text":"开启",color:green,underlined:true,clickEvent:{action:run_command,value:"/trigger D set 2"}},{"text":" "},{"text":"关闭\\n",color:red,underlined:true,clickEvent:{action:run_command,value:"/trigger D set 9"}},{"text":"悦动音符 ",color:red,hoverEvent:{action:show_text,value:{text:"响起多彩音符",color:yellow}}},{"text":"开启",color:green,underlined:true,clickEvent:{action:run_command,value:"/trigger D set 3"}},{"text":" "},{"text":"关闭\\n",color:red,underlined:true,clickEvent:{action:run_command,value:"/trigger D set 9"}},{"text":"烛光掠影 ",color:red,hoverEvent:{action:show_text,value:{text:"闪光多变",color:yellow}}},{"text":"开启",color:green,underlined:true,clickEvent:{action:run_command,value:"/trigger D set 4"}},{"text":" "},{"text":"关闭\\n",color:red,underlined:true,clickEvent:{action:run_command,value:"/trigger D set 9"}}]}','{"text":"【后言】\\n\\n",color:dark_purple,bold:true,extra:[{"text":"其实一开始只是1.14多人生存时突发奇想搞一个众多服务器的钟表菜单,那时候1.14还没有插件和各种功能完整的服务器出现,于是我就想着用书来搞一个类似钟表菜单的操作\\n ",color:dark_gray,italic:true},{"text":"这几连串代码也是边写边想了三天,从最开始的传送列表到功能列表,再由队伍类的更新到特效加持",color:dark_gray,italic:true}]}','{"text":"\\n我觉得这本书用在多人联机生存是恰到好处,比如发光什么的可以更容易找自己机友了,快速挖掘也省了辛苦挖大半天的时间,虽然积分系统存在不足,还有组队功能等(懒得更新了),但多少能为多人生存增加一些乐趣。当然这些只在1.14forge和插件开发齐全之前\\n不管怎么说,最后感谢你的",color:dark_gray,italic:true,bold:true}]}','{"text":"使用,如在使用过程中有什么新的想法欢迎修改我的代码 (^_^)\\n\\n-橙子Mikan",color:dark_gray,italic:true,bold:true}]}'],author:"Mikan",title:"MultiFunBook.v1",Unbreakable:true,display:{Name:"{\"text\":\"多功能工具书ver.3\",\"color\":\"yellow\",\"bold\":true,\"italic\":false}",Lore:["20190508"]},AttributeModifiers:[{Slot:"offhand",AttributeName:"generic.luck",Name:"Luck",Amount:0.15,Operation:1,UUIDLeast:1,UUIDMost:1},{Slot:"mainhand",AttributeName:"generic.movementSpeed",Name:"MoveSpeed",Amount:0.075,Operation:1,UUIDLeast:1,UUIDMost:1}]}
=========计分板释义:A:传送操作B:功能操作C:队伍操作D:特效操作=========HandCommand:需要手打/scoreboard objectives add A trigger "Teleport"/scoreboard objectives add Kill totalKillCount {"text":"[积分]","color":"green","bold":"true"}/scoreboard objectives setdisplay sidebar Kill
/scoreboard objectives add B trigger "Skill"/scoreboard players enable @a B
/scoreboard objectives add C trigger "Team"/scoreboard players enable @a C
/scoreboard objectives add D trigger "Particle"/scoreboard players enable @a D
/team add 1 "Player"/team modify 1 color aqua
/team add 2 "Monster"/team modify 2 color red
/team add 3 "Friendly"/team modify 3 color green
================指令方块阵列:( 格式通式: 1.循环-不受制约-始终启动 2.连锁-条件制约-始终启动 3.同2 4.同2 (如有更多指令,以此类推) )
Command Blocks:As:/tp @a[scores={A=1~4}] x y z 对应4个传送地点
比如tp @a[scores={A=1}] x y ztp @a[scores={A=2] x y ztp @a[scores={A=3}] x y z/execute at @a[scores={A=1~4}] run playsound minecraft:entity.enderman.teleport ambient @a[scores={A=1~4}] ~ ~ ~ 1/scoreboard players set @a 1 0/scoreboard players set @a 2 0/scoreboard players set @a 3 0/scoreboard players set @a 4 0/scoreboard players enable @a 1/scoreboard players enable @a 2/scoreboard players enable @a 3/scoreboard players enable @a 4
Bs:(1)/tellraw @a [{"selector":"@a[scores={B=1}]"},{"text":"使用了","color":"white"},{"text":"[全体玩家发光]","color":"gold"}]/effect give @a minecraft:glowing 32767 0 true/scoreboard players set @a B 0/scoreboard players enable @a B
(2)/kill @a[scores={B=2}]/scoreboard players set @a B 0/scoreboard players enable @a B
(3)/tellraw @a[scores={B=3,Kill=200..}] {"text":"激活成功!"}/effect give @a[scores={B=3}] minecraft:haste 90 4/tellraw @a [{"selector":"@a[scores={B=3}]"},{"text":"消耗了200积分,使用","color":"white"},{"text":"[超级挖掘]","color":"green"}]/scoreboard players remove @a[scores={B=3}] Kill 200/scoreboard players set @a B 0/scoreboard players enable @a B
(3-1)/tellraw @a[scores={B=3,Kill=..200}] {"text":"激活失败,积分不足"}/scoreboard players set @a B 0/scoreboard players enable @a B
(4)/tellraw @a[scores={B=4,Kill=125..}] {"text":"激活成功!"}/tp @a[scores={B=4}] @p[sort=furthest]/tellraw @a [{"selector":"@a[scores={B=4}]"},{"text":" 消耗125积分,传送至最远的一个玩家","color":"white"}]/scoreboard players remove @a[scores={B=4}] Kill 125/execute at @a[scores={B=4}] run playsound minecraft:ui.toast.out ambient @a[scores={B=4}] ~ ~ ~ 1/scoreboard players set @a B 0/scoreboard players enable @a B
(4-1)/tellraw @a[scores={B=4,Kill=..125}] {"text":"激活失败,积分不足"}/scoreboard players set @a B 0/scoreboard players enable @a B
(5):/tellraw @a[scores={B=5,Kill=250..}] {"text":"激活成功!"}/scoreboard players remove @a[scores={B=5}] Kill 250/tellraw @a [{"selector":"@a[scores={B=5}]"},{"text":"消耗了250积分,使用","color":"white"},{"text":"[感知之眼]","color":"red"}]/effect give @e[type=!player] minecraft:glowing 120 0 true/scoreboard players set @a B 0/scoreboard players enable @a B
(5-1)/tellraw @a[scores={B=5,Kill=..250}] {"text":"激活失败,积分不足"}/scoreboard players set @a B 0/scoreboard players enable @a B
Cs:(1)/team join 1 @a[scores={C=1}]/tellraw @a [{"selector":"@a[scores={C=1}]"},{"text":"加入了","color":"white"},{"text":"[玩家队伍]","color":"aqua"}]/scoreboard players set @a C 0/scoreboard players enable @a C
(2)/team join 2 @a[scores={C=2}]/tellraw @a [{"selector":"@a[scores={C=2}]"},{"text":"加入了","color":"white"},{"text":"[怪物队伍]","color":"red"}]/scoreboard players set @a C 0/scoreboard players enable @a C
(3)/team join 3 @a[scores={C=3}]/tellraw @a [{"selector":"@a[scores={C=3}]"},{"text":"加入了","color":"white"},{"text":"[生物队伍]","color":"green"}]/scoreboard players set @a C 0/scoreboard players enable @a C
(4)/team leave @a[scores={C=4}]/tellraw @a [{"selector":"@a[scores={C=4}]"},{"text":"不属于任何队伍","color":"white"}]/scoreboard players set @a C 0/scoreboard players enable @a C
Ds:(1)/execute at @a[scores={D=1}] run particle minecraft:flame ~ ~ ~ 0.2 0.2 0.2 0.05 2 force/scoreboard players enable @a[scores={D=1}] D/execute at @a[scores={D=1}] run playsound minecraft:entity.ghast.shoot ambient @a[scores={D=1}] ~ ~ ~ 1
(2)/execute at @a[scores={D=2}] run particle minecraft:cloud ~ ~3 ~ 0.5 0.1 0.5 0.001 2 normal/scoreboard players enable @a[scores={D=2}] D/playsound minecraft:entity.ender_dragon.flap ambient @a[scores={D=2}] ~ ~ ~ 1
(3)/execute at @a[scores={D=3}] run particle minecraft:note ~ ~ ~ 0.5 0.8 0.5 10 1 normal/scoreboard players enable @a[scores={D=3}] D/playsound minecraft:block.note_block.bell ambient @a[scores={D=3}] ~ ~ ~ 1
(4)/execute at @a[scores={D=4}] run particle minecraft:end_rod ~ ~ ~ 0.1 0.5 0.1 0.1 1 normal/scoreboard players enable @a[scores={D=4}] D/playsound minecraft:block.note_block.bit ambient @a[scores={D=4}] ~ ~ ~ 1
(D-1)/execute at @a[scores={D=9}] run playsound minecraft:entity.arrow.hit_player player @a[scores={D=9}] ~ ~ ~ 1/tellraw @a[scores={D=9}] {"text":"已关闭所有粒子特效"}/scoreboard players set @a D 0/scoreboard players enable @a D
==========================已知问题:1.若玩家/trigger任意[组]的变量调到其他指令方块没有侦测的数值,该玩家就无法再继续其他操作了,除非对该玩家enable该[组]所以才用书本代替手输指令,避免出错。 1-建议:除了设置如上指令方块阵列之外,还应该再设置一组玩家可激活的debug组:(scoreboard players set @a A~D 0 x4)
2.书上积分列表的[佛系传送]的传送对象会始终时自己,也就是自己tp自己,选择器判定什么的我懒得更了(至少现在不会继续更) 2-建议:佛系,顾名思义,不如改成tp的玩家对象为random,提示语言也可以调“XX随机传送至一名玩家” 关于传送至最远的这一代码写法,如果你能想出来也可以自己写个更好的XDDD
3.更多可能存在的问题未发现========================== |
|