添加分数恢复脚本

This commit is contained in:
延皓
2022-07-26 07:57:04 +08:00
parent 5520832d55
commit 3ce37c9abf
29 changed files with 331 additions and 129 deletions
@@ -1 +0,0 @@
scoreboard players remove @s fz.event.play_ticks 1
@@ -3,7 +3,8 @@ scoreboard objectives add fz.event.aviating_distance minecraft.custom:aviate_one
scoreboard objectives add fz.event.damage_taken minecraft.custom:damage_taken
scoreboard objectives add fz.event.death_count deathCount
scoreboard objectives add fz.event.leave_game minecraft.custom:leave_game
scoreboard objectives add fz.event.play_ticks minecraft.custom:play_time
### #fz:game_event/on_tick
scoreboard objectives add fz.event.play_ticks dummy
scoreboard objectives add fz.event.villager_trade minecraft.custom:traded_with_villager
## 使
+1 -1
View File
@@ -1,4 +1,4 @@
execute as @a run function #fz:game_event/player/on_login
execute as @a[predicate=fz:is_real_player] run function #fz:game_event/player/on_login
##
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "已加载系统组件:游戏事件"}]
@@ -0,0 +1 @@
scoreboard players add @a[predicate=fz:is_real_player] fz.event.play_ticks 1
@@ -4,4 +4,4 @@
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "挖掘了方块"}]
##
function #fz:game_event/player/on_broke_block
function #fz:game_event/player/on_broke_block_with_tool
@@ -33,4 +33,4 @@ scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.use
scoreboard players operation fz.var.score fz.variable.integer += @s fz.event.used_tool.offset
##
execute unless score fz.var.score fz.variable.integer matches ..0 run function fz:game_event/player/on_broke_block
execute unless score fz.var.score fz.variable.integer matches ..0 run function fz:game_event/player/on_broke_block_with_tool
@@ -1,3 +1,3 @@
# 本目录用于存放向事件中注册的函数,并不用来新建事件
execute if score @s fz.module.interactor.player.config matches 1 if entity @s[x_rotation = -90] run function #fz:module/interactor/display
execute unless score @s fz.module.interactor.player.config matches -1 if entity @s[x_rotation = -90] run function #fz:module/interactor/display
@@ -3,5 +3,5 @@ execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @
execute if data storage fz:installed fz.module{last_death:1b} run tellraw @s {"text": "交互器打开方式:"}
execute if data storage fz:installed fz.module{last_death:1b} if score @s fz.module.interactor.player.config matches 1 run tellraw @s [{"text": "- 抬头+蹲起:"}, [{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "点击关闭"}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.interactor.trigger set 900"}},{"text": "已开启", "color": "green"},{"text": "]"}]]
execute if data storage fz:installed fz.module{last_death:1b} unless score @s fz.module.interactor.player.config matches 1 run tellraw @s [{"text": "- 抬头+蹲起:"}, [{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "点击开启"}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.interactor.trigger set 910"}},{"text": "已关闭", "color": "red"},{"text": "]"}]]
execute if data storage fz:installed fz.module{last_death:1b} unless score @s fz.module.interactor.player.config matches -1 run tellraw @s [{"text": "- 抬头+蹲起:"}, [{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "点击关闭"}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.interactor.trigger set 900"}},{"text": "已开启", "color": "green"},{"text": "]"}]]
execute if data storage fz:installed fz.module{last_death:1b} if score @s fz.module.interactor.player.config matches -1 run tellraw @s [{"text": "- 抬头+蹲起:"}, [{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "点击开启"}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.interactor.trigger set 910"}},{"text": "已关闭", "color": "red"},{"text": "]"}]]
@@ -3,6 +3,6 @@
##
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "玩家"}, {"selector": "@s"}, {"text": "的交互器分数为:"}, {"score": {"name": "@s", "objective": "fz.module.interactor.trigger"}}]
execute if score @s fz.module.interactor.trigger matches 900 run scoreboard players set @s fz.module.interactor.player.config 0
execute if score @s fz.module.interactor.trigger matches 900 run scoreboard players set @s fz.module.interactor.player.config -1
execute if score @s fz.module.interactor.trigger matches 910 run scoreboard players set @s fz.module.interactor.player.config 1
execute if score @s fz.module.interactor.trigger matches 910 run scoreboard players set @s fz.module.interactor.player.config 0
@@ -1,6 +1,6 @@
# 调用者:#fz:module/interactor/reset_trigger
scoreboard players reset @s fz.module.interactor.trigger
scoreboard players set @s fz.module.interactor.trigger 0
scoreboard players enable @s fz.module.interactor.trigger
##
@@ -20,5 +20,27 @@ scoreboard objectives remove fz.module.scoreboard.display.kill_count
###
scoreboard objectives remove fz.module.scoreboard.display.trade_count
##
###
team remove fz.module.scoreboard.display.carousel
###
team remove fz.module.scoreboard.display.general
###
team remove fz.module.scoreboard.display.activation
###
team remove fz.module.scoreboard.display.aviating_distance
###
team remove fz.module.scoreboard.display.damage_taken
###
team remove fz.module.scoreboard.display.death_count
###
team remove fz.module.scoreboard.display.dig_count
###
team remove fz.module.scoreboard.display.fishing_count
###
team remove fz.module.scoreboard.display.kill_count
###
team remove fz.module.scoreboard.display.trade_count
##
execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "level.info", "interpret": true, "storage": "fz:logger"}, {"text": "已删除计分板数据!"}]
@@ -51,6 +51,11 @@ team add fz.module.scoreboard.display.placement_count
scoreboard objectives add fz.module.scoreboard.display.trade_count dummy
team add fz.module.scoreboard.display.trade_count
team add fz.module.scoreboard.fake
team add fz.module.scoreboard.shadow
team modify fz.module.scoreboard.fake prefix {"text": "假的"}
team modify fz.module.scoreboard.shadow prefix {"text": "挂机"}
##
data modify storage fz:installed fz.module.scoreboard set value 1b
@@ -3,28 +3,6 @@
##
schedule clear fz:module/scoreboard/display/carousel/loop
##
###
team remove fz.module.scoreboard.display.carousel
###
team remove fz.module.scoreboard.display.general
###
team remove fz.module.scoreboard.display.activation
###
team remove fz.module.scoreboard.display.aviating_distance
###
team remove fz.module.scoreboard.display.damage_taken
###
team remove fz.module.scoreboard.display.death_count
###
team remove fz.module.scoreboard.display.dig_count
###
team remove fz.module.scoreboard.display.fishing_count
###
team remove fz.module.scoreboard.display.kill_count
###
team remove fz.module.scoreboard.display.trade_count
##
scoreboard objectives setdisplay sidebar.team.aqua
scoreboard objectives setdisplay sidebar.team.black
@@ -43,6 +21,9 @@ scoreboard objectives setdisplay sidebar.team.red
scoreboard objectives setdisplay sidebar.team.white
scoreboard objectives setdisplay sidebar.team.yellow
team remove fz.module.scoreboard.fake
team remove fz.module.scoreboard.shadow
##
execute if score fz.logger.level fz.variable.integer matches ..600 run tellraw @s [{"nbt": "fz.level.alert", "interpret": true, "storage": "fz:logger"}, {"text": "您要删除计分板数据吗,它将会永久失去!(真的很久!)"}, {"text": "[确定]", "color": "dark_red", "clickEvent": {"action": "suggest_command", "value": "/function #fz:module/scoreboard/clear_data"}, "hoverEvent": {"action": "show_text", "contents": {"text": "将命令填入聊天框"}}}]
@@ -1 +1 @@
script run if (system_info('app_list') ~ 'fzsd_ignore_fakeplayer_scores' == null, run('script load fzsd_ignore_fakeplayer_scores'))
script run if (system_info('app_list') ~ 'fz_score' == null, run('script load fz_score'))
-1
View File
@@ -1 +0,0 @@
execute as @a if predicate fz:not_real_player run function #fz:game_event/carpet_player/tick