美化README;修复restore_score.sc的bug

This commit is contained in:
MAX_小葵 2021-07-29 22:51:50 +08:00
parent d096df4784
commit a80d141be2
2 changed files with 84 additions and 62 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
global_version = '1.2.0';
global_version = '1.3.0';
__config() -> {
'scope' -> 'global',
'stay_loaded' -> false
@ -124,6 +124,7 @@ global_bl = ['stone', 'granite', 'polished_granite', 'diorite', 'polished_diorit
'cyan_candle', 'purple_candle', 'blue_candle', 'brown_candle', 'green_candle', 'red_candle', 'black_candle'
];
__restore(pl, s_player) ->(
scoreboard_remove('fz.aviate1m');
scoreboard_remove('killCounter');
scoreboard_remove('digCounter');
scoreboard_remove('deathCounter');
@ -132,6 +133,7 @@ __restore(pl, s_player) ->(
scoreboard_remove('damageTaken');
scoreboard_remove('activation');
scoreboard_remove('totalList');
scoreboard_add('fz.aviate1m');
scoreboard_add('killCounter');
scoreboard_add('digCounter');
scoreboard_add('deathCounter');
@ -147,15 +149,21 @@ __restore(pl, s_player) ->(
total_killed = 0;
total_traded = 0;
total_hurt = 0;
total_aviate = 0;
c_for(i = 0, i < length(pl), i += 1,
run('player ' + pl:i + ' spawn');
game_tick(50);
//活跃时间
actime = statistic(pl:i, 'custom', 'play_one_minute')/72000;
actime = statistic(pl:i, 'custom', 'play_time')/72000;
print(actime);
scoreboard('activation', pl:i, actime);
total_actime += actime;
//抖M榜
//滑翔距离
aviate = statistic(pl:i, 'custom', 'aviate_one_cm')/100;
print(aviate);
scoreboard('fz.aviate1m', pl:i, aviate);
total_aviate += aviate;
//受伤害榜
hurt = statistic(pl:i, 'custom', 'damage_taken')/100;
print(hurt);
scoreboard('damageTaken', pl:i, hurt);
@ -191,20 +199,22 @@ __restore(pl, s_player) ->(
total_traded += traded;
run('player ' + pl:i + ' kill')
);
scoreboard('tradingCounter', '总交易数', total_traded);
scoreboard('totalList', '总交易数', total_traded);
scoreboard('tradingCounter', '总交易数', total_traded);
scoreboard('totalList', '总交易数', total_traded);
scoreboard('killCounter', '总击杀数', total_killed);
scoreboard('totalList', '总击杀数', total_killed);
scoreboard('fishingCounter', '总钓鱼数', total_fished);
scoreboard('totalList', '总钓鱼数', total_fished);
scoreboard('digCounter', '总挖掘量', total_mined);
scoreboard('totalList', '总挖掘量', total_mined);
scoreboard('deathCounter', '全部木大', total_death);
scoreboard('totalList', '全部木大', total_death);
scoreboard('deathCounter', '总死亡数', total_death);
scoreboard('totalList', '总死亡数', total_death);
scoreboard('activation', '总在线时间(h)', total_actime);
scoreboard('totalList', '总在线时间(h)', total_actime);
scoreboard('damageTaken', '群p抖M', total_hurt);
scoreboard('totalList', '群p抖M', total_hurt);
scoreboard('damageTaken', '受伤害榜', total_hurt);
scoreboard('totalList', '总受伤害量', total_hurt);
scoreboard('fz.aviate1m', '总滑翔距离', total_aviate);
scoreboard('totalList', '总滑翔距离', total_aviate);
game_tick(50);
print('完成!');
run('function fz:scoreboards/install')