Add files via upload

This commit is contained in:
Harveykang 2020-01-08 20:54:52 +08:00 committed by GitHub
parent fa33dbbe3c
commit ae50b60bfc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
42 changed files with 195 additions and 66 deletions

View File

@ -1,2 +1,2 @@
#带标签的假玩家# #带标签的假玩家#
script run __command() -> ( help() ); help() ->( print('使用帮助:'); print('/script invoke summon xxx生成玩家'); print('/script invoke kill xxx删除玩家'); print('/script invoke tp xxx x y z传送假玩家xyz可替换为\"s\"来代表你的位置'); print('/script invoke killall删除全部玩家'); print('tagplayer Version: 0.0.0-SNAPSHOT-20200106.2207'); '' ); __config() -> m( l('stay_loaded', true)); global_tag = 'carpetBot'; global_tag_no_bot = 'noCarpetBot'; __check_offline(player_name) ->( if (!(player (player_name)), exit('§4假人'+player_name+'未在线'); '' ); if (!query(player(player_name),'has_tag',global_tag), exit('§4'+player_name+'不是假人'); '' ); ); __check_online(player_name) ->( if (player(player_name), if (query(player(player_name),'has_tag',global_tag), exit('§4假人'+player_name+'已经在线了'); '' ); exit('§4玩家'+player_name+'已经在线了'); '' ); ); __check_pos(x) ->( x = number(x); if(x == null, exit('§4请输入正确的坐标'); '' ); return(x) ); __check_tick(tick) ->( tick = str('%d',number(tick+0.5)); if(tick == null, exit('§4请输入正确的游戏刻间隔'); '' ); if(tick < 2, exit(str('§4整数不能小于2却发现了%d',tick)); '' ); return(tick) ); summon(player_name) ->( s_player = player(); player_name = replace(player_name, '\\s',''); __check_online(player_name); run(str('player %s spawn at %f %f %f', player_name, s_player~'x', s_player~'y', s_player~'z')); if (!(player(player_name)), exit('§4生成失败') ); if(query(player(player_name),'has_tag',global_tag_no_bot), modify(player(player_name),'clear_tag',global_tag_no_bot) ); modify(player(player_name), 'tag', global_tag); print('已为'+player_name+'添加标签 '); '' ); kill(player_name) ->( player_name = replace(player_name, '\\s',''); __check_offline(player_name); modify(player(player_name), 'tag', global_tag_no_bot); print('已将'+player(player_name)+'移交§6FZ\'sDataPack§f清除标签'); run(str('player %s kill', player_name)); game_tick(50); if(player(player_name), exit( modify(player(player_name), 'tag', global_tag); print('§4清除失败'); print('已重新添加'+player_name+'的标签'); '' ); ); print('已清除'+player_name); '' ); killall() ->( i = 0; player_list = player('all'); loop(2147483647,,, one_player = slice(player_list,i,i+1); one_player_str = join('',one_player); if(one_player_str=='', break() ); if(query(player(one_player_str),'has_tag',global_tag), do_fake_player = 1; modify(player(one_player_str), 'tag', global_tag_no_bot); run(str('player %s kill', one_player_str)); ); i = i+1; ); if(do_fake_player != 1, exit('§4不存在假人'); '' ); print('已将全部假人移交§6FZ\'sDataPack§f清除标签'); game_tick(50); print('已清除全部假人'); '' ); tp(player_name,x,y,z) ->( __check_offline(player_name); s_player = player(); if(x == 's', x = s_player~'x' ); if(y == 's', y = s_player~'y' ); if(z == 's', z = s_player~'z' ); x = __check_pos(x); y = __check_pos(y); z = __check_pos(z); run(str('tp %s %f %f %f', player_name, x, y, z)); '' ); script run __command() -> ( help() ); help() ->( print('使用帮助:'); print('/script invoke summon xxx生成玩家'); print('/script invoke kill xxx删除玩家'); print('/script invoke tp xxx x y z传送假玩家xyz可替换为\"s\"来代表你的位置'); print('/script invoke killall删除全部玩家'); print('tagplayer Version: 0.0.0-SNAPSHOT-20200106.2207'); '' ); __config() -> m( l('stay_loaded', true)); global_tag = 'carpetBot'; global_tag_no_bot = 'noCarpetBot'; __check_offline(player_name) ->( if (!(player (player_name)), exit('§4假人'+player_name+'未在线'); '' ); if (!query(player(player_name),'has_tag',global_tag), exit('§4'+player_name+'不是假人'); '' ); ); __check_online(player_name) ->( if (player(player_name), if (query(player(player_name),'has_tag',global_tag), exit('§4假人'+player_name+'已经在线了'); '' ); exit('§4玩家'+player_name+'已经在线了'); '' ); ); __check_pos(x) ->( x = number(x); if(x == null, exit('§4请输入正确的坐标'); '' ); return(x) ); __check_tick(tick) ->( tick = str('%d',number(tick+0.5)); if(tick == null, exit('§4请输入正确的游戏刻间隔'); '' ); if(tick < 2, exit(str('§4整数不能小于2却发现了%d',tick)); '' ); return(tick) ); summon(player_name) ->( s_player = player(); player_name = replace(player_name, '\\s',''); __check_online(player_name); run(str('player %s spawn at %f %f %f', player_name, s_player~'x', s_player~'y', s_player~'z')); if (!(player(player_name)), exit('§4生成失败') ); if(query(player(player_name),'has_tag',global_tag_no_bot), modify(player(player_name),'clear_tag',global_tag_no_bot) ); modify(player(player_name), 'tag', global_tag); print('已为'+player_name+'添加标签 '); '' ); kill(player_name) ->( player_name = replace(player_name, '\\s',''); __check_offline(player_name); modify(player(player_name), 'tag', global_tag_no_bot); print('已将'+player(player_name)+'移交§6FZ\'sDataPack§f清除标签'); run(str('player %s kill', player_name)); game_tick(50); if(player(player_name), exit( modify(player(player_name), 'tag', global_tag); print('§4清除失败'); print('已重新添加'+player_name+'的标签'); '' ); ); print('已清除'+player_name); '' ); killall() ->( i = 0; player_list = player('all'); loop(2147483647,,, one_player = slice(player_list,i,i+1); one_player_str = join('',one_player); if(one_player_str=='', break() ); if(query(player(one_player_str),'has_tag',global_tag), do_fake_player = 1; modify(player(one_player_str), 'tag', global_tag_no_bot) );run(str('player %s kill', one_player_str)); i = i+1; ); if(do_fake_player != 1, exit('§4不存在假人'); '' ); print('已将全部假人移交§6FZ\'sDataPack§f清除标签'); game_tick(50); print('已清除全部假人'); '' ); tp(player_name,x,y,z) ->( __check_offline(player_name); s_player = player(); if(x == 's', x = s_player~'x' ); if(y == 's', y = s_player~'y' ); if(z == 's', z = s_player~'z' ); x = __check_pos(x); y = __check_pos(y); z = __check_pos(z); run(str('tp %s %f %f %f', player_name, x, y, z)); '' );

