; Coded by sTiLe and Kareila @ ChaoticMUX, May 2003 ; ; Each person is always consistently colored the same way, ; so that threads of conversation can be followed easily. ; Multiple pages are always hilited the same color. ; ; To change the colors around, add TF attributes to the definition of ; personColor. Make sure that the second argument of mod() in mungeName ; is the number of attributes you've specified. ; utility macros for picking unique colors based on player name /def mungeName=/eval /echo $[mod((ascii({*}) + ascii(substr({*},1,1)) + \ ascii(substr({*},2,1))),6) + 1] /def personColor=/nth $(/mungeName %*) \ BCblue Cred Ccyan Cmagenta Cgreen Cyellow ; triggers for multipages (higher priority so they match first) /def -p30 -q -mregexp -aBCred -t'(^(\[[^]]+\] )?To \(.*\), .* pages:)' \ multiPageHilite1 /def -p30 -q -mregexp -aBCred -t'(You paged \(.*\) with)' \ multiPageHilite2 /def -p30 -q -mregexp -aBCred -t'(^(\[[^]]+\] )?From afar, to \(.*\):)' \ multiPageHilite3 /def -p30 -q -mregexp -aBCred -t'(^(\[[^]]+\] )?Long distance to \(.*\):)' \ multiPageHilite4 ; triggers for single player pages /def -p10 -q -mregexp -t'^(\[[^]]+\] )?([A-Za-z0-9`$_.,\'" -]+) pages: ' \ pageHilite1 = \ /if (strlen({P1}) < 22) \ /substitute -p @{$(/personColor %P2)}%*@{n} %; \ /endif /def -p20 -q -mregexp -t'^(\[[^]]+\] )?(From [^:]+: )?You paged (.*) with ' \ pageHilite2 = /substitute -p @{$(/personColor %P3)}%*@{n} /def -p20 -q -mregexp -t'^(\[[^]]+\] )?From afar, ([^ ]*)' \ pageHilite3 = /substitute -p @{$(/personColor %P2)}%*@{n} /def -p20 -q -mregexp -t'^(\[[^]]+\] )?(From [^:]+: )?Long distance to (.*): ' \ pageHilite4 = /substitute -p @{$(/personColor %P3)}%*@{n}