; vega's .tfrc for sanity's edge ; ; initialization ; /require alias.tf /addworld -Tlp edge user password sanitysedge.com 2020 /set time_format=%m/%d/%y %H:%M:%S /set warn_curly_re off /log -w'edge' /home/vega/.se.log ; ;convenience ; ;/def -q -hSEND inputfill = /input %{*} /def -Fp0 -h'CONFAIL|DISCONNECT' reconnect = /repeat -5 1 /world %{1} /def sc = who n ; ; gags ; /def -w'edge' -p0 -ag -mregexp -t'^(?:> |)You inhale deeply on the joint' jinhale ; ; communication lines ; /def -w'edge' -p5 \ -P1BCrgb111;2Crgb122;3BCrgb111;4Crgb320;5BCrgb013;6BCrgb111 \ -F -mregexp -t'^(?:> |)(\[(.+)\]) (#(\w+)(?:#|))\s+(.*?)(#|)$' \ radio = /substitute -aCrgb524 $(/time) %{*} /def -w'edge' -p3 -F -aBCrgb210 -mregexp \ -t'^(?:> |)\w+ (?:[\w-]+ |)says(?: to you|): .*$' xsays /def -w'edge' -p1 -F -aBCrgb210 -mregexp \ -t'^(?:> |)You (?:[\w-]+ |)say(?: to \w+|): .*$' yousay ; ; color trigs for stuff ; ;; who /def -w'edge' -p2 -aBCgray6 -mregexp -t'^(?:> |) (___)\s*$' who1 /def -w'edge' -p2 -P1BCgray6;2Crgb300;3BCrgb040 -mregexp \ -t'^(?:> |) (/ \\\\ \\\\) (Establishing Uplink to CommSat MIDAS\.\.\.) (Connected\.)$' who2 /def -w'edge' -p2 -P1BCgray6;2Crgb300;3BCrgb040 -mregexp \ -t'^(?:> |)(/ /_\\\\_\\\\) (Receiving Requested Data \.\.\.) (Done\.)$' \ who3 /def -w'edge' -p2 -P1BCgray6;2BCgray2 -mregexp \ -t'^(?:> |)(\\\\/____/) (-+)$' who4 /def -w'edge' -p3 -P1BCgray6;2BCrgb024 -mregexp \ -t'^(?:> |) (\(--\() ([A-Z][a-z]+ citizens are logged into the Edge\.)$' who5 /def -w'edge' -p3 -P1BCgray6;2BCgray2 -mregexp \ -t'^(?:> |) (\`\.-\`\.) (-+)$' who6 /def -w'edge' -F -p2 -P1BCgray6;2Crgb013 -mregexp \ -t'^(?:> |)\s+(\)--\)|,\'-,\'|\(--\(|\`\.-\`\.)\s+(.*)$' who7 ;; default presentations if nothing else colors it /def -w'edge' -F -p500 -P1Ccyan,Cbgred;2Crgb115;3Crgb325;4Crgb425 -mregexp \ -t'(?x)(CEO|Vice\sPresident|Director|Manager|Coder|Mr\.|Miss|It|)\ \s*(\w+)(?:,|)\s(.*?),\s((?:male|female|neuter) .*)' namecolor ;; cmd command /def -w'edge' -F -p500 -aBCrgb205 -mregexp \ -t'^(?:> |)The following CMD members are currently available:$' cmd1 = \ /def -w'edge' -n2 -F -p500 -aCrgb201 -mregexp -t'^(?:> |)\\*{76}$$' cmd2 ;; inv/vitals commands /def -w'edge' -F -p500 -aCrgb011 -mregexp \ -t'^(?:> |)You (?:feel|are)(?! a| wielding| wearing| carrying| on) .*$' \ youare /def -w'edge' -F -p500 -P1Crgb025;2BCgray0,Cbggray4 -mregexp \ -t'^(?:> |)(Age:) (.*)$' myage /def -w'edge' -F -p500 -aCrgb524 -mregexp \ -t'^(?:> |)You are a(?:n|) .*$' youarea /def -w'edge' -F -p500 -aCgray7 -mregexp \ -t'^(?:> |)You are wielding .*$' youarewielding /def -w'edge' -F -p500 -aCgray11 -mregexp \ -t'^(?:> |)You are wearing .*$' youarewearing /def -w'edge' -F -p500 -aCrgb014 -mregexp \ -t'^(?:> |)You are carrying .*$' youarecarrying /def -w'edge' -F -p500 -aCrgb500 -mregexp -t'^(?:> |)You have .*$' youhave ;; eq command /def -w'edge' -F -p500 -P1uCrgb500 -mregexp \ -t'^(?:> |)\s+(-=\[Equipment\]=-)$' eq1 = \ /def -1 -F -p500 -aBCrgb441 -mregexp -t'^Currently Wielded/Held$$' _held = \ /def -n2 -F -p500 -P1BCgray7;2BCgray10 -mregexp \ -t'^((?:Left|Right) hand:)\\\\s+([\\\\w\\\\s]+)$$$' _weapons %; \ /def -1 -F -p500 -aBCrgb441 -mregexp -t'^Currently Worn$$' _worn = \ /def -F -p500 -P1BCgray7;2BCgray10 -mregexp \ -t'^([\\\\w\\\\s-]+:)\\\\s+([\\\\w\\\\s-]+)$$$' _currentworn %; \ /def -1 -F -p500 -aBCrgb311 -mregexp \ -t'^(?:> |)Nothing! You\\\'re naked!$$$' _naked %; \ /def -1 -F -p500 -aBCrgb441 -mregexp \ -t'^Equipment in Inventory$$' _eqinv = \ /undef _currentworn %; \ /if (%{_naked} !~ "") \ /undef _naked %; \ /endif %; \ /def -1 -F -p500 -aCgray5 -mregexp \ -t'^(?:> |)((?:a |an |[A-Z]+ |nothing).*)$$$' %; \ /def -n3 -F -p500 -aBCgray2 -mregexp -t'^-{14,22}$$' _dashes %; ;; wear/wield/remove /def -w'edge' -F -p500 -aCrgb020 -mregexp \ -t'^(?:>\s|)(?x)You\s(?:wear|wield|remove|retract|stop\swielding|extend) \ \sthe\s[\w\s_-]+\.$' \ wearwield ;; stats /def -w'edge' -F -p500 -P1Cgray5;2uCrgb551 -mregexp \ -t'^(?:> |)(\|-) (Your stats are:)$' stats1 = \ /def -n2 -w'edge' -F -p500 -aCgray5 -mregexp -t'^\\\|$$' %; \ /def -1 -w'edge' -F -p500 -P1Cgray5;2Crgb542;3BCrgb312;4Crgb542;5BCrgb312;6Crgb542;7BCrgb312;8Crgb542;9BCrgb312;10Crgb542;11BCrgb312;12Crgb542;13BCrgb312 \ -mregexp \ -t'^(?:>\s|)(?x)(\\\|)\\\s+(Str:)\\\s(\\\d+)\\\s+(Dex:)\\\s(\\\d+) \ \\\s+(Con:)\\\s(\\\d+)\\\s+(Int:)\\\s(\\\d+)\\\s+(Wis:)\\\s \ (\\\d+)\\\s+(Dis:)\\\s(\\\d+)$$' %; \ /def -1 -w'edge' -F -p500 -P1Cgray5;2uCrgb521;3BCrgb201 -mregexp \ -t'^(?:> |)(\\\|-) (Stat average:) (\\\d+)$$' ;; skills /def -w'edge' -F -p500 \ -P1Crgb042;2Crgb420,Cbggray3;3Crgb042;4Crgb420,Cbggray3 -mregexp \ -t'^(?:>\s|) (?x) ([a-zA-Z][\w\s-]+:) \s+ ( [\w\s-]+? (?:\s\+\d|) ) \ (?: \s+ ([\w\s-]+:) \s+ ( [\w\s-]+(?:\s\+\d|) ) | )$' ;; exits /def -w'edge' -F -p501 -mregexp \ -t'^(?:> |)(There (?:is|are) \w+ non-obvious exit(?:s|):) (.*).$' \ _non_obv_exits = \ /let mylabel=$(/echo -auCrgb002 %{P1}) %; \ /let myexits=$(/echo -aCrgb005 %{P2}) %; \ /let newand=$(/echo -aCgray4 and) %; \ /let newcomma=$(/echo -aCgray4 ,) %; \ /let newperiod=$(/echo -aCgray4 .) %; \ /let myexits=$[replace("and", %{newand}, %{myexits})] %; \ /let myexits=$[replace(",", %{newcomma}, %{myexits})] %; \ /substitute %{mylabel} %{myexits}%{newperiod} /def -w'edge' undefcolorstuff = \ /if (%{coloritems}) \ /undef %{coloritems} %; \ /endif %; \ /if (%{colornpcs}) \ /undef %{colornpcs} %; \ /endif /def -w'edge' -F -p500 -mregexp \ -t'^(?:> |)(There (?:is|are) \w+ obvious exit(?:s|):) (.*).$' \ _exits = \ ; when we get to this line, we're done with the long desc. /unset color_long_desc %; \ ; do this in reverse. color everything, then recolor 'and', commas, and . /let mylabel=$(/echo -auCrgb100 %{P1}) %; \ /let myexits=$(/echo -aCrgb500 %{P2}) %; \ /let newand=$(/echo -aCgray4 and) %; \ /let newcomma=$(/echo -aCgray4 ,) %; \ /let newperiod=$(/echo -aCgray4 .) %; \ /let myexits=$[replace("and", %{newand}, %{myexits})] %; \ /let myexits=$[replace(",", %{newcomma}, %{myexits})] %; \ /substitute %{mylabel} %{myexits}%{newperiod} %; \ ; little hack to make the items and npcs in the room get colored /def -F -w'edge' -aCrgb351 -p501 -t'*' coloritems %; \ /repeat -w'edge' -0.1 1 /undef coloritems ; color the long desc /def -mregexp -h"SEND (?:l(?:ook|)|(?:x|exa(?:mine|)))\b" color_long = \ /set color_long_desc on %; \ /send %{*} ; actually color the desc if the var is set. /def -p400 -F -t'*' -E"%{color_long_desc} =~ 'on'" -aCrgb553 do_color_long ; ; vanity ; /def -w'edge' -p0 -Pu -F -t'[Vv]ega' vega ; ; random trigs ; /def -w'edge' -p1 -ag -mregexp \ -t'^(?:> |)You feel you can smoke from the hookah again.$' \ hookah = toke hookah /def -w'edge' -p1 -ag -mregexp \ -t'^(?:> |)\w+ draw(s|) on the hookah, every breath.*$' hookahsmokegag