View File

@ -0,0 +1,2 @@
tag @s remove displayCleanerBossBar
tellraw @s {"text":"您已关闭扫地姬的血条栏提示"}

View File

@ -0,0 +1,2 @@
tag @s add displayCleanerBossBar
tellraw @s {"text":"您已开启扫地姬的血条栏提示"}

View File

@ -0,0 +1,2 @@
tag @s add noDisplayCleanerChat
tellraw @s {"text":"您已关闭扫地姬的聊天栏提示"}

View File

@ -0,0 +1,2 @@
tag @s remove noDisplayCleanerChat
tellraw @s {"text":"您已开启扫地姬的聊天栏提示"}

View File

@ -1,4 +1,5 @@
execute if score cleaner cleanerBooleans matches 1 run tellraw @a [{"text":"扫地姬已关闭~","color":"green"}] execute if score cleaner cleanerBooleans matches 1 run tellraw @a [{"text":"扫地姬已关闭~","color":"green"}]
bossbar set cleaner visible false
scoreboard players set cleaner cleanerBooleans 0 scoreboard players set cleaner cleanerBooleans 0
scoreboard players set cleaner setCleanTime 0 scoreboard players set cleaner setCleanTime 0
scoreboard players set cleaner displayCleanTime 0 scoreboard players set cleaner displayCleanTime 0

View File

@ -1,6 +1,17 @@
scoreboard players operation cleaner displayCleanTime = @a[scores={cleaner=30..}] cleaner scoreboard players operation cleaner displayCleanTime = @s cleaner
scoreboard players operation cleaner setCleanTime = @a[scores={cleaner=30..}] cleaner scoreboard players operation cleaner setCleanTime = @s cleaner
scoreboard players operation cleaner setCleanTime *= 20 20 scoreboard players operation cleaner setCleanTime *= 20 20
scoreboard players operation cleaner timeCounter = cleaner setCleanTime scoreboard players operation cleaner timeCounter = cleaner setCleanTime
tellraw @a [{"text":"扫地姬已开启~","color":"green"},{"score":{"objective":"displayCleanTime","name":"cleaner"},"color":"dark_aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"游戏秒后清理掉落物~","color":"yellow"}] tellraw @a [{"text":"扫地姬已开启~","color":"green"},{"score":{"objective":"displayCleanTime","name":"cleaner"},"color":"dark_aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"游戏秒后清理掉落物~","color":"yellow"}]
scoreboard players set cleaner cleanerBooleans 1 scoreboard players set cleaner cleanerBooleans 1
execute if score cleaner setCleanTime matches 5401.. run function fz:cleaner/time/5min
execute if score cleaner setCleanTime matches 4801..5400 run function fz:cleaner/time/4min30s
execute if score cleaner setCleanTime matches 4201..4800 run function fz:cleaner/time/4min
execute if score cleaner setCleanTime matches 3601..4200 run function fz:cleaner/time/3min30s
execute if score cleaner setCleanTime matches 3001..3600 run function fz:cleaner/time/3min
execute if score cleaner setCleanTime matches 2401..3000 run function fz:cleaner/time/2min30s
execute if score cleaner setCleanTime matches 1801..2400 run function fz:cleaner/time/2min
execute if score cleaner setCleanTime matches 1201..1800 run function fz:cleaner/time/1min30s
execute if score cleaner setCleanTime matches 601..1200 run function fz:cleaner/time/60s
execute if score cleaner setCleanTime matches ..600 run function fz:cleaner/time/30s
bossbar set cleaner visible true

View File

@ -2,4 +2,9 @@ scoreboard objectives add cleaner trigger
scoreboard objectives add cleaned dummy scoreboard objectives add cleaned dummy
scoreboard objectives add cleanerBooleans dummy scoreboard objectives add cleanerBooleans dummy
scoreboard objectives add setCleanTime dummy scoreboard objectives add setCleanTime dummy
scoreboard objectives add displayCleanTime dummy scoreboard objectives add displayCleanTime dummy
scoreboard objectives add secondsCounter dummy
scoreboard objectives add cleanerBar trigger
scoreboard objectives add cleanerChat trigger
bossbar add cleaner 1
bossbar set cleaner max 60

View File

