diff --git a/common/stats.tf b/common/stats.tf index 3e973d0..db46629 100644 --- a/common/stats.tf +++ b/common/stats.tf @@ -162,9 +162,7 @@ /set _postepy_current=%{__postep}%;\ /endif -/def postepy = /_postepy_show_times - -/def _postepy_show_times = \ +/def postepy = \ /let __index=0%; \ /echo +--------------+-------+-----+-----+%; \ /while ({__index}<={_postepy_current}) \ diff --git a/nightal/sets.tf b/nightal/sets.tf index e69de29..f2bafbc 100644 --- a/nightal/sets.tf +++ b/nightal/sets.tf @@ -0,0 +1 @@ +/set _postepy_reset_counter=1 diff --git a/nightal/stats.tf b/nightal/stats.tf index bcc91b9..300e2e5 100644 --- a/nightal/stats.tf +++ b/nightal/stats.tf @@ -23,6 +23,46 @@ kolosalne|\ nieopisane +/def postepy = \ + /if ({1} =~ "reset") \ + /set _postepy_last_reset_time=$[ftime("%H:%M", time())]%;\ + /set _postepy_last_reset_own=%ownkills%;\ + /set _postepy_last_reset_all=%allkills%;\ + /test ++_postepy_reset_counter%;\ + /set _postepy_current=0%;\ + /send postepy reset%;\ + /else \ + /let __index=0%; \ + /echo +---------------+-------------------+%;\ + /echo $[strcat("| ", pad("cykl", -14), "|", pad({_postepy_reset_counter}, 18), " |")]%;\ + /echo +---------------+-------+-----+-----+%; \ + /if ({_postepy_reset_counter} > 1) \ + /echo $[strcat("| ", pad("ostatni reset",-14), "| ", pad({_postepy_last_reset_time},5), " |", pad({_postepy_last_reset_own},4), " |", pad({_postepy_last_reset_all},4), " |")]%;\ + /echo +---------------+-------+-----+-----+%;\ + /endif %;\ + /while ({__index}<={_postepy_current}) \ + /let __postep=$[_get_element({__index}, {_postepy_list})]%;\ + /let __czas=$(/listvar -v _postepy_czas_$[strcat({__index})])%;\ + /let __own=$(/listvar -v _postepy_own_$[strcat({__index})])%;\ + /let __all=$(/listvar -v _postepy_all_$[strcat({__index})])%;\ + /if ({__czas} =~ "" )\ + /let __czas=?:?%;\ + /endif%;\ + /if ({__own} =~ "" )\ + /let __own=?%;\ + /endif%;\ + /if ({__all} =~ "" )\ + /let __all=?%;\ + /endif%;\ + /echo $[strcat("| ", pad({__postep},-14), "| ", pad({__czas},5), " |", pad({__own},4), " |", pad({__all},4), " |")]%;\ + /let __index=$[{__index}+1]%; \ + /done%; \ + /if ({_postepy_current}==-1) \ + /echo -p @{n}| | |%; \ + /endif%; \ + /echo +---------------+-------+-----+-----+%;\ + /endif + /def -Fp2 -mregexp -t'^Zabil.s ' poka_exp = /send postepy /def exp = \