Add files via upload

This commit is contained in:
Harveykang authored and GitHub committed 2020-01-03 13:09:41 +08:00
1 parent 18b7b81844
commit 9ea7e42377
30 files changed
+139 -70

No files matched your search

@@ -0,0 +1,2 @@
scoreboard players reset @s actCounter
scoreboard players add @s activation 1
@@ -5,6 +5,8 @@ scoreboard objectives remove killCounter
scoreboard objectives remove tradingCounter
scoreboard objectives remove damageTaken
scoreboard objectives remove fishingCounter
scoreboard objectives remove activation
scoreboard objectives remove actCounter
scoreboard objectives remove totalList
scoreboard objectives remove tDigC
scoreboard objectives remove tDeathC
+24 -16
View File
@@ -1,6 +1,3 @@
#安装活跃度排行#
function fz:score/activation/install
####
#安装记分项目#
scoreboard objectives add digCounter dummy
scoreboard objectives add deathCounter deathCount
@@ -8,7 +5,9 @@ scoreboard objectives add killCounter totalKillCount
scoreboard objectives add tradingCounter minecraft.custom:minecraft.traded_with_villager
scoreboard objectives add fishingCounter minecraft.custom:minecraft.fish_caught
scoreboard objectives add damageTaken minecraft.custom:minecraft.damage_taken
scoreboard objectives add actCounter minecraft.custom:minecraft.play_one_minute
scoreboard objectives add totalList dummy
scoreboard objectives add activation dummy
####
#编辑记分项目#
scoreboard objectives modify digCounter displayname {"text":"挖掘榜","color":"gray"}
@@ -18,6 +17,7 @@ scoreboard objectives modify tradingCounter displayname {"text":"PY榜","color":
scoreboard objectives modify fishingCounter displayname {"text":"钓鱼榜","color":"blue"}
scoreboard objectives modify damageTaken displayname [{"text":"奥利给榜","color":"yellow"},{"text":"(受伤害*10)","color":"gole"}]
scoreboard objectives modify totalList displayname {"text":"统计总量","color":"light_purple"}
scoreboard objectives modify activation displayname [{"text":"活跃度排行","color":"aqua"},{"text":"(小时)","color":"gold"}]
####
#安装工具项目#
scoreboard objectives add diamond_pickaxe minecraft.used:minecraft.diamond_pickaxe
@@ -37,14 +37,16 @@ scoreboard objectives add totalDeath dummy
scoreboard objectives add totalTraded dummy
scoreboard objectives add totalFished dummy
scoreboard objectives add totalHurt dummy
scoreboard objectives add totalActivation 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
###实验性###在分项目下显示总量###活跃度的该项在其自己的安装文件内
scoreboard players set 总挖掘数 totalDug 1
scoreboard players set 总击杀数 totalKilled 1
scoreboard players set 总死亡数 totalDeath 1
scoreboard players set 总交易数 totalTraded 1
scoreboard players set 总钓鱼数 totalFished 1
scoreboard players set 总受伤害量 totalHurt 1
scoreboard players set 总活跃时间 totalActivation 1
####
#安装记分板显示#
#安装队伍
@@ -57,14 +59,17 @@ 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 add activation
team join digCounter 总挖掘数
team join killCounter 总击杀数
team join deathCounter 总死亡数
team join fishingCounter 总钓鱼数
team join tradingCounter 总交易数
team join damageTaken 总受伤害量
team join activation 总活跃时间
#安装显示
team modify displayScoresOff color dark_purple
scoreboard objectives setdisplay sidebar.team.dark_purple
team modify displayScoresOn color gold
scoreboard objectives setdisplay sidebar.team.gold totalList
team modify killCounter color red
@@ -81,6 +86,8 @@ 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
team modify activation color aqua
scoreboard objectives setdisplay sidebar.team.aqua activation
scoreboard objectives add scoreSwitch trigger
####
#安装缓存#
@@ -90,4 +97,5 @@ scoreboard objectives add tKillC dummy
scoreboard objectives add tFishC dummy
scoreboard objectives add tTradeC dummy
scoreboard objectives add tHurtC dummy
scoreboard objectives add tActC dummy
####
+20 -20
View File
@@ -1,5 +1,5 @@
#活跃度模块#
function fz:score/activation/main
execute as @a[tag=!carpetBot] if score @s actCounter matches 72000.. run function fz:score/activationcarry
####
#记分板循环#
scoreboard players add scoreboard timeCounter 1
@@ -15,7 +15,7 @@ execute if score scoreboard timeCounter matches 4800.. run scoreboard players se
####
#记分板开关#
scoreboard players enable @a scoreSwitch
execute as @a if entity @a[scores={scoreSwitch=..-1},team=!displayScoresOff] run function fz:score/teams/displayscoresoff
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
@@ -23,7 +23,7 @@ execute if entity @a[scores={scoreSwitch=4},team=!deathCounter] run function fz:
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=!activation] run function fz:score/activation/team
execute if entity @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 if entity @a[scores={scoreSwitch=10..}] run tellraw @a[scores={scoreSwitch=10..}] [{"text":"不存在编号为10及以上的记分板","color":"dark_red"}]
scoreboard players set @a[scores={scoreSwitch=..-1}] scoreSwitch 0
@@ -43,13 +43,13 @@ execute if entity @a[scores={stone_shovel=1..}] as @a[scores={stone_shovel=1..}]
####
#计算总量#
#给缓存记分板赋初始值
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 tActC matches -2147483648..2147483647 run scoreboard players operation @s tActC = @s tActC
execute as @a[tag=!carpetBot] unless score @s tDigC matches -2147483648..2147483647 run scoreboard players operation @s tDigC = @s tDigC
execute as @a[tag=!carpetBot] unless score @s tKillC matches -2147483648..2147483647 run scoreboard players operation @s tKillC = @s tKillC
execute as @a[tag=!carpetBot] unless score @s tDeathC matches -2147483648..2147483647 run scoreboard players operation @s tDeathC = @s tDeathC
execute as @a[tag=!carpetBot] unless score @s tTradeC matches -2147483648..2147483647 run scoreboard players operation @s tTradeC = @s tTradeC
execute as @a[tag=!carpetBot] unless score @s tFishC matches -2147483648..2147483647 run scoreboard players operation @s tFishC = @s tFishC
execute as @a[tag=!carpetBot] unless score @s tHurtC matches -2147483648..2147483647 run scoreboard players operation @s tHurtC = @s tHurtC
execute as @a[tag=!carpetBot] unless score @s tActC matches -2147483648..2147483647 run scoreboard players operation @s tActC = @s tActC
#两板分数不等时运行计算函数
execute as @a[tag=!carpetBot] unless score @s tDigC = @s digCounter run function fz:score/totalcalculator/tdigc
execute as @a[tag=!carpetBot] unless score @s tKillC = @s killCounter run function fz:score/totalcalculator/tkillc
@@ -57,16 +57,16 @@ execute as @a[tag=!carpetBot] unless score @s tDeathC = @s deathCounter run func
execute as @a[tag=!carpetBot] unless score @s tTradeC = @s tradingCounter run function fz:score/totalcalculator/ttradec
execute as @a[tag=!carpetBot] unless score @s tFishC = @s fishingCounter run function fz:score/totalcalculator/tfishc
execute as @a[tag=!carpetBot] unless score @s tHurtC = @s damageTaken run function fz:score/totalcalculator/thurtc
execute as @a[tag=!carpetBot] unless score @s tActC = @s activation run function fz:score/activation/totalcalculator
#总榜在分榜中显示开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
execute if score totalActivation totalActivation matches 1.. run scoreboard players operation totalActivation activation = totalActivation totalList
#总榜在分榜中显示关sc=0
execute as @a[tag=!carpetBot] unless score @s tActC = @s activation run function fz:score/totalcalculator/tactc
#总榜在分榜中显示开=1
execute if score 总挖掘数 totalDug matches 1.. run scoreboard players operation 总挖掘数 digCounter = 总挖掘数 totalList
execute if score 总击杀数 totalKilled matches 1.. run scoreboard players operation 总击杀数 killCounter = 总击杀数 totalList
execute if score 总死亡数 totalDeath matches 1.. run scoreboard players operation 总死亡数 deathCounter = 总死亡数 totalList
execute if score 总交易数 totalTraded matches 1.. run scoreboard players operation 总交易数 tradingCounter = 总交易数 totalList
execute if score 总钓鱼数 totalFished matches 1.. run scoreboard players operation 总钓鱼数 fishingCounter = 总钓鱼数 totalList
execute if score 总受伤害量 totalHurt matches 1.. run scoreboard players operation 总受伤害量 damageTaken = 总受伤害量 totalList
execute if score 总活跃时间 totalActivation matches 1.. run scoreboard players operation 总活跃时间 activation = 总活跃时间 totalList
#总榜在分榜中显示关=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
@@ -0,0 +1,3 @@
tellraw @a[scores={scoreSwitch=8},team=!activation] [{"text":"您已订阅"},{"text":"活跃度排行(小时)","color":"aqua"}]
team join activation @a[scores={scoreSwitch=8},team=!activation]
scoreboard objectives setdisplay sidebar.team.aqua activation
@@ -0,0 +1,6 @@
#计算每个玩家本游戏刻活跃度和上一游戏刻活跃度的差
scoreboard players operation @s tActC -= @s activation
#将两游戏刻活跃度的差之和加在总榜上
scoreboard players operation 总活跃时间 totalList -= @s tActC
#储存当前游戏刻的活跃度
scoreboard players operation @s tActC = @s activation
@@ -1,6 +1,6 @@
#计算每个玩家本游戏刻死亡数和上一游戏刻死亡数的差
scoreboard players operation @s tDeathC -= @s deathCounter
#将两游戏刻玩家死亡数的差之和加在总榜上
scoreboard players operation totalDeath totalList -= @s tDeathC
scoreboard players operation 总死亡数 totalList -= @s tDeathC
#储存当前游戏刻的玩家死亡数
scoreboard players operation @s tDeathC = @s deathCounter
@@ -1,6 +1,6 @@
#计算每个玩家本游戏刻挖掘量和上一游戏刻挖掘量的差
scoreboard players operation @s tDigC -= @s digCounter
#将两游戏刻玩家挖掘量的差之和加在总榜上
scoreboard players operation totalDug totalList -= @s tDigC
scoreboard players operation 总挖掘数 totalList -= @s tDigC
#储存当前游戏刻的玩家挖掘量
scoreboard players operation @s tDigC = @s digCounter
@@ -1,6 +1,6 @@
#计算每个玩家本游戏刻钓鱼数和上一游戏刻钓鱼数的差
scoreboard players operation @s tFishC -= @s fishingCounter
#将两游戏刻玩家钓鱼数的差之和加在总榜上
scoreboard players operation totalFished totalList -= @s tFishC
scoreboard players operation 总钓鱼数 totalList -= @s tFishC
#储存当前游戏刻的玩家钓鱼数
scoreboard players operation @s tFishC = @s fishingCounter
@@ -1,6 +1,6 @@
#计算每个玩家本游戏刻玩家受伤害量和上一游戏刻受伤害量的差
scoreboard players operation @s tHurtC -= @s damageTaken
#将两游戏刻玩家受伤害量的差之和加在总榜上
scoreboard players operation totalHurt totalList -= @s tHurtC
scoreboard players operation 总受伤害量 totalList -= @s tHurtC
#储存当前游戏刻的玩家受伤害量
scoreboard players operation @s tHurtC = @s damageTaken
@@ -1,6 +1,6 @@
#计算每个玩家本游戏刻玩家击杀数和上一游戏刻击杀数的差
scoreboard players operation @s tKillC -= @s killCounter
#将两游戏刻玩家击杀数的差之和加在总榜上
scoreboard players operation totalKilled totalList -= @s tKillC
scoreboard players operation 总击杀数 totalList -= @s tKillC
#储存当前游戏刻的玩家击杀数
scoreboard players operation @s tKillC = @s killCounter
@@ -1,6 +1,6 @@
#计算每个玩家本游戏刻玩家交易数和上一游戏刻交易数的差
scoreboard players operation @s tTradeC -= @s tradingCounter
#将两游戏刻玩家交易数的差之和加在总榜上
scoreboard players operation totalTraded totalList -= @s tTradeC
scoreboard players operation 总交易数 totalList -= @s tTradeC
#储存当前游戏刻的玩家交易数
scoreboard players operation @s tTradeC = @s tradingCounter
@@ -0,0 +1,2 @@
scoreboard players reset 总活跃时间 activation
scoreboard players reset 总活跃时间 totalActivation
@@ -1,2 +1,2 @@
scoreboard players reset totalHurt damageTaken
scoreboard players reset totalHurt totalHurt
scoreboard players reset 总受伤害量 damageTaken
scoreboard players reset 总受伤害量 totalHurt
@@ -1,2 +1,2 @@
scoreboard players reset totalDeath deathCounter
scoreboard players reset totalDeath totalDeath
scoreboard players reset 总死亡数 deathCounter
scoreboard players reset 总死亡数 totalDeath
@@ -1,2 +1,2 @@
scoreboard players reset totalDug digCounter
scoreboard players reset totalDug totalDug
scoreboard players reset 总挖掘数 digCounter
scoreboard players reset 总挖掘数 totalDug
@@ -1,2 +1,2 @@
scoreboard players reset totalFished fishingCounter
scoreboard players reset totalFished totalFished
scoreboard players reset 总钓鱼数 fishingCounter
scoreboard players reset 总钓鱼数 totalFished
@@ -1,2 +1,2 @@
scoreboard players reset totalKilled killCounter
scoreboard players reset totalKilled totalKilled
scoreboard players reset 总击杀数 killCounter
scoreboard players reset 总击杀数 totalKilled
@@ -1,2 +1,2 @@
scoreboard players reset totalTraded tradingCounter
scoreboard players reset totalTraded totalTraded
scoreboard players reset 总交易数 tradingCounter
scoreboard players reset 总交易数 totalTraded
+14 -2
View File
@@ -1,4 +1,5 @@
#取消记分板显示#
scoreboard objectives setdisplay sidebar.team.gold
scoreboard objectives setdisplay sidebar.team.red
scoreboard objectives setdisplay sidebar.team.gray
scoreboard objectives setdisplay sidebar.team.dark_red
@@ -25,6 +26,7 @@ scoreboard objectives remove totalDeath
scoreboard objectives remove totalTraded
scoreboard objectives remove totalFished
scoreboard objectives remove totalHurt
scoreboard objectives remove totalActivation
####
#移除队伍#
team remove displayScoresOff
@@ -35,10 +37,20 @@ team remove deathCounter
team remove tradingCounter
team remove fishingCounter
team remove damageTaken
team remove activation
####
#移除开关#
scoreboard objectives remove scoreswitch
scoreboard objectives remove scoreSwitch
####
#移除缓存#
scoreboard objectives remove tDigC
scoreboard objectives remove tDeathC
scoreboard objectives remove tKillC
scoreboard objectives remove tFishC
scoreboard objectives remove tTradeC
scoreboard objectives remove tHurtC
scoreboard objectives remove tActC
####
#询问是否移除记分板#
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}]
tellraw @a [{"text":"是否删除记分板数据?"},{"text":"(不可恢复!!)","color":"red","bold":true},{"text":"点此删除","color":"dark_red","underlined":true,"clickEvent":{"action":"run_command","value":"/function fz:score/delscores"},"hoverEvent":{"action":"show_text","value":"删除所有记分板数据"}},{"text":"(仅op)"}]
####