@ -1,13 +1,28 @@
scoreboard players operation cleaner secondsCounter = cleaner timeCounter
scoreboard players operation cleaner secondsCounter /= 20 20
scoreboard players operation cleaner secondsCounter += 1 1
bossbar set cleaner players @a[tag=displayCleanerBossBar]
bossbar set cleaner name [{"text":"扫地姬倒计时:"},{"score":{"objective":"secondsCounter","name":"cleaner"},"bold":true},{"text":"游戏秒后清理"}]
execute if score cleaner timeCounter matches ..0 run function fz:cleaner/subclean execute if score cleaner timeCounter matches ..0 run function fz:cleaner/subclean
execute if score cleaner timeCounter matches 6000 run tellraw @a [{"text":"5游戏分后清理掉落物~","color":"gold"}] execute if score cleaner timeCounter matches 6000 run function fz:cleaner/time/5min
execute if score cleaner timeCounter matches 3600 run tellraw @a [{"text":"3游戏分后清理掉落物~","color":"gold"}] execute if score cleaner timeCounter matches 6000 run tellraw @a[tag=!noDisplayCleanerChat] [{"text":"5游戏分后清理掉落物~","color":"green"}]
execute if score cleaner timeCounter matches 2400 run tellraw @a [{"text":"2游戏分后清理掉落物~","color":"gold"}] execute if score cleaner timeCounter matches 5400 run function fz:cleaner/time/4min30s
execute if score cleaner timeCounter matches 1200 run tellraw @a [{"text":"60游戏秒后清理掉落物~小伙伴们抓紧时间rua","color":"gold"}] execute if score cleaner timeCounter matches 4800 run function fz:cleaner/time/4min
execute if score cleaner timeCounter matches 600 run tellraw @a [{"text":"30游戏秒后清理掉落物~搞事的先停停rua","color":"red"}] execute if score cleaner timeCounter matches 4200 run function fz:cleaner/time/3min30s
execute if score cleaner timeCounter matches 200 run tellraw @a [{"text":"注意!","color":"dark_red","bold":false,"underlined":false},{"text":"10","color":"red","bold":true,"underlined":true},{"text":"游戏秒后清理掉落物~准备干活咯!","color":"dark_red","bold":false,"underlined":false}] execute if score cleaner timeCounter matches 3600 run function fz:cleaner/time/3min
execute if score cleaner timeCounter matches 100 run tellraw @a [{"text":"注意!","color":"dark_red","bold":false,"underlined":false},{"text":"5","color":"red","bold":true,"underlined":true},{"text":"游戏秒后清理掉落物~","color":"dark_red","bold":false,"underlined":false}] execute if score cleaner timeCounter matches 3600 run tellraw @a[tag=!noDisplayCleanerChat] [{"text":"3游戏分后清理掉落物~","color":"green"}]
execute if score cleaner timeCounter matches 80 run tellraw @a [{"text":"注意!","color":"dark_red","bold":false,"underlined":false},{"text":"4","color":"red","bold":true,"underlined":true},{"text":"游戏秒后清理掉落物~","color":"dark_red","bold":false,"underlined":false}] execute if score cleaner timeCounter matches 3000 run function fz:cleaner/time/2min30s
execute if score cleaner timeCounter matches 60 run tellraw @a [{"text":"注意!","color":"dark_red","bold":false,"underlined":false},{"text":"3","color":"red","bold":true,"underlined":true},{"text":"游戏秒后清理掉落物~","color":"dark_red","bold":false,"underlined":false}] execute if score cleaner timeCounter matches 2400 run function fz:cleaner/time/2min
execute if score cleaner timeCounter matches 40 run tellraw @a [{"text":"注意!","color":"dark_red","bold":false,"underlined":false},{"text":"2","color":"red","bold":true,"underlined":true},{"text":"游戏秒后清理掉落物~","color":"dark_red","bold":false,"underlined":false}] execute if score cleaner timeCounter matches 2400 run tellraw @a[tag=!noDisplayCleanerChat] [{"text":"2游戏分后清理掉落物~","color":"yellow"}]
execute if score cleaner timeCounter matches 20 run tellraw @a [{"text":"注意!","color":"dark_red","bold":false,"underlined":false},{"text":"1","color":"red","bold":true,"underlined":true},{"text":"游戏秒后清理掉落物~","color":"dark_red","bold":false,"underlined":false}] execute if score cleaner timeCounter matches 1800 run function fz:cleaner/time/1min30s
execute if score cleaner timeCounter matches 1200 run function fz:cleaner/time/60s
execute if score cleaner timeCounter matches 1200 run tellraw @a[tag=!noDisplayCleanerChat] [{"text":"60游戏秒后清理掉落物~","color":"gold"}]
execute if score cleaner timeCounter matches 600 run function fz:cleaner/time/30s
execute if score cleaner timeCounter matches 600 run tellraw @a[tag=!noDisplayCleanerChat] [{"text":"30游戏秒后清理掉落物~","color":"red"}]
execute if score cleaner timeCounter matches 200 run function fz:cleaner/time/10s
execute if score cleaner timeCounter matches 100 run function fz:cleaner/time/5s
execute if score cleaner timeCounter matches 80 run function fz:cleaner/time/4s
execute if score cleaner timeCounter matches 60 run function fz:cleaner/time/3s
execute if score cleaner timeCounter matches 40 run function fz:cleaner/time/2s
execute if score cleaner timeCounter matches 20 run function fz:cleaner/time/1s
scoreboard players remove cleaner timeCounter 1 scoreboard players remove cleaner timeCounter 1

View File

