2012-05-07 18:54:48 +02:00
|
|
|
; by Ingwar
|
|
|
|
|
2014-11-13 02:54:56 +01:00
|
|
|
/def -p20 -mregexp -t'^([^:\\(\\)]*) ([^ \\(\\)]*) (\\(.*\\) |)(czarodziej |)przedstawia .*sie jako.*:' _przedstawia_sie = \
|
2012-05-07 18:54:48 +02:00
|
|
|
/def -n1 -mregexp -t'^(Praktykant(|ka) |Ojciec |Sir |Don |Szlachetn(y|a|e) |Czcigodn(y|a|e) |Senior(|ita|ito) |L(ord|ady) |Mistrz(|yni|unio) |)([^ ,]*)( |,)' imie_trig = \
|
|
|
|
/test _zapamietaj_imie("%%{P8}","%{P1} %{P2}")
|
|
|
|
|
|
|
|
/def _zapamietaj_imie = \
|
|
|
|
/let imiex=%{1} %;\
|
|
|
|
/let imie_opis=$[strcat("[",substr({2},0,1),tolower(substr({2},0,1)),"]",substr({2},1))]%;\
|
2013-02-19 21:52:14 +01:00
|
|
|
/let imie_def=/def -Fp5 -mregexp -t'(%{imie_opis})(( \\\\([^,.]*\\\\))|([ .,]))' _imie_%{imiex} = /substitute -p %%{PL}%%{P1} @{C\%c_bold}_%{imiex}_%%{P3}@{n}%%{P4}%%{PR}%;\
|
2012-05-07 18:54:48 +02:00
|
|
|
/if ($(/list -s _imie_%{imiex})=~NULL) \
|
2013-02-19 21:52:14 +01:00
|
|
|
/echo -p #@{C%c_info}#@{n}# Zapamietany: @{C%c_info}%{imiex}@{n} %;\
|
2012-05-07 18:54:48 +02:00
|
|
|
/eval -s0 %{imie_def} %;\
|
2014-08-19 18:01:12 +02:00
|
|
|
/echo %{imie_def}%|/writefile -a %{priv_dir}/%{mudworld}/names.tf %;\
|
2012-05-07 18:54:48 +02:00
|
|
|
/elseif /test (strstr("($(/list -s _imie_%{imiex}))","(%{imie_opis})((")==-1) %;/then \
|
2013-02-19 21:52:14 +01:00
|
|
|
/echo -p #@{C%c_info}#@{n}# Zmienil sie opis dla wpisu: @{C%c_info}%{imiex}@{n} %;\
|
2012-05-07 18:54:48 +02:00
|
|
|
/undef _imie_%{imiex} %;\
|
|
|
|
/eval -s0 %{imie_def} %;\
|
2014-08-19 18:01:12 +02:00
|
|
|
/echo /undef _imie_%{imiex}%|/writefile -a %{priv_dir}/%{mudworld}/names.tf %;\
|
|
|
|
/echo %{imie_def}%|/writefile -a %{priv_dir}/%{mudworld}/names.tf %;\
|
2012-05-07 18:54:48 +02:00
|
|
|
/endif
|
|
|
|
|
|
|
|
/def ktoto = \
|
|
|
|
/if ({*}!~NULL) \
|
|
|
|
/if ({*} =~ "licz" ) \
|
|
|
|
/set _ilu_ludzi=0 %;\
|
|
|
|
/quote -S /_ktoto_licz `/list -s _imie_* %;\
|
2013-02-19 21:52:14 +01:00
|
|
|
/echo -p #@{C%c_info}#@{n}# Zapamietanych @{C%c_info}%{_ilu_ludzi} @{n}opisow.%;\
|
2012-05-07 18:54:48 +02:00
|
|
|
/unset _ilu_ludzi %;\
|
|
|
|
/else \
|
|
|
|
/set _ilu_ludzi=0 %;\
|
|
|
|
/quote -S /_ktoto `/list -s _imie_%{*} %;\
|
|
|
|
/quote -S /_ktoto `/list -s -mregexp -t'$[strcat(tolower(substr({*},0,1)),"(]|)",tolower(substr({*},1)))]' _imie_* %;\
|
2013-02-19 21:52:14 +01:00
|
|
|
/echo -p #@{C%c_info}#@{n}# W bazie @{C%c_info}%{_ilu_ludzi} @{n}pasujacych rekordow.%;\
|
2012-05-07 18:54:48 +02:00
|
|
|
/unset _ilu_ludzi %;\
|
|
|
|
/endif %;\
|
|
|
|
/endif
|
|
|
|
|
|
|
|
/def _ktoto = \
|
|
|
|
/test ++_ilu_ludzi %;\
|
|
|
|
/let pocz_opisu=$[strstr({*},"'([")] %;\
|
|
|
|
/let koni_opisu=$[strstr({*},")(")] %;\
|
|
|
|
/let pocz_imienia=$[strstr({*},"_imie_")+6] %;\
|
2013-02-19 21:52:14 +01:00
|
|
|
/echo -p #@{C%c_info}#@{n}# $[pad(substr({*},{pocz_imienia}),-15,substr({*},{pocz_opisu}+3,1),1,substr({*},{pocz_opisu}+6,{koni_opisu}-{pocz_opisu}-6))]
|
2012-05-07 18:54:48 +02:00
|
|
|
|
|
|
|
/def _ktoto_licz = \
|
|
|
|
/test ++_ilu_ludzi
|