31 lines
1.1 KiB
HCL
31 lines
1.1 KiB
HCL
/def _sub = \
|
|
/return substitute(strcat(decode_attr(strcat({PL}, {P0}, {PR}, " [", {1}, "] "))))
|
|
|
|
/def _sub_inside = \
|
|
/return substitute(strcat({PL}, {P0}, " ", {*}, {PR})) %;\
|
|
|
|
/def typo =\
|
|
/let n=$[strchr({*}, '|')]%;\
|
|
/test param1 := substr({*}, 0, n) %;\
|
|
/test param2 := substr({*}, n+1) %;\
|
|
/echo -p #@{C%c_info}#@{n}# Zdefiniowana podmiana: @{C%c_info}%{param1}@{n} => @{C%c_info}%{param2}@{n} %;\
|
|
/def -mregexp -h'SEND %{param1}'\
|
|
typo_%{1} = /send $$[strcat ({PL}, '%{param2}', replace('%{param1}', '%{param2}', {PR}))]
|
|
|
|
/def -mregexp -Fp2 -t'(przybywaja|podazaja) (z(e|)|na) [wzpgd]' _liczenie_teamow = \
|
|
/unset _il_wr%;\
|
|
/let _ile=%{PL} %;\
|
|
/let _ile=$[replace("##", " ", replace(" ", "_",replace(", ", "##", replace(" i ", "##", {_ile}))))]%;\
|
|
/podlicz_team %{_ile}%;\
|
|
/return substitute(strcat("[", decode_attr({_il_wr}, {zc_bold}), "] ", {PL}, {P0}, {PR}))%;\
|
|
/unset _il_wr
|
|
|
|
/def podlicz_team = \
|
|
/while ({#}) \
|
|
/test ++_il_wr%; \
|
|
/shift%; \
|
|
/done
|
|
|
|
/def -mregexp -Fp2 -t' (polegl(a|o|)|umarl(a|o|))\\.' _zgon = \
|
|
/echo -p @{C%c_alarm}>>>>>>****** ZGON ******<<<<<<@{n}
|