@ -1,4 +1,14 @@
execute store result score cleaned cleaned run kill @e[type=item] execute store result score cleaned cleaned run kill @e[type=item]
tellraw @a [{"text":"这次一共清理了","color":"dark_green","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"cleaned","name":"cleaned"},"color":"yellow","bold":true,"italic":false,"underlined":true,"strikethrough":false,"obfuscated":false},{"text":"堆物品~","color":"dark_green","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"下次清理将在","color":"yellow"},{"score":{"objective":"displayCleanTime","name":"cleaner"},"color":"dark_aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"游戏秒后开始~","color":"yellow"}] tellraw @a [{"text":"这次一共清理了","color":"dark_green","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"cleaned","name":"cleaned"},"color":"yellow","bold":true,"italic":false,"underlined":true,"strikethrough":false,"obfuscated":false},{"text":"堆物品~","color":"dark_green","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"下次清理将在","color":"yellow"},{"score":{"objective":"displayCleanTime","name":"cleaner"},"color":"dark_aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"游戏秒后开始~","color":"yellow"}]
scoreboard players set cleaned cleaned 0 scoreboard players reset cleaned cleaned
execute if score cleaner setCleanTime matches 5401.. run function fz:cleaner/time/5min
execute if score cleaner setCleanTime matches 4801..5400 run function fz:cleaner/time/4min30s
execute if score cleaner setCleanTime matches 4201..4800 run function fz:cleaner/time/4min
execute if score cleaner setCleanTime matches 3601..4200 run function fz:cleaner/time/3min30s
execute if score cleaner setCleanTime matches 3001..3600 run function fz:cleaner/time/3min
execute if score cleaner setCleanTime matches 2401..3000 run function fz:cleaner/time/2min30s
execute if score cleaner setCleanTime matches 1801..2400 run function fz:cleaner/time/2min
execute if score cleaner setCleanTime matches 1201..1800 run function fz:cleaner/time/1min30s
execute if score cleaner setCleanTime matches 601..1200 run function fz:cleaner/time/60s
execute if score cleaner setCleanTime matches ..600 run function fz:cleaner/time/30s
scoreboard players operation cleaner timeCounter = cleaner setCleanTime scoreboard players operation cleaner timeCounter = cleaner setCleanTime

View File

@ -0,0 +1,4 @@
tellraw @a[tag=!noDisplayCleanerChat] [{"text":"注意!","color":"dark_red","bold":false,"underlined":false},{"text":"10","color":"red","bold":true,"underlined":true},{"text":"游戏秒后清理掉落物~准备干活咯!","color":"dark_red","bold":false,"underlined":false}]
bossbar set cleaner style notched_6
bossbar set cleaner color red
bossbar set cleaner value 60

View File

@ -0,0 +1,3 @@
bossbar set cleaner style notched_10
bossbar set cleaner color green
bossbar set cleaner value 18

View File

@ -0,0 +1,4 @@
tellraw @a[tag=!noDisplayCleanerChat] [{"text":"注意!","color":"dark_red","bold":false,"underlined":false},{"text":"1","color":"red","bold":true,"underlined":true},{"text":"游戏秒后清理掉落物~准备干活咯!","color":"dark_red","bold":false,"underlined":false}]
bossbar set cleaner style notched_6
bossbar set cleaner color red
bossbar set cleaner value 10

View File

@ -0,0 +1,3 @@
bossbar set cleaner style notched_10
bossbar set cleaner color green
bossbar set cleaner value 24

View File

@ -0,0 +1,3 @@
bossbar set cleaner style notched_10
bossbar set cleaner color green
bossbar set cleaner value 30

View File

@ -0,0 +1,4 @@
tellraw @a[tag=!noDisplayCleanerChat] [{"text":"注意!","color":"dark_red","bold":false,"underlined":false},{"text":"2","color":"red","bold":true,"underlined":true},{"text":"游戏秒后清理掉落物~准备干活咯!","color":"dark_red","bold":false,"underlined":false}]
bossbar set cleaner style notched_6
bossbar set cleaner color red
bossbar set cleaner value 20

View File

@ -0,0 +1,4 @@
bossbar set cleaner style notched_10
bossbar set cleaner color yellow
bossbar set cleaner value 6
bossbar set cleaner visible true

View File

@ -0,0 +1,3 @@
bossbar set cleaner style notched_10
bossbar set cleaner color green
bossbar set cleaner value 36

View File

@ -0,0 +1,3 @@
bossbar set cleaner style notched_10
bossbar set cleaner color green
bossbar set cleaner value 42

View File

@ -0,0 +1,4 @@
tellraw @a[tag=!noDisplayCleanerChat] [{"text":"注意!","color":"dark_red","bold":false,"underlined":false},{"text":"3","color":"red","bold":true,"underlined":true},{"text":"游戏秒后清理掉落物~准备干活咯!","color":"dark_red","bold":false,"underlined":false}]
bossbar set cleaner style notched_6
bossbar set cleaner color red
bossbar set cleaner value 30

View File

@ -0,0 +1,3 @@
bossbar set cleaner style notched_10
bossbar set cleaner color green
bossbar set cleaner value 48

View File

@ -0,0 +1,3 @@
bossbar set cleaner style notched_10
bossbar set cleaner color green
bossbar set cleaner value 54

View File

@ -0,0 +1,4 @@
tellraw @a[tag=!noDisplayCleanerChat] [{"text":"注意!","color":"dark_red","bold":false,"underlined":false},{"text":"4","color":"red","bold":true,"underlined":true},{"text":"游戏秒后清理掉落物~准备干活咯!","color":"dark_red","bold":false,"underlined":false}]
bossbar set cleaner style notched_6
bossbar set cleaner color red
bossbar set cleaner value 40

View File

@ -0,0 +1,3 @@
bossbar set cleaner style notched_10
bossbar set cleaner color green
bossbar set cleaner value 60

View File

@ -0,0 +1,4 @@
tellraw @a[tag=!noDisplayCleanerChat] [{"text":"注意!","color":"dark_red","bold":false,"underlined":false},{"text":"5","color":"red","bold":true,"underlined":true},{"text":"游戏秒后清理掉落物~准备干活咯!","color":"dark_red","bold":false,"underlined":false}]
bossbar set cleaner style notched_6
bossbar set cleaner color red
bossbar set cleaner value 50

View File

@ -0,0 +1,3 @@
bossbar set cleaner style notched_10
bossbar set cleaner color yellow
bossbar set cleaner value 12

