; *************************** Party Management ************************************* /def -t"^No corpses in the morgue to deslab!$" empty_morgue = \ /qrepeat _deslab -1 1 /send say I gut no muh corpses%; ;/set members Xanadu|Wert|Ink ;/def -t"hits (%{members})" autoDef = \ ; /qrepeat _autoDef -1 1 /send defend %1%; /alias defend /qrepeat _pdefend -0 1 /send defend $[tolower({1})]%; /eval /set autodefending %{autodefending-no one} /alias autodefend \ /def -i -t"missed %1" adfmissed_%1 = defend $[tolower({1})] %;\ /def -i -t"struck but did no damage to %1" adfnodmg_%1 = defend $[tolower({1})] %;\ /def -i -t"tickled %1 in the stomach" adftickle_%1 = defend $[tolower({1})] %;\ /def -i -t"grazed %1\." adfgrazed_%1 = defend $[tolower({1})] %;\ /def -i -t"hit %1\." adfhit_%1 = defend $[tolower({1})] %;\ /def -i -t"hit %1 hard" adfhard_%1 = defend $[tolower({1})] %;\ /def -i -t"hit %1 very hard" adfveryhard_%1 = defend $[tolower({1})] %;\ /def -i -t"struck %1 a mighty blow" adfmighty_%1 = defend $[tolower({1})] %;\ /def -i -t"smashed %1 with a bone crushing sound" adfbonecrush_%1 = defend $[tolower({1})] %;\ /def -i -t"pulverized %1 with a powerful attack" adfpulvarize_%1 = defend $[tolower({1})] %;\ /def -i -t"pummeled %1 into small fragments" adfpummel_%1 = defend $[tolower({1})] %;\ /def -i -t"massacred %1 into tiny fragments" adfmassacre_%1 = defend $[tolower({1})] %;\ /def -i -t"completely devasated %1 with an awesome force" adfdevastate_%1 = defend $[tolower({1})] %;\ /def -i -t"destroyed %1" adfdestroy_%1 = defend $[tolower({1})]%;\ /if (autodefending =~ "no one") /set autodefending %1%;\ /else /eval /set autodefending %{autodefending} %1%;/endif%;\ /let i=2%;\ /eval /set tmp_autodefend_cmd=defend $[tolower($(/first %{autodefending}))]%;\ /while (i <= $(/length %{autodefending})) \ /eval /qrepeat _defend -%{i} 1 $[tolower($(/nth %{i} %{autodefending}))]%;\ /let i=$[i + 1] %;\ /done %;\ /unset tmp_autodefend_cmd /alias adf autodefend %* /alias uadf unautodefend %* /alias unautodefend \ /undef adfmissed_%1 %;\ /undef adfnodmg_%1 %;\ /undef adftickle_%1 %;\ /undef adfgrazed_%1 %;\ /undef adfhit_%1 %;\ /undef adfhard_%1 %;\ /undef adfveryhard_%1 %;\ /undef adfmighty_%1 %;\ /undef adfbonecrush_%1 %;\ /undef adfpulvarize_%1 %;\ /undef adfpummel_%1 %;\ /undef adfmassacre_%1 %;\ /undef adfdevastate_%1 %;\ /undef adfdestroy_%1 %;\ /set autodefending=$(/remove %1 %{autodefending}) %;\ /let i=2%;\ /eval /set tmp_autodefend_cmd=defend $[tolower($(/first %{autodefending}))]%;\ /while (i <= $(/length %{autodefending})) \ /eval /qrepeat _defend -%{i} 1 $[tolower($(/nth %{i} %{autodefending}))]%;\ /let i=$[i + 1] %;\ /done %;\ /if (autodefending =~ "") \ /set autodefending=no one %;\ /endif