2012-05-07 18:54:48 +02:00
|
|
|
; by Ingwar
|
|
|
|
|
|
|
|
/def -Fp2 -mregexp -t'Zabil.s ' _zabiles_cosik_licz = %;\
|
2013-11-08 23:22:35 +01:00
|
|
|
/_dodaj_do_zabitych %{PR}%;\
|
|
|
|
/substitute -p @{C%c_crit_bold}%{PL}%{P0}%{PR} (%{ownkills}/%{allkills})@{n}
|
2012-05-07 18:54:48 +02:00
|
|
|
|
2015-08-27 14:59:26 +02:00
|
|
|
/def -Fp2 -mregexp -t'( | \\(.*\\) )zabil(a|o|) ([a-zA-z ]*)\.$' _ktos_zabil_cosik_licz = \
|
2013-11-08 23:22:35 +01:00
|
|
|
/_dodaj_do_kto_zabil %{PL} %;\
|
2015-08-27 14:54:58 +02:00
|
|
|
/_dodaj_do_poleglych %{P3}
|
2012-05-07 18:54:48 +02:00
|
|
|
|
|
|
|
/def _dodaj_do_zabitych = \
|
2013-11-08 23:22:35 +01:00
|
|
|
/if (strstr({L1},".")>=0) \
|
|
|
|
/let zabity=$[substr({L1},0,strlen({L1})-1)] %;\
|
|
|
|
/else \
|
|
|
|
/let zabity=%{L1} %;\
|
|
|
|
/endif %;\
|
|
|
|
/let zabity=$[substr({zabity},0,13)] %;\
|
|
|
|
/if ($(/listvar -s allkilled_%{zabity})=~NULL) \
|
|
|
|
/set ownkilled_%{zabity}=0 %;\
|
|
|
|
/set allkilled_%{zabity}=0 %;\
|
|
|
|
/endif %;\
|
|
|
|
/test ++ownkilled_%{zabity} %;\
|
|
|
|
/test ++allkilled_%{zabity} %;\
|
|
|
|
/test ++ownkills%;\
|
|
|
|
/test ++allkills
|
2012-05-07 18:54:48 +02:00
|
|
|
|
|
|
|
/def _dodaj_do_poleglych = \
|
2013-11-08 23:22:35 +01:00
|
|
|
/if (strstr({L1},".")>=0) \
|
|
|
|
/let zabity=$[substr({L1},0,strlen({L1})-1)] %;\
|
|
|
|
/else \
|
|
|
|
/let zabity=%{L1} %;\
|
|
|
|
/endif %;\
|
|
|
|
/let zabity=$[substr({zabity},0,13)] %;\
|
|
|
|
/if ($(/listvar -s allkilled_%{zabity})=~NULL) \
|
|
|
|
/set ownkilled_%{zabity}=0 %;\
|
|
|
|
/set allkilled_%{zabity}=0 %;\
|
|
|
|
/endif %;\
|
|
|
|
/test ++allkilled_%{zabity} %;\
|
|
|
|
/test ++allkills
|
2012-05-07 18:54:48 +02:00
|
|
|
|
|
|
|
/def _dodaj_do_kto_zabil = \
|
2013-11-08 23:22:35 +01:00
|
|
|
/if (strstr({L1},".")>=0) \
|
|
|
|
/let zabity=$[substr({L1},0,strlen({L1})-1)] %;\
|
|
|
|
/else \
|
|
|
|
/let zabity=%{L1} %;\
|
|
|
|
/endif %;\
|
|
|
|
/let zabity=$[substr({zabity},0,13)] %;\
|
|
|
|
/if ($(/listvar -s killer_%{zabity})=~NULL) \
|
|
|
|
/set killer_%{zabity}=0 %;\
|
|
|
|
/endif %;\
|
|
|
|
/test ++killer_%{zabity}
|
2012-05-07 18:54:48 +02:00
|
|
|
|
|
|
|
/def zabici = \
|
2013-11-08 23:22:35 +01:00
|
|
|
/let po_ile=%{1} %;\
|
|
|
|
/if ({po_ile} < 1) \
|
|
|
|
/let po_ile=2%;\
|
|
|
|
/endif %;\
|
|
|
|
/let linia1=$[strrep("-------------------------+",po_ile-1)] %;\
|
|
|
|
/let linia= %;\
|
|
|
|
/let cc=0 %;\
|
2014-11-18 14:18:09 +01:00
|
|
|
/echo -p +%{linia1}-------------------------+%;\
|
2013-11-08 23:22:35 +01:00
|
|
|
/let zabici_lista=$(/listvar -s -mglob allkilled_*) %;\
|
|
|
|
/let zabici_lista=$[strcat(zabici_lista," end")] %;\
|
|
|
|
/while /let i=$[strstr(zabici_lista," ")]%; /@test i > 0%; /do \
|
|
|
|
/let ktory_var=$[substr(zabici_lista,0,i)] %;\
|
|
|
|
/let ktory_ile=$(/eval /listvar -v %{ktory_var}) %;\
|
|
|
|
/let ktory_nazwa=$[substr(ktory_var,strrchr(ktory_var,"_")+1)] %;\
|
|
|
|
/let ktory_ile2=$(/eval /listvar -v ownkilled_%{ktory_nazwa}) %;\
|
|
|
|
/if (cc<{po_ile}) \
|
|
|
|
/let linia=$[strcat(linia,"|",pad(ktory_nazwa,13),": (",pad(ktory_ile2,3),"/",pad(ktory_ile,4),")")] %;\
|
|
|
|
/test ++cc %;\
|
|
|
|
/let zabici_lista=$[substr(zabici_lista,i+1)] %;\
|
|
|
|
/else \
|
2014-11-18 14:18:09 +01:00
|
|
|
/echo -p %{linia}| @{n}%;\
|
2013-11-08 23:22:35 +01:00
|
|
|
/let cc=0 %;\
|
|
|
|
/let linia= %;\
|
|
|
|
/endif %;\
|
|
|
|
/done %;\
|
|
|
|
/if (cc>0) \
|
2014-11-18 14:18:09 +01:00
|
|
|
/echo -p $[strcat(linia,strrep("| : ( )",po_ile-cc),"|")] @{n}%;\
|
2013-11-08 23:22:35 +01:00
|
|
|
/endif %;\
|
2014-11-18 16:13:15 +01:00
|
|
|
/let linia=$[strcat(" ", decode_attr(pad(ownkills,6), {zc_info}), " |")] %;\
|
2013-11-08 23:22:35 +01:00
|
|
|
/if (wrapsize > {po_ile}*27+6) \
|
2013-02-19 21:52:14 +01:00
|
|
|
/let linia=$[strcat(linia,"@{n}")] %;\
|
2013-11-08 23:22:35 +01:00
|
|
|
/endif %;\
|
2014-11-18 14:18:09 +01:00
|
|
|
/echo -p +%{linia1}----- W sumie: %{linia} %;\
|
|
|
|
/echo -p +%{linia1}-------------------------+%;\
|
2013-11-08 23:22:35 +01:00
|
|
|
/let linia= %;\
|
|
|
|
/let cc=0 %;\
|
|
|
|
/let zabici_lista=$(/listvar -s -mglob killer_*) %;\
|
|
|
|
/let zabici_lista=$[strcat(zabici_lista," end")] %;\
|
|
|
|
/while /let i=$[strstr(zabici_lista," ")]%; /@test i > 0%; /do \
|
|
|
|
/let ktory_var=$[substr(zabici_lista,0,i)] %;\
|
|
|
|
/let ktory_ile=$(/eval /listvar -v %{ktory_var}) %;\
|
|
|
|
/let ktory_nazwa=$[substr(ktory_var,strrchr(ktory_var,"_")+1)] %;\
|
|
|
|
/if (cc<{po_ile}) \
|
|
|
|
/let linia=$[strcat(linia,"|",pad(ktory_nazwa,13),": ( ",pad(ktory_ile,3),")")] %;\
|
|
|
|
/test ++cc %;\
|
|
|
|
/let zabici_lista=$[substr(zabici_lista,i+1)] %;\
|
|
|
|
/else \
|
2014-11-18 14:18:09 +01:00
|
|
|
/echo -p %{linia}| @{n}%;\
|
2013-11-08 23:22:35 +01:00
|
|
|
/let cc=0 %;\
|
|
|
|
/let linia= %;\
|
|
|
|
/endif %;\
|
|
|
|
/done %;\
|
|
|
|
/if (cc>0) \
|
2014-11-18 14:18:09 +01:00
|
|
|
/echo -p $[strcat(linia,strrep("| : ( )",po_ile-cc),"|")] @{n}%;\
|
2013-11-08 23:22:35 +01:00
|
|
|
/endif %;\
|
2014-11-18 16:13:15 +01:00
|
|
|
/let linia=$[strcat(" ", decode_attr(pad(allkills, 6), {zc_info}), " |")] %;\
|
2013-11-08 23:22:35 +01:00
|
|
|
/if (wrapsize > {po_ile}*27+6) \
|
|
|
|
/let linia=$[strcat(linia," @{n}")] %;\
|
|
|
|
/endif %;\
|
2014-11-18 14:18:09 +01:00
|
|
|
/echo -p +%{linia1}----- W sumie: %{linia} %;\
|
|
|
|
/echo -p +%{linia1}-------------------------+@{n}
|
2014-11-18 13:56:47 +01:00
|
|
|
|
|
|
|
; by thornag
|
|
|
|
/def _get_index = \
|
|
|
|
/let __element=%{1}%; \
|
|
|
|
/let __list=%{2}|%; \
|
|
|
|
/let __i=-1%; \
|
|
|
|
/while ({__list}!~"") \
|
|
|
|
/let __i=$[{__i}+1]%; \
|
|
|
|
/let __p=$[strstr({__list}, "|")]%; \
|
|
|
|
/let __el=$[substr({__list},0,{__p})]%; \
|
|
|
|
/if ({__el}=~{__element}) \
|
|
|
|
/return %{__i}%; \
|
|
|
|
/endif%; \
|
|
|
|
/let __list=$[substr({__list},{__p}+1)]%; \
|
|
|
|
/done%; \
|
|
|
|
/return -1
|
|
|
|
|
|
|
|
/def _get_element = \
|
|
|
|
/let __index=%{1}%; \
|
|
|
|
/let __list=%{2}|%; \
|
|
|
|
/let __i=-1%; \
|
|
|
|
/while ({__list}!~"") \
|
|
|
|
/let __i=$[{__i}+1]%; \
|
|
|
|
/let __p=$[strstr({__list}, "|")]%; \
|
|
|
|
/let __el=$[substr({__list},0,{__p})]%; \
|
|
|
|
/if ({__i}=={__index}) \
|
|
|
|
/return strcat({__el})%; \
|
|
|
|
/endif%; \
|
|
|
|
/let __list=$[substr({__list},{__p}+1)]%; \
|
|
|
|
/done%; \
|
|
|
|
/return ""
|
|
|
|
|
2018-06-21 22:54:47 +02:00
|
|
|
/def _cpref = \
|
|
|
|
/return substitute(strcat(decode_attr(strcat("@{C%c_info}[", {1}, "]@{n} ", {PL}, {P0}, {PR}))))
|
|
|
|
|
2014-11-19 19:29:54 +01:00
|
|
|
/def -Fp2 -mregexp -t'Poczynil.s (.*) postepy, od momentu kiedy' _postepy_lap = \
|
|
|
|
/let __postep=%{P1}%;\
|
2014-11-18 13:56:47 +01:00
|
|
|
/let __index=$[_get_index({__postep}, {_postepy_list})]%;\
|
|
|
|
/_postepy_zanotuj %{__index}%;\
|
2018-06-21 22:54:47 +02:00
|
|
|
/_cpref $[{__index}-1]/%{_postepy_max}
|
2014-11-18 13:56:47 +01:00
|
|
|
|
|
|
|
/def _postepy_zanotuj = \
|
|
|
|
/let __postep=%{1}%; \
|
|
|
|
/if ({__postep}>{_postepy_current})\
|
|
|
|
/set _postepy_czas_%{__postep}=$[ftime("%H:%M", time())]%;\
|
2014-11-18 16:13:15 +01:00
|
|
|
/set _postepy_own_%{__postep}=%ownkills%;\
|
|
|
|
/set _postepy_all_%{__postep}=%allkills%;\
|
2014-11-18 13:56:47 +01:00
|
|
|
/set _postepy_current=%{__postep}%;\
|
|
|
|
/endif
|
|
|
|
|
2018-07-05 16:50:47 +02:00
|
|
|
/def postepy = \
|
2014-11-18 13:56:47 +01:00
|
|
|
/let __index=0%; \
|
2014-11-18 16:13:15 +01:00
|
|
|
/echo +--------------+-------+-----+-----+%; \
|
2014-11-18 13:56:47 +01:00
|
|
|
/while ({__index}<={_postepy_current}) \
|
|
|
|
/let __postep=$[_get_element({__index}, {_postepy_list})]%; \
|
|
|
|
/let __czas=$(/listvar -v _postepy_czas_$[strcat({__index})])%; \
|
2014-11-18 16:13:15 +01:00
|
|
|
/let __own=$(/listvar -v _postepy_own_$[strcat({__index})])%; \
|
|
|
|
/let __all=$(/listvar -v _postepy_all_$[strcat({__index})])%; \
|
2014-11-18 13:56:47 +01:00
|
|
|
/if ({__czas} =~ "" )\
|
2014-11-18 16:13:15 +01:00
|
|
|
/let __czas=?:?%;\
|
2014-11-18 13:56:47 +01:00
|
|
|
/endif%;\
|
2014-11-18 16:13:15 +01:00
|
|
|
/if ({__own} =~ "" )\
|
|
|
|
/let __own=?%;\
|
|
|
|
/endif%;\
|
|
|
|
/if ({__all} =~ "" )\
|
|
|
|
/let __all=?%;\
|
|
|
|
/endif%;\
|
|
|
|
/echo $[strcat("| ", pad({__postep},-13), "| ", pad({__czas},5), " |", pad({__own},4), " |", pad({__all},4), " |")]%; \
|
2014-11-18 13:56:47 +01:00
|
|
|
/let __index=$[{__index}+1]%; \
|
|
|
|
/done%; \
|
|
|
|
/if ({_postepy_current}==-1) \
|
|
|
|
/echo -p @{n}| | |%; \
|
|
|
|
/endif%; \
|
2014-11-18 16:13:15 +01:00
|
|
|
/echo +--------------+-------+-----+-----+
|