View File

@ -1,7 +1,17 @@
scoreboard players enable @a cleaner scoreboard players enable @a cleaner
execute if entity @a[scores={cleaner=..-1}] run function fz:cleaner/cleaneroff scoreboard players enable @a cleanerBar
execute if entity @a[scores={cleaner=1..29}] run tellraw @a[scores={cleaner=1..29}] [{"text":"请输入>=30的时间(单位:秒)","color":"dark_red"}] scoreboard players enable @a cleanerChat
execute if entity @a[scores={cleaner=30..}] run function fz:cleaner/cleaneron execute as @a[scores={cleaner=..-1}] run function fz:cleaner/cleaneroff
scoreboard players set @a[scores={cleaner=..-1}] cleaner 0 execute as @a[scores={cleaner=1..29}] run tellraw @s [{"text":"请输入>=30的时间(单位:秒)","color":"dark_red"}]
scoreboard players set @a[scores={cleaner=1..}] cleaner 0 execute as @a[scores={cleaner=30..}] run function fz:cleaner/cleaneron
execute as @a[scores={cleanerChat=1..},tag=noDisplayCleanerChat] run function fz:cleaner/cleanerchaton
execute as @a[scores={cleanerBar=1..},tag=!displayCleanerBossBar] run function fz:cleaner/cleanerbaron
execute as @a[scores={cleanerChat=..-1},tag=!noDisplayCleanerChat] run function fz:cleaner/cleanerchatoff
execute as @a[scores={cleanerBar=..-1},tag=displayCleanerBossBar] run function fz:cleaner/cleanerbaroff
scoreboard players reset @a[scores={cleanerChat=1..}] cleanerChat
scoreboard players reset @a[scores={cleanerBar=1..}] cleanerBar
scoreboard players reset @a[scores={cleanerChat=..-1}] cleanerChat
scoreboard players reset @a[scores={cleanerBar=..-1}] cleanerBar
scoreboard players reset @a[scores={cleaner=..-1}] cleaner
scoreboard players reset @a[scores={cleaner=1..}] cleaner
execute if score cleaner cleanerBooleans matches 1 run function fz:cleaner/main execute if score cleaner cleanerBooleans matches 1 run function fz:cleaner/main

View File

@ -2,4 +2,7 @@ scoreboard objectives remove cleaner
scoreboard objectives remove cleaned scoreboard objectives remove cleaned
scoreboard objectives remove cleanerBooleans scoreboard objectives remove cleanerBooleans
scoreboard objectives remove setCleanTime scoreboard objectives remove setCleanTime
scoreboard objectives remove displayCleanTime scoreboard objectives remove displayCleanTime
scoreboard objectives remove cleanerBar
scoreboard objectives remove cleanerChat
bossbar remove cleaner

View File

