Add files via upload

This commit is contained in:
Harveykang
2019-12-12 00:07:07 +08:00
committed by GitHub
commit 9085a7c974
55 changed files with 439 additions and 0 deletions
@@ -0,0 +1,17 @@
#移除基础记分板#
scoreboard objectives remove digCounter
scoreboard objectives remove deathCounter
scoreboard objectives remove killCounter
scoreboard objectives remove tradingCounter
scoreboard objectives remove damageTaken
scoreboard objectives remove fishingCounter
scoreboard objectives remove totalList
scoreboard objectives remove tDigC
scoreboard objectives remove tDeathC
scoreboard objectives remove tKillC
scoreboard objectives remove tFishC
scoreboard objectives remove tTradeC
scoreboard objectives remove tHurtC
#提示信息
tellraw @a [{"text":"记分板已移除"}]
####
@@ -0,0 +1,81 @@
#安装记分项目#
scoreboard objectives add digCounter dummy {"text":"挖掘榜","color":"gray"}
scoreboard objectives add deathCounter deathCount {"text":"死亡榜","color":"dark_red"}
scoreboard objectives add killCounter totalKillCount {"text":"击杀榜","color":"red"}
scoreboard objectives add tradingCounter minecraft.custom:minecraft.traded_with_villager {"text":"PY榜","color":"green"}
scoreboard objectives add fishingCounter minecraft.custom:minecraft.fish_caught {"text":"钓鱼榜","color":"blue"}
scoreboard objectives add damageTaken minecraft.custom:minecraft.damage_taken [{"text":"奥利给榜","color":"yellow"},{"text":"(伤害*10)","color":"gole"}]
scoreboard objectives add totalList dummy {"text":"统计总量","color":"light_purple"}
####
#安装工具项目#
scoreboard objectives add diamond_pickaxe minecraft.used:minecraft.diamond_pickaxe
scoreboard objectives add diamond_axe minecraft.used:minecraft.diamond_axe
scoreboard objectives add diamond_shovel minecraft.used:minecraft.diamond_shovel
scoreboard objectives add iron_pickaxe minecraft.used:minecraft.iron_pickaxe
scoreboard objectives add iron_axe minecraft.used:minecraft.iron_axe
scoreboard objectives add iron_shovel minecraft.used:minecraft.iron_shovel
scoreboard objectives add stone_pickaxe minecraft.used:minecraft.stone_pickaxe
scoreboard objectives add stone_axe minecraft.used:minecraft.stone_axe
scoreboard objectives add stone_shovel minecraft.used:minecraft.stone_shovel
####
#安装统计项目#
scoreboard objectives add totalDug dummy
scoreboard objectives add totalKilled dummy
scoreboard objectives add totalDeath dummy
scoreboard objectives add totalTraded dummy
scoreboard objectives add totalFished dummy
scoreboard objectives add totalHurt dummy
####
###实验性###在分项目下显示总量###
scoreboard players set totalDug totalDug 1
scoreboard players set totalKilled totalKilled 1
scoreboard players set totalDeath totalDeath 1
scoreboard players set totalTraded totalTraded 1
scoreboard players set totalFished totalFished 1
scoreboard players set totalHurt totalHurt 1
####
#安装记分板显示#
#安装队伍
team add displayScoresOff
team add displayScoresOn
team add killCounter
team add digCounter
team add deathCounter
team add tradingCounter
team add fishingCounter
team add damageTaken
team add totalList
team join digCounter totalDug
team join killCounter totalKilled
team join deathCounter totalDeath
team join fishingCounter totalFished
team join tradingCounter totalTraded
team join damageTaken totalHurt
#安装显示
team modify displayScoresOff color dark_purple
team modify displayScoresOn color gold
scoreboard objectives setdisplay sidebar.team.gold totalList
team modify killCounter color red
scoreboard objectives setdisplay sidebar.team.red killCounter
team modify digCounter color gray
scoreboard objectives setdisplay sidebar.team.gray digCounter
team modify deathCounter color dark_red
scoreboard objectives setdisplay sidebar.team.dark_red deathCounter
team modify tradingCounter color green
scoreboard objectives setdisplay sidebar.team.green tradingCounter
team modify fishingCounter color blue
scoreboard objectives setdisplay sidebar.team.blue fishingCounter
team modify damageTaken color yellow
scoreboard objectives setdisplay sidebar.team.yellow damageTaken
team modify totalList color light_purple
scoreboard objectives setdisplay sidebar.team.light_purple totalList
scoreboard objectives add scoreswitch trigger
####
#安装缓存#
scoreboard objectives add tDigC dummy
scoreboard objectives add tDeathC dummy
scoreboard objectives add tKillC dummy
scoreboard objectives add tFishC dummy
scoreboard objectives add tTradeC dummy
scoreboard objectives add tHurtC dummy
####
+68
View File
@@ -0,0 +1,68 @@
#记分板循环#
scoreboard players add scoreboard timeCounter 1
execute if score scoreboard timeCounter matches 600 run scoreboard objectives setdisplay sidebar.team.gold killCounter
execute if score scoreboard timeCounter matches 1200 run scoreboard objectives setdisplay sidebar.team.gold digCounter
execute if score scoreboard timeCounter matches 1800 run scoreboard objectives setdisplay sidebar.team.gold deathCounter
execute if score scoreboard timeCounter matches 2400 run scoreboard objectives setdisplay sidebar.team.gold tradingCounter
execute if score scoreboard timeCounter matches 3000 run scoreboard objectives setdisplay sidebar.team.gold fishingCounter
execute if score scoreboard timeCounter matches 3600 run scoreboard objectives setdisplay sidebar.team.gold damageTaken
execute if score scoreboard timeCounter matches 4200 run scoreboard objectives setdisplay sidebar.team.light_purple totalList
execute if score scoreboard timeCounter matches 4200.. run scoreboard players set scoreboard timeCounter 0
####
#记分板开关#
scoreboard players enable @a scoreswitch
execute if entity @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 if entity @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 if entity @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 if entity @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 if entity @a[scores={scoreswitch=8},team=!totalList] run function fz:score/teams/totallist
execute if entity @a[scores={scoreswitch=9..}] run tellraw @a[scores={scoreswitch=9..}] [{"text":"不存在编号为9及以上的记分板","color":"dark_red"}]
scoreboard players set @a[scores={scoreswitch=..-1}] scoreswitch 0
scoreboard players set @a[scores={scoreswitch=1..}] scoreswitch 0
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 if entity @a[scores={iron_pickaxe=1..}] 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 if entity @a[scores={diamond_axe=1..}] 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 if entity @a[scores={stone_axe=1..}] 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 if entity @a[scores={iron_shovel=1..}] 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 unless score @s tDigC matches -2147483648..2147483647 run scoreboard players operation @s tDigC = @s tDigC
execute as @a unless score @s tKillC matches -2147483648..2147483647 run scoreboard players operation @s tKillC = @s tKillC
execute as @a unless score @s tDeathC matches -2147483648..2147483647 run scoreboard players operation @s tDeathC = @s tDeathC
execute as @a unless score @s tTradeC matches -2147483648..2147483647 run scoreboard players operation @s tTradeC = @s tTradeC
execute as @a unless score @s tFishC matches -2147483648..2147483647 run scoreboard players operation @s tFishC = @s tFishC
execute as @a unless score @s tHurtC matches -2147483648..2147483647 run scoreboard players operation @s tHurtC = @s tHurtC
#两板分数不等时运行计算函数
execute as @a unless score @s tDigC = @s digCounter run function fz:score/totalcalculator/tdigc
execute as @a unless score @s tKillC = @s killCounter run function fz:score/totalcalculator/tkillc
execute as @a unless score @s tDeathC = @s deathCounter run function fz:score/totalcalculator/tdeathc
execute as @a unless score @s tTradeC = @s tradingCounter run function fz:score/totalcalculator/ttradec
execute as @a unless score @s tFishC = @s fishingCounter run function fz:score/totalcalculator/tfishc
execute as @a unless score @s tHurtC = @s damageTaken run function fz:score/totalcalculator/thurtc
#总榜在分榜中显示开sc=1
execute if score totalDug totalDug matches 1.. run scoreboard players operation totalDug digCounter = totalDug totalList
execute if score totalKilled totalKilled matches 1.. run scoreboard players operation totalKilled killCounter = totalKilled totalList
execute if score totalDeath totalDeath matches 1.. run scoreboard players operation totalDeath deathCounter = totalDeath totalList
execute if score totalTraded totalTraded matches 1.. run scoreboard players operation totalTraded tradingCounter = totalTraded totalList
execute if score totalFished totalFished matches 1.. run scoreboard players operation totalFished fishingCounter = totalFished totalList
execute if score totalHurt totalHurt matches 1.. run scoreboard players operation totalHurt damageTaken = totalHurt totalList
#总榜在分榜中显示关sc=0
#execute if score totalDug totalDug matches ..0 run function fz:score/totalnodisplay/digcounter
#execute if score totalKilled totalKilled matches ..0 run function fz:score/totalnodisplay/killcounter
#execute if score totalDeath totalDeath matches ..0 run function fz:score/totalnodisplay/deathcounter
#execute if score totalTraded totalTraded matches ..0 run function fz:score/totalnodisplay/tradingcounter
#execute if score totalFished totalFished matches ..0 run function fz:score/totalnodisplay/fishingcounter
#execute if score totalHurt totalHurt matches ..0 run function fz:score/totalnodisplay/damagetaken
####
@@ -0,0 +1,3 @@
tellraw @a[scores={scoreswitch=7},team=!damageTaken] [{"text":"您已订阅"},{"text":"老八的彻shuǒ","color":"yellow"}]
team join damageTaken @a[scores={scoreswitch=7},team=!damageTaken]
scoreboard objectives setdisplay sidebar.team.yellow damageTaken
@@ -0,0 +1,3 @@
tellraw @a[scores={scoreswitch=4},team=!deathCounter] [{"text":"您已订阅"},{"text":"死亡榜","color":"dark_red"}]
team join deathCounter @a[scores={scoreswitch=4},team=!deathCounter]
scoreboard objectives setdisplay sidebar.team.dark_red deathCounter
@@ -0,0 +1,3 @@
tellraw @a[scores={scoreswitch=3},team=!digCounter] [{"text":"您已订阅"},{"text":"挖掘榜","color":"gray"}]
team join digCounter @a[scores={scoreswitch=3},team=!digCounter]
scoreboard objectives setdisplay sidebar.team.gray digCounter
@@ -0,0 +1,2 @@
tellraw @a[scores={scoreswitch=..-1},team=!displayScoresOff] [{"text":"您已退订记分板"}]
team join displayScoresOff @a[scores={scoreswitch=..-1},team=!displayScoresOff]
@@ -0,0 +1,2 @@
tellraw @a[scores={scoreswitch=1},team=!displayScoresOn] [{"text":"正在循环播放记分板"}]
team join displayScoresOn @a[scores={scoreswitch=1},team=!displayScoresOn]
@@ -0,0 +1,3 @@
tellraw @a[scores={scoreswitch=6},team=!fishingCounter] [{"text":"您已订阅"},{"text":"钓鱼榜","color":"blue"}]
team join fishingCounter @a[scores={scoreswitch=6},team=!fishingCounter]
scoreboard objectives setdisplay sidebar.team.blue fishingCounter
@@ -0,0 +1,3 @@
tellraw @a[scores={scoreswitch=2},team=!killCounter] [{"text":"您已订阅"},{"text":"击杀榜","color":"red"}]
team join killCounter @a[scores={scoreswitch=2},team=!killCounter]
scoreboard objectives setdisplay sidebar.team.red killCounter
@@ -0,0 +1,3 @@
tellraw @a[scores={scoreswitch=8},team=!totalList] [{"text":"您已订阅"},{"text":"统计总量","color":"light_purple"}]
team join totalList @a[scores={scoreswitch=8},team=!totalList]
scoreboard objectives setdisplay sidebar.team.light_purple totalList
@@ -0,0 +1,3 @@
tellraw @a[scores={scoreswitch=5},team=!tradingCounter] [{"text":"您已订阅"},{"text":"交易榜","color":"green"}]
team join tradingCounter @a[scores={scoreswitch=5},team=!tradingCounter]
scoreboard objectives setdisplay sidebar.team.green tradingCounter
@@ -0,0 +1,2 @@
scoreboard players operation @s digCounter += @s diamond_axe
scoreboard players reset @s diamond_axe
@@ -0,0 +1,2 @@
scoreboard players operation @s digCounter += @s diamond_pickaxe
scoreboard players reset @s diamond_pickaxe
@@ -0,0 +1,2 @@
scoreboard players operation @s digCounter += @s diamond_shovel
scoreboard players reset @s diamond_shovel
@@ -0,0 +1,2 @@
scoreboard players operation @s digCounter += @s iron_axe
scoreboard players reset @s iron_axe
@@ -0,0 +1,2 @@
scoreboard players operation @s digCounter += @s iron_pickaxe
scoreboard players reset @s iron_pickaxe
@@ -0,0 +1,2 @@
scoreboard players operation @s digCounter += @s iron_shovel
scoreboard players reset @s iron_shovel
@@ -0,0 +1,2 @@
scoreboard players operation @s digCounter += @s stone_axe
scoreboard players reset @s stone_axe
@@ -0,0 +1,2 @@
scoreboard players operation @s digCounter += @s stone_pickaxe
scoreboard players reset @s stone_pickaxe
@@ -0,0 +1,2 @@
scoreboard players operation @s digCounter += @s stone_shovel
scoreboard players reset @s stone_shovel
@@ -0,0 +1,6 @@
#计算每个玩家本游戏刻挖掘量和上一游戏刻死亡数的差
scoreboard players operation @s tDeathC -= @s deathCounter
#将两游戏刻玩家死亡数的差之和加在总榜上
scoreboard players operation totalDeath totalList -= @s tDeathC
#储存当前游戏刻的玩家死亡数
scoreboard players operation @s tDeathC = @s deathCounter
@@ -0,0 +1,6 @@
#计算每个玩家本游戏刻挖掘量和上一游戏刻挖掘量的差
scoreboard players operation @s tDigC -= @s digCounter
#将两游戏刻玩家挖掘量的差之和加在总榜上
scoreboard players operation totalDug totalList -= @s tDigC
#储存当前游戏刻的玩家挖掘量
scoreboard players operation @s tDigC = @s digCounter
@@ -0,0 +1,6 @@
#计算每个玩家本游戏刻挖掘量和上一游戏刻钓鱼数的差
scoreboard players operation @s tFishC -= @s fishingCounter
#将两游戏刻玩家钓鱼数的差之和加在总榜上
scoreboard players operation totalFished totalList -= @s tFishC
#储存当前游戏刻的玩家钓鱼数
scoreboard players operation @s tFishC = @s fishingCounter
@@ -0,0 +1,6 @@
#计算每个玩家本游戏刻挖掘量和上一游戏刻受伤害量的差
scoreboard players operation @s tHurtC -= @s damageTaken
#将两游戏刻玩家受伤害量的差之和加在总榜上
scoreboard players operation totalHurt totalList -= @s tHurtC
#储存当前游戏刻的玩家受伤害量
scoreboard players operation @s tHurtC = @s damageTaken
@@ -0,0 +1,6 @@
#计算每个玩家本游戏刻挖掘量和上一游戏刻击杀数的差
scoreboard players operation @s tKillC -= @s killCounter
#将两游戏刻玩家击杀数的差之和加在总榜上
scoreboard players operation totalKilled totalList -= @s tKillC
#储存当前游戏刻的玩家击杀数
scoreboard players operation @s tKillC = @s killCounter
@@ -0,0 +1,6 @@
#计算每个玩家本游戏刻挖掘量和上一游戏刻交易数的差
scoreboard players operation @s tTradeC -= @s tradingCounter
#将两游戏刻玩家交易数的差之和加在总榜上
scoreboard players operation totalTraded totalList -= @s tTradeC
#储存当前游戏刻的玩家交易数
scoreboard players operation @s tTradeC = @s tradingCounter
@@ -0,0 +1,2 @@
scoreboard players reset totalHurt damageTaken
scoreboard players reset totalHurt totalHurt
@@ -0,0 +1,2 @@
scoreboard players reset totalDeath deathCounter
scoreboard players reset totalDeath totalDeath
@@ -0,0 +1,2 @@
scoreboard players reset totalDug digCounter
scoreboard players reset totalDug totalDug
@@ -0,0 +1,2 @@
scoreboard players reset totalFished fishingCounter
scoreboard players reset totalFished totalFished
@@ -0,0 +1,2 @@
scoreboard players reset totalKilled killCounter
scoreboard players reset totalKilled totalKilled
@@ -0,0 +1,2 @@
scoreboard players reset totalTraded tradingCounter
scoreboard players reset totalTraded totalTraded
@@ -0,0 +1,44 @@
#取消记分板显示#
scoreboard objectives setdisplay sidebar.team.red
scoreboard objectives setdisplay sidebar.team.gray
scoreboard objectives setdisplay sidebar.team.dark_red
scoreboard objectives setdisplay sidebar.team.green
scoreboard objectives setdisplay sidebar.team.blue
scoreboard objectives setdisplay sidebar.team.yellow
scoreboard objectives setdisplay sidebar.team.light_purple
####
#移除工具项目#
scoreboard objectives remove diamond_pickaxe
scoreboard objectives remove diamond_axe
scoreboard objectives remove diamond_shovel
scoreboard objectives remove iron_pickaxe
scoreboard objectives remove iron_axe
scoreboard objectives remove iron_shovel
scoreboard objectives remove stone_pickaxe
scoreboard objectives remove stone_axe
scoreboard objectives remove stone_shovel
####
#移除统计项目#
scoreboard objectives remove totalDug
scoreboard objectives remove totalKilled
scoreboard objectives remove totalDeath
scoreboard objectives remove totalTraded
scoreboard objectives remove totalFished
scoreboard objectives remove totalHurt
####
#移除队伍#
team remove displayScoresOff
team remove displayScoresOn
team remove killCounter
team remove digCounter
team remove deathCounter
team remove tradingCounter
team remove fishingCounter
team remove damageTaken
####
#移除开关#
scoreboard objectives remove scoreswitch
####
#询问是否移除记分板#
tellraw @a [{"text":"是否删除记分板数据?","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"点此删除","color":"dark_red","bold":true,"italic":false,"underlined":true,"strikethrough":false,"obfuscated":false,"clickEvent":{"action":"run_command","value":"/function fz:score/delscores"},"hoverEvent":{"action":"show_text","value":"删除所有记分板数据"}},{"text":"(仅op)","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
####