!10 美化README;修复restore_scores.sc的各种bug

Merge pull request !10 from MAX_小葵/2.1-no-memes
This commit is contained in:
延皓 2021-08-02 22:31:10 +00:00 committed by Gitee
commit eaea64cd2d
2 changed files with 84 additions and 62 deletions

108
README.md

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