@ -3,9 +3,16 @@ function fz:noai/configs
execute if score carpet carpet matches 1.. run tellraw @s {"text":"--不计入计分板总分的假人--","color":"dark_green","bold":true} execute if score carpet carpet matches 1.. run tellraw @s {"text":"--不计入计分板总分的假人--","color":"dark_green","bold":true}
execute if score carpet carpet matches 1.. run tellraw @s [{"text":"- 生成假人:"},{"text":"/script invoke summon 玩家名","color":"green","clickEvent":{"action":"suggest_command","value":"/script invoke summon "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}] execute if score carpet carpet matches 1.. run tellraw @s [{"text":"- 生成假人:"},{"text":"/script invoke summon 玩家名","color":"green","clickEvent":{"action":"suggest_command","value":"/script invoke summon "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}]
execute if score carpet carpet matches 1.. run tellraw @s [{"text":"- 删除假人:"},{"text":"/script invoke kill 玩家名","color":"green","clickEvent":{"action":"suggest_command","value":"/script invoke kill "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}] execute if score carpet carpet matches 1.. run tellraw @s [{"text":"- 删除假人:"},{"text":"/script invoke kill 玩家名","color":"green","clickEvent":{"action":"suggest_command","value":"/script invoke kill "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}]
tellraw @s [{"text":"--扫地姬--","color":"dark_green","bold":true}] execute if score carpet carpet matches 1.. run tellraw @s [{"text":"- 删除全部假人:"},{"text":"/script invoke killall","color":"green","clickEvent":{"action":"suggest_command","value":"/script invoke kill "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}]
execute if score carpet carpet matches 1.. run tellraw @s [{"text":"- 传送假人:"},{"text":"/script invoke tp xxx x y z","color":"green","clickEvent":{"action":"suggest_command","value":"/script invoke tp "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}},{"text":"xyz可替换为\"s\"来代表你的位置","color":"white"}]
tellraw @s [{"text":"--扫地姬--"}]
tellraw @s [{"text":"- 显示方式"}]
tellraw @s [{"text":" - 血条栏:"},{"text":"[✔]","color":"dark_green","clickEvent":{"action":"run_command","value":"/trigger cleanerBar set 1"}},{"text":"[✘]","color":"dark_red","clickEvent":{"action":"run_command","value":"/trigger cleanerBar set -1"}}]
tellraw @s [{"text":" - 指令:"},{"text":"/trigger cleanerBar set -1为关/1为开","color":"green","clickEvent":{"action":"suggest_command","value":"/trigger cleanerBar set "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}]
tellraw @s [{"text":" - 聊天栏:"},{"text":"[✔]","color":"dark_green","clickEvent":{"action":"run_command","value":"/trigger cleanerChat set 1"}},{"text":"[✘]","color":"dark_red","clickEvent":{"action":"run_command","value":"/trigger cleanerChat set -1"}}]
tellraw @s [{"text":" - 指令:"},{"text":"/trigger cleanerChat set -1为关/1为开","color":"green","clickEvent":{"action":"suggest_command","value":"/trigger cleanerChat set "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}]
tellraw @s [{"text":"- 指令:"},{"text":"/trigger cleaner set -1为关/秒数(≥30)为开","color":"green","clickEvent":{"action":"suggest_command","value":"/trigger cleaner set "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}] tellraw @s [{"text":"- 指令:"},{"text":"/trigger cleaner set -1为关/秒数(≥30)为开","color":"green","clickEvent":{"action":"suggest_command","value":"/trigger cleaner set "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}]
tellraw @s [{"text":"- 预设:"},{"text":"[OFF]","color":"dark_red","clickEvent":{"action":"run_command","value":"/trigger cleaner set -1"}},{"text":"[30s]","color":"red","clickEvent":{"action":"run_command","value":"/trigger cleaner set 30"}},{"text":"[1min]","color":"gold","clickEvent":{"action":"run_command","value":"/trigger cleaner set 60"}},{"text":"[2min]","color":"yellow","clickEvent":{"action":"run_command","value":"/trigger cleaner set 120"}},{"text":"[3min]","color":"green","clickEvent":{"action":"run_command","value":"/trigger cleaner set 180"}},{"text":"[5min]","color":"dark_green","clickEvent":{"action":"run_command","value":"/trigger cleaner set 300"}}] tellraw @s [{"text":"- 预设:"},{"text":"[]","color":"dark_red","clickEvent":{"action":"run_command","value":"/trigger cleaner set -1"}},{"text":"[30s]","color":"red","clickEvent":{"action":"run_command","value":"/trigger cleaner set 30"}},{"text":"[1min]","color":"gold","clickEvent":{"action":"run_command","value":"/trigger cleaner set 60"}},{"text":"[2min]","color":"yellow","clickEvent":{"action":"run_command","value":"/trigger cleaner set 120"}},{"text":"[3min]","color":"green","clickEvent":{"action":"run_command","value":"/trigger cleaner set 180"}},{"text":"[5min]","color":"dark_green","clickEvent":{"action":"run_command","value":"/trigger cleaner set 300"}}]
tellraw @s {"text":"--记分板--","color":"dark_green","bold":true} tellraw @s {"text":"--记分板--","color":"dark_green","bold":true}
tellraw @s [{"text":"- 指令:"},{"text":"/trigger scoreSwitch set -1为关/1-9为开","color":"green","clickEvent":{"action":"suggest_command","value":"/trigger scoreSwitch set "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}] tellraw @s [{"text":"- 指令:"},{"text":"/trigger scoreSwitch set -1为关/1-9为开","color":"green","clickEvent":{"action":"suggest_command","value":"/trigger scoreSwitch set "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}]
tellraw @s [{"text":"[OFF]","color":"dark_red","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set -1"}},{"text":"[轮播]","color":"dark_green","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 1"}},{"text":"[击杀榜]","color":"red","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 2"}},{"text":"[挖掘榜]","color":"gray","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 3"}},{"text":"[死亡榜]","color":"dark_red","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 4"}},{"text":"[交易榜]","color":"green","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 5"}},{"text":"[钓鱼榜]","color":"blue","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 6"}},{"text":"[奥里给!]","color":"yellow","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 7"}},{"text":"[活跃度]","color":"aqua","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 8"}},{"text":"[统计总量]","color":"light_purple","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 9"}}] tellraw @s [{"text":"[]","color":"dark_red","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set -1"}},{"text":"[轮播]","color":"dark_green","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 1"}},{"text":"[击杀榜]","color":"red","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 2"}},{"text":"[挖掘榜]","color":"gray","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 3"}},{"text":"[死亡榜]","color":"dark_red","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 4"}},{"text":"[交易榜]","color":"green","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 5"}},{"text":"[钓鱼榜]","color":"blue","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 6"}},{"text":"[奥里给!]","color":"yellow","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 7"}},{"text":"[活跃度]","color":"aqua","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 8"}},{"text":"[统计总量]","color":"light_purple","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 9"}}]

View File

@ -12,9 +12,12 @@ scoreboard players operation version version = version version
execute if score version version matches ..132 run function fz:updatebeforeinstall133 execute if score version version matches ..132 run function fz:updatebeforeinstall133
execute if score version version matches 133 run function fz:updatebeforeinstall134 execute if score version version matches 133 run function fz:updatebeforeinstall134
#### ####
gamerule disableElytraMovementCheck true
scoreboard objectives add timeCounter dummy scoreboard objectives add timeCounter dummy
scoreboard objectives add 20 dummy scoreboard objectives add 20 dummy
scoreboard objectives add 1 dummy
scoreboard players set 20 20 20 scoreboard players set 20 20 20
scoreboard players set 1 1 1
function fz:carpet/install function fz:carpet/install
function fz:score/install function fz:score/install
function fz:health/install function fz:health/install

View File

@ -1,3 +1,4 @@
execute as @a unless score @s leaveGame matches -2147483648..2147483647 run scoreboard players operation @s leaveGame = @s leaveGame
tellraw @a[scores={leaveGame=0..}] [{"text":"使用"},{"text":"/trigger cleaner set -1或≥30(单位:秒)","underlined":true,"clickEvent":{"action":"suggest_command","value":"/trigger cleaner set "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}},{"text":"来关/开扫地姬"}] tellraw @a[scores={leaveGame=0..}] [{"text":"使用"},{"text":"/trigger cleaner set -1或≥30(单位:秒)","underlined":true,"clickEvent":{"action":"suggest_command","value":"/trigger cleaner set "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}},{"text":"来关/开扫地姬"}]
tellraw @a[scores={leaveGame=0..}] [{"text":"使用"},{"text":"/trigger scoreswitch set -1或1-9","underlined":true,"clickEvent":{"action":"suggest_command","value":"/trigger scoreswitch set "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}},{"text":"来关/开记分板"}] tellraw @a[scores={leaveGame=0..}] [{"text":"使用"},{"text":"/trigger scoreswitch set -1或1-9","underlined":true,"clickEvent":{"action":"suggest_command","value":"/trigger scoreswitch set "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}},{"text":"来关/开记分板"}]
execute if score carpet carpet matches 1.. run tellraw @a[scores={leaveGame=0..}] [{"text":"务必使用","color":"dark_red"},{"text":"/script invoke summon 玩家名","underlined":true,"color":"red","clickEvent":{"action":"suggest_command","value":"/script invoke summon "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}},{"text":"召唤假人,可以避免将他们计入记分板总分!","color":"dark_red"}] execute if score carpet carpet matches 1.. run tellraw @a[scores={leaveGame=0..}] [{"text":"务必使用","color":"dark_red"},{"text":"/script invoke summon 玩家名","underlined":true,"color":"red","clickEvent":{"action":"suggest_command","value":"/script invoke summon "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}},{"text":"召唤假人,可以避免将他们计入记分板总分!","color":"dark_red"}]

View File

@ -15,31 +15,31 @@ execute if score scoreboard timeCounter matches 4800.. run scoreboard players se
#### ####
#记分板开关# #记分板开关#
scoreboard players enable @a scoreSwitch scoreboard players enable @a scoreSwitch
execute if entity @a[scores={scoreSwitch=..-1},team=!displayScoresOff] run function fz:score/teams/displayscoresoff execute as @a[scores={scoreSwitch=..-1},team=!displayScoresOff] run function fz:score/teams/displayscoresoff
execute if entity @a[scores={scoreSwitch=1},team=!displayScoresOn] run function fz:score/teams/displayscoreson execute as @a[scores={scoreSwitch=1},team=!displayScoresOn] run function fz:score/teams/displayscoreson
execute if entity @a[scores={scoreSwitch=2},team=!killCounter] run function fz:score/teams/killcounter execute as @a[scores={scoreSwitch=2},team=!killCounter] run function fz:score/teams/killcounter
execute if entity @a[scores={scoreSwitch=3},team=!digCounter] run function fz:score/teams/digcounter execute as @a[scores={scoreSwitch=3},team=!digCounter] run function fz:score/teams/digcounter
execute if entity @a[scores={scoreSwitch=4},team=!deathCounter] run function fz:score/teams/deathcounter execute as @a[scores={scoreSwitch=4},team=!deathCounter] run function fz:score/teams/deathcounter
execute if entity @a[scores={scoreSwitch=5},team=!tradingCounter] run function fz:score/teams/tradingcounter execute as @a[scores={scoreSwitch=5},team=!tradingCounter] run function fz:score/teams/tradingcounter
execute if entity @a[scores={scoreSwitch=6},team=!fishingCounter] run function fz:score/teams/fishingcounter execute as @a[scores={scoreSwitch=6},team=!fishingCounter] run function fz:score/teams/fishingcounter
execute if entity @a[scores={scoreSwitch=7},team=!damageTaken] run function fz:score/teams/damagetaken execute as @a[scores={scoreSwitch=7},team=!damageTaken] run function fz:score/teams/damagetaken
execute if entity @a[scores={scoreSwitch=8},team=!activation] run function fz:score/teams/activation execute as @a[scores={scoreSwitch=8},team=!activation] run function fz:score/teams/activation
execute if entity @a[scores={scoreSwitch=9},team=!totalList] run function fz:score/teams/totallist execute as @a[scores={scoreSwitch=9},team=!totalList] run function fz:score/teams/totallist
execute if entity @a[scores={scoreSwitch=10..}] run tellraw @a[scores={scoreSwitch=10..}] [{"text":"不存在编号为10及以上的记分板","color":"dark_red"}] execute as @a[scores={scoreSwitch=10..}] run tellraw @a[scores={scoreSwitch=10..}] [{"text":"不存在编号为10及以上的记分板","color":"dark_red"}]
scoreboard players set @a[scores={scoreSwitch=..-1}] scoreSwitch 0 scoreboard players set @a[scores={scoreSwitch=..-1}] scoreSwitch 0
scoreboard players set @a[scores={scoreSwitch=1..}] scoreSwitch 0 scoreboard players set @a[scores={scoreSwitch=1..}] scoreSwitch 0
team join displayScoresOff @a[team=] team join displayScoresOff @a[team=]
#### ####
#添加工具计入挖掘量# #添加工具计入挖掘量#
execute if entity @a[scores={diamond_pickaxe=1..}] as @a[scores={diamond_pickaxe=1..}] run function fz:score/tools/diamond_pickaxe execute as @a[scores={diamond_pickaxe=1..}] run function fz:score/tools/diamond_pickaxe
execute if entity @a[scores={iron_pickaxe=1..}] as @a[scores={iron_pickaxe=1..}] run function fz:score/tools/iron_pickaxe execute as @a[scores={iron_pickaxe=1..}] run function fz:score/tools/iron_pickaxe
execute if entity @a[scores={stone_pickaxe=1..}] as @a[scores={stone_pickaxe=1..}] run function fz:score/tools/stone_pickaxe execute as @a[scores={stone_pickaxe=1..}] run function fz:score/tools/stone_pickaxe
execute if entity @a[scores={diamond_axe=1..}] as @a[scores={diamond_axe=1..}] run function fz:score/tools/diamond_axe execute as @a[scores={diamond_axe=1..}] run function fz:score/tools/diamond_axe
execute if entity @a[scores={iron_axe=1..}] as @a[scores={iron_axe=1..}] run function fz:score/tools/iron_axe execute as @a[scores={iron_axe=1..}] run function fz:score/tools/iron_axe
execute if entity @a[scores={stone_axe=1..}] as @a[scores={stone_axe=1..}] run function fz:score/tools/stone_axe execute as @a[scores={stone_axe=1..}] run function fz:score/tools/stone_axe
execute if entity @a[scores={diamond_shovel=1..}] as @a[scores={diamond_shovel=1..}] run function fz:score/tools/diamond_shovel execute as @a[scores={diamond_shovel=1..}] run function fz:score/tools/diamond_shovel
execute if entity @a[scores={iron_shovel=1..}] as @a[scores={iron_shovel=1..}] run function fz:score/tools/iron_shovel execute as @a[scores={iron_shovel=1..}] run function fz:score/tools/iron_shovel
execute if entity @a[scores={stone_shovel=1..}] as @a[scores={stone_shovel=1..}] run function fz:score/tools/stone_shovel execute as @a[scores={stone_shovel=1..}] run function fz:score/tools/stone_shovel
#### ####
#计算总量# #计算总量#
#给缓存记分板赋初始值 #给缓存记分板赋初始值

View File

@ -1,3 +1,3 @@
tellraw @a[scores={scoreSwitch=8},team=!activation] [{"text":"您已订阅"},{"text":"活跃度排行(小时)","color":"aqua"}] tellraw @s [{"text":"您已订阅"},{"text":"活跃度排行(小时)","color":"aqua"}]
team join activation @a[scores={scoreSwitch=8},team=!activation] team join activation @s
scoreboard objectives setdisplay sidebar.team.aqua activation scoreboard objectives setdisplay sidebar.team.aqua activation

View File

@ -1,3 +1,3 @@
tellraw @a[scores={scoreSwitch=7},team=!damageTaken] [{"text":"您已订阅"},{"text":"老八的彻shuǒ","color":"yellow"}] tellraw @s [{"text":"您已订阅"},{"text":"老八的彻shuǒ","color":"yellow"}]
team join damageTaken @a[scores={scoreSwitch=7},team=!damageTaken] team join damageTaken @s
scoreboard objectives setdisplay sidebar.team.yellow damageTaken scoreboard objectives setdisplay sidebar.team.yellow damageTaken

View File

@ -1,3 +1,3 @@
tellraw @a[scores={scoreSwitch=4},team=!deathCounter] [{"text":"您已订阅"},{"text":"死亡榜","color":"dark_red"}] tellraw @s [{"text":"您已订阅"},{"text":"死亡榜","color":"dark_red"}]
team join deathCounter @a[scores={scoreSwitch=4},team=!deathCounter] team join deathCounter @s
scoreboard objectives setdisplay sidebar.team.dark_red deathCounter scoreboard objectives setdisplay sidebar.team.dark_red deathCounter

View File

@ -1,3 +1,3 @@
tellraw @a[scores={scoreSwitch=3},team=!digCounter] [{"text":"您已订阅"},{"text":"挖掘榜","color":"gray"}] tellraw @s [{"text":"您已订阅"},{"text":"挖掘榜","color":"gray"}]
team join digCounter @a[scores={scoreSwitch=3},team=!digCounter] team join digCounter @s
scoreboard objectives setdisplay sidebar.team.gray digCounter scoreboard objectives setdisplay sidebar.team.gray digCounter

View File

@ -1,2 +1,2 @@
tellraw @a[scores={scoreSwitch=..-1},team=!displayScoresOff] [{"text":"您已退订记分板"}] tellraw @s [{"text":"您已退订记分板"}]
team join displayScoresOff @a[scores={scoreSwitch=..-1},team=!displayScoresOff] team join displayScoresOff @s

View File

@ -1,2 +1,2 @@
tellraw @a[scores={scoreSwitch=1},team=!displayScoresOn] [{"text":"正在循环播放记分板"}] tellraw @s [{"text":"正在循环播放记分板"}]
team join displayScoresOn @a[scores={scoreSwitch=1},team=!displayScoresOn] team join displayScoresOn @s

View File

@ -1,3 +1,3 @@
tellraw @a[scores={scoreSwitch=6},team=!fishingCounter] [{"text":"您已订阅"},{"text":"钓鱼榜","color":"blue"}] tellraw @s [{"text":"您已订阅"},{"text":"钓鱼榜","color":"blue"}]
team join fishingCounter @a[scores={scoreSwitch=6},team=!fishingCounter] team join fishingCounter @s
scoreboard objectives setdisplay sidebar.team.blue fishingCounter scoreboard objectives setdisplay sidebar.team.blue fishingCounter

View File

@ -1,3 +1,3 @@
tellraw @a[scores={scoreSwitch=2},team=!killCounter] [{"text":"您已订阅"},{"text":"击杀榜","color":"red"}] tellraw @s [{"text":"您已订阅"},{"text":"击杀榜","color":"red"}]
team join killCounter @a[scores={scoreSwitch=2},team=!killCounter] team join killCounter @s
scoreboard objectives setdisplay sidebar.team.red killCounter scoreboard objectives setdisplay sidebar.team.red killCounter

View File

@ -1,3 +1,3 @@
tellraw @a[scores={scoreSwitch=9},team=!totalList] [{"text":"您已订阅"},{"text":"统计总量","color":"light_purple"}] tellraw @s [{"text":"您已订阅"},{"text":"统计总量","color":"light_purple"}]
team join totalList @a[scores={scoreSwitch=9},team=!totalList] team join totalList @s
scoreboard objectives setdisplay sidebar.team.light_purple totalList scoreboard objectives setdisplay sidebar.team.light_purple totalList

View File

@ -1,3 +1,3 @@
tellraw @a[scores={scoreSwitch=5},team=!tradingCounter] [{"text":"您已订阅"},{"text":"交易榜","color":"green"}] tellraw @s [{"text":"您已订阅"},{"text":"交易榜","color":"green"}]
team join tradingCounter @a[scores={scoreSwitch=5},team=!tradingCounter] team join tradingCounter @s
scoreboard objectives setdisplay sidebar.team.green tradingCounter scoreboard objectives setdisplay sidebar.team.green tradingCounter