help.html 167 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174
  1. <html>
  2. <head>
  3. <meta http-equiv='content-type' content='text/html; charset=utf-8'>
  4. <meta name='description' content='Generated by TinTin++ 2.01.92b - http://tintin.sourceforge.net'>
  5. <style type='text/css'>
  6. {
  7. font-family: Courier;
  8. font-size: 10pt;
  9. }
  10. a:link {color: cyan;} a:visited {color: green;} a:hover {color: white;} a:active {color:purple;}
  11. .d30{ color: #000; } .l30{ color: #555; } .b40{ background-color: #000; } .b50{ background-color: #555 }
  12. .d31{ color: #B00; } .l31{ color: #F55; } .b41{ background-color: #B00; } .b51{ background-color: #F55 }
  13. .d32{ color: #0B0; } .l32{ color: #5F5; } .b42{ background-color: #0B0; } .b52{ background-color: #5F5 }
  14. .d33{ color: #BB0; } .l33{ color: #FF5; } .b43{ background-color: #BB0; } .b53{ background-color: #FF5 }
  15. .d34{ color: #00B; } .l34{ color: #55F; } .b44{ background-color: #00B; } .b54{ background-color: #55F }
  16. .d35{ color: #B0B; } .l35{ color: #F5F; } .b45{ background-color: #B0B; } .b55{ background-color: #F5F }
  17. .d36{ color: #0BB; } .l36{ color: #5FF; } .b46{ background-color: #0BB; } .b56{ background-color: #5FF }
  18. .d37{ color: #BBB; } .l37{ color: #FFF; } .b47{ background-color: #BBB; } .b57{ background-color: #FFF }
  19. .d38{ color: #FFF; } .l38{ color: #FFF; } .b48{ background-color: #000; } .b58{ background-color: #000 }
  20. .d39{ color: #FFF; } .l39{ color: #FFF; } .b49{ background-color: #000; } .b59{ background-color: #000 }
  21. </style>
  22. <body bgcolor='#000000'>
  23. </head>
  24. <pre>
  25. <span class='b49'><span class='d39'>
  26. <a href='#ACTION'> ACTION</a> <a href='#ALIAS'> ALIAS</a> <a href='#ALL'> ALL</a> <a href='#BELL'> BELL</a>
  27. <a href='#BREAK'> BREAK</a> <a href='#BUFFER'> BUFFER</a> <a href='#BUTTON'> BUTTON</a> <a href='#CASE'> CASE</a>
  28. <a href='#CHARACTERS'> CHARACTERS</a> <a href='#CHAT'> CHAT</a> <a href='#CLASS'> CLASS</a> <a href='#COLORS'> COLORS</a>
  29. <a href='#COMMANDS'> COMMANDS</a> <a href='#COORDINATES'> COORDINATES</a> <a href='#CONFIG'> CONFIG</a> <a href='#CONTINUE'> CONTINUE</a>
  30. <a href='#CR'> CR</a> <a href='#CURSOR'> CURSOR</a> <a href='#DAEMON'> DAEMON</a> <a href='#DEBUG'> DEBUG</a>
  31. <a href='#DEFAULT'> DEFAULT</a> <a href='#DELAY'> DELAY</a> <a href='#DRAW'> DRAW</a> <a href='#ECHO'> ECHO</a>
  32. <a href='#ELSE'> ELSE</a> <a href='#ELSEIF'> ELSEIF</a> <a href='#END'> END</a> <a href='#ESCAPE CODES'> ESCAPE CODES</a>
  33. <a href='#EVENT'> EVENT</a> <a href='#FORALL'> FORALL</a> <a href='#FOREACH'> FOREACH</a> <a href='#FORMAT'> FORMAT</a>
  34. <a href='#FUNCTION'> FUNCTION</a> <a href='#GAG'> GAG</a> <a href='#GREETING'> GREETING</a> <a href='#GREP'> GREP</a>
  35. <a href='#HELP'> HELP</a> <a href='#HIGHLIGHT'> HIGHLIGHT</a> <a href='#HISTORY'> HISTORY</a> <a href='#IF'> IF</a>
  36. <a href='#IGNORE'> IGNORE</a> <a href='#INDEX'> INDEX</a> <a href='#INFO'> INFO</a> <a href='#KEYPAD'> KEYPAD</a>
  37. <a href='#KILL'> KILL</a> <a href='#LINE'> LINE</a> <a href='#LIST'> LIST</a> <a href='#LOCAL'> LOCAL</a>
  38. <a href='#LOG'> LOG</a> <a href='#LOOP'> LOOP</a> <a href='#MACRO'> MACRO</a> <a href='#MAP'> MAP</a>
  39. <a href='#MATH'> MATH</a> <a href='#MATHEMATICS'> MATHEMATICS</a> <a href='#MESSAGE'> MESSAGE</a> <a href='#MSDP'> MSDP</a>
  40. <a href='#NOP'> NOP</a> <a href='#PARSE'> PARSE</a> <a href='#PATH'> PATH</a> <a href='#PATHDIR'> PATHDIR</a>
  41. <a href='#PCRE'> PCRE</a> <a href='#PORT'> PORT</a> <a href='#PROMPT'> PROMPT</a> <a href='#READ'> READ</a>
  42. <a href='#REGEXP'> REGEXP</a> <a href='#REPEAT'> REPEAT</a> <a href='#REPLACE'> REPLACE</a> <a href='#RETURN'> RETURN</a>
  43. <a href='#RUN'> RUN</a> <a href='#SCAN'> SCAN</a> <a href='#SCREEN'> SCREEN</a> <a href='#SCREEN READER'> SCREEN READER</a>
  44. <a href='#SCRIPT'> SCRIPT</a> <a href='#SEND'> SEND</a> <a href='#SESSION'> SESSION</a> <a href='#SESSIONNAME'> SESSIONNAME</a>
  45. <a href='#SHOWME'> SHOWME</a> <a href='#SNOOP'> SNOOP</a> <a href='#SPEEDWALK'> SPEEDWALK</a> <a href='#SPLIT'> SPLIT</a>
  46. <a href='#SSL'> SSL</a> <a href='#STATEMENTS'> STATEMENTS</a> <a href='#SUBSTITUTE'> SUBSTITUTE</a> <a href='#SUSPEND'> SUSPEND</a>
  47. <a href='#SWITCH'> SWITCH</a> <a href='#SYSTEM'> SYSTEM</a> <a href='#TAB'> TAB</a> <a href='#TEXTIN'> TEXTIN</a>
  48. <a href='#TICKER'> TICKER</a> <a href='#TIME'> TIME</a> <a href='#VARIABLE'> VARIABLE</a> <a href='#WHILE'> WHILE</a>
  49. <a href='#WRITE'> WRITE</a> <a href='#ZAP'> ZAP</a>
  50. <a name='ACTION'></a>
  51. </span><span class='l32'> ACTION
  52. </span><span class='l37'>Command</span><span class='d37'>: #action </span><span class='l37'>{</span><span class='d37'>message</span><span class='l37'>} {</span><span class='d37'>commands</span><span class='l37'>} {</span><span class='d37'>priority</span><span class='l37'>}</span><span class='d37'>
  53. The #action command can be used to respond with one or several
  54. commands to a specific message send by the server. The %1-%99
  55. variables are substituted from the message and can be used in the
  56. command part of the action.
  57. The priority part is optional and determines the priority of the
  58. action, it defaults to 5.
  59. If the message starts with a ~ color codes must be matched. You can
  60. enable #config {convert meta} on to display meta characters.
  61. For more information on pattern matching see the section on PCRE.
  62. </span><span class='l37'>Example</span><span class='d37'>: #action {%1 tells you '%2'} {tell %1 I'm afk.}
  63. Actions can be triggered by the showme command and certain system
  64. messages.
  65. Actions can be triggered by the #showme command. If you don't want a
  66. #showme to get triggered use: #line ignore #showme {text}
  67. Actions are ordered alphabetically and only one action can trigger at
  68. a time. To change the order you can assign a priority, which defaults
  69. to 5, with a lower number indicating a higher priority. The priority
  70. can be a floating point number.
  71. To remove action with %* as the message, use #unaction {%%*} or
  72. #unaction {%*}. Alternatively you could wrap the action inside a
  73. class, and kill that class when you no longer need the action.
  74. </span><span class='l37'>Comment</span><span class='d37'>: You can remove an action with the #unaction command.
  75. </span><span class='l37'>Related</span><span class='d37'>: pcre, gag, highlight, prompt and substitute.
  76. <a name='ALIAS'></a>
  77. </span><span class='l32'> ALIAS
  78. </span><span class='l37'>Command</span><span class='d37'>: #alias </span><span class='l37'>{</span><span class='d37'>name</span><span class='l37'>} {</span><span class='d37'>commands</span><span class='l37'>}</span><span class='d37'>
  79. The #alias command can be used to shorten up long or oftenly used
  80. commands. The %1-99 variables are substituted from the arguments when
  81. using an alias and represent the 1st till 99th word which can be used
  82. in the commands part of the alias. If %0 is used it will contain all
  83. arguments. The priority part is optional and determines the priority
  84. of the alias, it defaults to 5.
  85. </span><span class='l37'>Example</span><span class='d37'>: #alias {k} {kill %1;kick}
  86. Typing 'k orc' would result in attacking the orc followed by a kick.
  87. You can create multi-word aliases by using variables in the name
  88. section.
  89. </span><span class='l37'>Example</span><span class='d37'>: #alias {k %1 with %2} {draw %2;attack %1;slash %1 with %2;
  90. kick at %2;strike %1 with %2}
  91. Using the above alias you could type k blue smurf with battle axe
  92. To have an alias that matches all user input, use %* as the name.
  93. </span><span class='l37'>Example</span><span class='d37'>: #alias {%*} {#showme You wrote: %0}
  94. Aliases are ordered alphabetically and only one alias can trigger at
  95. a time. To change the order you can assign a priority, which defaults
  96. to 5, with a lower number indicating a higher priority. The priority
  97. can be a floating point number.
  98. To remove an alias with %* as the name, use #unalias {%%*} or #unalias
  99. {%*}. Alternatively you can wrap the alias inside a class, and kill
  100. that class when you no longer need the alias.
  101. For more information on pattern matching see the section on PCRE.
  102. </span><span class='l37'>Comment</span><span class='d37'>: You can remove an alias with the #unalias command.
  103. </span><span class='l37'>Related</span><span class='d37'>: cursor, history, keypad, macro, speedwalk and tab.
  104. <a name='ALL'></a>
  105. </span><span class='l32'> ALL
  106. </span><span class='l37'>Command</span><span class='d37'>: #all </span><span class='l37'>{</span><span class='d37'>string</span><span class='l37'>}</span><span class='d37'>
  107. If you have multiple sessions in one terminal you can use #all to
  108. execute the command with all sessions, excluding the startup session.
  109. </span><span class='l37'>Example</span><span class='d37'>: #all quit
  110. Sends 'quit' to all sessions.
  111. </span><span class='l37'>Related</span><span class='d37'>: port, run, session, sessionname, snoop, ssl and zap.
  112. <a name='BELL'></a>
  113. </span><span class='l32'> BELL
  114. </span><span class='l37'>Command</span><span class='d37'>: #bell </span><span class='l37'>{</span><span class='d37'>flash</span><span class='l37'>|</span><span class='d37'>focus</span><span class='l37'>|</span><span class='d37'>margin</span><span class='l37'>|</span><span class='d37'>ring</span><span class='l37'>|</span><span class='d37'>volume</span><span class='l37'>} {</span><span class='d37'>argument</span><span class='l37'>}</span><span class='d37'>
  115. The #bell command without an argument will ring the terminal bell.
  116. </span><span class='l37'>Example</span><span class='d37'>: #action {Bubba tells you} {#bell}
  117. If you aren't watching the screen this could be useful if you don't
  118. want to miss out on a conversation with Bubba. Alternatively you can
  119. use #system to play a sound file.
  120. Some terminals will allow you to use VT100 Operating System Commands
  121. to change the terminal's bell behavior which can be used to flash the
  122. taskbar icon and or focus the window on receival of a bell.
  123. </span><span class='l37'>Example</span><span class='d37'>: #action {Bubba tells you} {#screen save title;#screen set title Tell!;
  124. #bell ring;#delay 10 #screen load title}
  125. The above example will save your window title, change the title to
  126. 'Tell!', ring the bell, next reset the window title after 10 seconds.
  127. It's possible to set the terminal to pop to the foreground upon
  128. ringing of the alarm bell.
  129. </span><span class='l37'>Example</span><span class='d37'>: #bell focus on;#bell ring;#bell focus off
  130. It's possible to adjust the alarm bell volume on some terminals.
  131. </span><span class='l37'>Example</span><span class='d37'>: #loop {1} {8} {cnt} {#line substitute variables
  132. #delay {&dollar;cnt} #showme {Volume &dollar;cnt: #bell volume &dollar;cnt;#bell}
  133. </span><span class='l37'>Related</span><span class='d37'>: screen
  134. <a name='BREAK'></a>
  135. </span><span class='l32'> BREAK
  136. </span><span class='l37'>Command</span><span class='d37'>: #break
  137. The break command can be used inside the #foreach, #loop, #parse,
  138. #while and #switch statements. When #break is found, tintin will stop
  139. executing the statement it is currently in and move on to the next.
  140. </span><span class='l37'>Example</span><span class='d37'>: #while {1} {#math cnt &dollar;cnt + 1;#if {&dollar;cnt == 20} {#break}}
  141. </span><span class='l37'>Related</span><span class='d37'>: statements
  142. <a name='BUFFER'></a>
  143. </span><span class='l32'> BUFFER
  144. </span><span class='l37'>Command</span><span class='d37'>: #buffer </span><span class='l37'>{</span><span class='d37'>home</span><span class='l37'>|</span><span class='d37'>up</span><span class='l37'>|</span><span class='d37'>down</span><span class='l37'>|</span><span class='d37'>end</span><span class='l37'>|</span><span class='d37'>lock</span><span class='l37'>|</span><span class='d37'>find</span><span class='l37'>|</span><span class='d37'>get</span><span class='l37'>|</span><span class='d37'>clear</span><span class='l37'>}</span><span class='d37'>
  145. The buffer command has various options to manipulate your scrollback
  146. buffer.
  147. </span><span class='l37'>#buffer {home}
  148. </span><span class='d37'>
  149. Moves you to the top of your scrollback buffer and displays the page.
  150. Enables scroll lock mode. Most useful when used in a #macro.
  151. </span><span class='l37'>#buffer {up} [lines]
  152. </span><span class='d37'>
  153. Moves your scrollback buffer up one page and displays the page.
  154. Enables scroll lock mode. Most useful when used in a #macro. You
  155. can use #buffer {up} {1} to move the scrollback buffer up 1 line.
  156. </span><span class='l37'>#buffer {down} [lines]
  157. </span><span class='d37'>
  158. Moves your scrollback buffer down one page and displays the page.
  159. Enables scroll lock mode unless at the end. Most useful when used in
  160. a #macro.
  161. </span><span class='l37'>#buffer {end}
  162. </span><span class='d37'>
  163. Moves you to the end of your scrollback buffer and displays the page.
  164. Disables scroll lock mode. Most useful when used in a #macro.
  165. </span><span class='l37'>#buffer {find} {[number]} {&lt;string&gt;}
  166. </span><span class='d37'>
  167. Moves the buffer to the given string which can contain a regular
  168. expression. Optionally you can provide the number of matches to skip,
  169. allowing you to jump further back in the buffer.
  170. </span><span class='l37'>#buffer {get} {&lt;variable&gt;} {&lt;lower bound&gt;} {[upper bound]}
  171. </span><span class='d37'>
  172. Allows you to store one or several lines from your scrollback buffer
  173. (including color codes) into a variable. The lower and upper bound
  174. must be between 1 and the size of the buffer. If the upper bound is
  175. omitted the given line is stored as a standard variable. If an upper
  176. bound is given the lines between the two bounds are stored as a list.
  177. </span><span class='l37'>#buffer {lock} {on|off}
  178. </span><span class='d37'>
  179. Toggles the lock on the scrollback buffer. When locked, newly incoming
  180. text won't be displayed, any command will disable the lock, though
  181. several buffer commands will re-enable the lock. When unlocking it'll
  182. move you to the end of your scrollback buffer and display the page.
  183. </span><span class='l37'>#buffer {write} {&lt;filename&gt;}
  184. </span><span class='d37'>
  185. Writes the scrollback buffer to the given file.
  186. </span><span class='l37'>Example</span><span class='d37'>: #macro {&bsol;e[F} {#buffer end}
  187. </span><span class='l37'>Related</span><span class='d37'>: echo, grep, macro, showme and screen.
  188. <a name='BUTTON'></a>
  189. </span><span class='l32'> BUTTON
  190. </span><span class='l37'>Command</span><span class='d37'>: #button </span><span class='l37'>{</span><span class='d37'>square</span><span class='l37'>} {</span><span class='d37'>commands</span><span class='l37'>} {</span><span class='d37'>priority</span><span class='l37'>}</span><span class='d37'>
  191. The #button command can be used to respond with one or several
  192. commands to a mouse click received within the specified square.
  193. The click coordinates are stored in %0-%3 and can be used in the
  194. command part of the button.
  195. The square part should exists of two coordinates defining the
  196. upper left and bottom right corner using row, col, row, col syntax.
  197. The square arguments should be separated by spaces, semi-colons or
  198. braces.
  199. By default the button is set to respond to a mouse button press, to
  200. respond to other button presses you must add a 5th argument to the
  201. square that defines the button press type. You can enable #info
  202. button on to see button events and their type as they happen.
  203. The priority part is optional and determines the priority of the
  204. button, it defaults to 5.
  205. You must enable #config {mouse tracking} on for buttons to work.
  206. This command draws no visible button, you'll have to do so separately
  207. if needed.
  208. </span><span class='l37'>Example</span><span class='d37'>: #button {1;1;2;2} {#showme You clicked the upper left corner.}
  209. Buttons are ordered alphabetically and only one button can trigger at
  210. a time. To change the order you can assign a priority, which defaults
  211. to 5, with a lower number indicating a higher priority. The priority
  212. can be a floating point number.
  213. </span><span class='l37'>Comment</span><span class='d37'>: To see button clicks trigger use #info button on.
  214. </span><span class='l37'>Comment</span><span class='d37'>: You can remove a button with the #unbutton command.
  215. </span><span class='l37'>Related</span><span class='d37'>: delay, event and ticker.
  216. <a name='CASE'></a>
  217. </span><span class='l32'> CASE
  218. </span><span class='l37'>Command</span><span class='d37'>: #case </span><span class='l37'>{</span><span class='d37'>conditional</span><span class='l37'>} {</span><span class='d37'>arguments</span><span class='l37'>}</span><span class='d37'>
  219. The case command must be used within the #switch command. When the
  220. conditional argument of the case command matches the conditional
  221. argument of the switch command the body of the case is executed.
  222. When comparing strings both the switch and case arguments must be
  223. surrounded in quotes.
  224. </span><span class='l37'>Example</span><span class='d37'>:
  225. #function {reverse_direction}
  226. {
  227. #switch {&quot;%1&quot;}
  228. {
  229. #case {&quot;north&quot;} {#return south};
  230. #case {&quot;east&quot;} {#return west};
  231. #case {&quot;south&quot;} {#return north};
  232. #case {&quot;west&quot;} {#return east};
  233. #case {&quot;up&quot;} {#return down};
  234. #case {&quot;down&quot;} {#return up}
  235. }
  236. }
  237. This function returns the reverse direction. @reverse_direction{north}
  238. would return south.
  239. </span><span class='l37'>Related</span><span class='d37'>: default, statements and switch.
  240. <a name='CHARACTERS'></a>
  241. </span><span class='l32'> CHARACTERS
  242. </span><span class='d37'>
  243. The following special characters are defined:
  244. # The hashtag is the default character for starting a command and is
  245. subsequently known as the command character or tintin character.
  246. When loading a command file the command character is set to the
  247. first character in the file. The character can also be redefined
  248. using #config.
  249. ; The semi-colon is used as the command separator and can be used to
  250. separate two commands. Multiple commands can be strung together as
  251. well. Trailing semi-colons are ignored when reading a script file
  252. as this is a common error.
  253. { } Curly brackets aka braces are used for seperating multi word command
  254. arguments, nesting commands, and nesting variables. Braces cannot
  255. easily be escaped and must always be used in pairs.
  256. &quot; &quot; Quote characters are used for strings in the #math, #if, #switch,
  257. and #case commands. It is however suggested to use an extra
  258. set of braces { } to define strings.
  259. ! The exclamation sign is used to repeat commands, see #help history.
  260. The character can be redefined using #config.
  261. &bsol; An input line starting with a backslash is send verbatim if you are
  262. connected to a server. This character can be configured with
  263. #config.
  264. </span><span class='l37'>Related</span><span class='d37'>: colors, escape, mathematics and pcre.
  265. <a name='CHAT'></a>
  266. </span><span class='l32'> CHAT
  267. </span><span class='l37'>Command</span><span class='d37'>: #chat </span><span class='l37'>{</span><span class='d37'>option</span><span class='l37'>} {</span><span class='d37'>argument</span><span class='l37'>}</span><span class='d37'>
  268. #chat {init} {port} Initilizes a chat port.
  269. #chat {name} {name} Sets your chat name.
  270. #chat {message} {buddy|all} {text} Sends a chat message
  271. #chat {accept} {buddy} {boost} Accept a file transfer
  272. #chat {call} {address} {port} Connect to a buddy
  273. #chat {cancel} {buddy} Cancel a file transfer
  274. #chat {color} {color names} Set the default color
  275. #chat {decline} {buddy} Decline a file transfer
  276. #chat {dnd} Decline new connections
  277. #chat {download} {directory} Set your download directory
  278. #chat {emote} {buddy|all} {text} Send an emote message
  279. #chat {forward} {buddy} Forward all chat messages
  280. #chat {forwardall} {buddy} Forward all session output
  281. #chat {filestat} {buddy} Show file transfer data
  282. #chat {group} {buddy} {name} Assign a chat group
  283. #chat {ignore} {buddy} Ignores someone
  284. #chat {info} Displays your info
  285. #chat {ip} {address} Changes your IP address
  286. #chat {paste} {buddy|all} {text} Pastes a block of text
  287. #chat {peek} {buddy} Show one's public connections
  288. #chat {ping} {buddy} Display response time
  289. #chat {private} {buddy|all} Make a connection private
  290. #chat {public} {buddy|all} Make a connection public
  291. #chat {reply} {text} Reply to last private message
  292. #chat {request} {buddy} Request one's public connections
  293. #chat {send} {buddy|all} {text} Sends a raw data string
  294. #chat {sendfile} {buddy} {filename} Start a file transfer
  295. #chat {serve} {buddy} Forward all public chat messages
  296. #chat {uninitialize} Uninitialize the chat port.
  297. #chat {who} Show all connections
  298. #chat {zap} {buddy} Close a connection
  299. </span><span class='l37'>Related</span><span class='d37'>: port
  300. <a name='CLASS'></a>
  301. </span><span class='l32'> CLASS
  302. </span><span class='l37'>Command</span><span class='d37'>: #class </span><span class='l37'>{</span><span class='d37'>name</span><span class='l37'>} {</span><span class='d37'>open</span><span class='l37'>|</span><span class='d37'>close</span><span class='l37'>|</span><span class='d37'>list</span><span class='l37'>|</span><span class='d37'>read</span><span class='l37'>|</span><span class='d37'>size</span><span class='l37'>|</span><span class='d37'>write</span><span class='l37'>|</span><span class='d37'>kill</span><span class='l37'>} {</span><span class='d37'>arg</span><span class='l37'>}</span><span class='d37'>
  303. The {open} option will open a class, closing a previously opened
  304. class. All triggers added afterwards are assigned to this class.
  305. The {close} option will close the given class.
  306. The {list} option will show the given list of the class.
  307. The {read} option will open the class, read, and close afterwards.
  308. The {size} option will store the size of the class in a variable.
  309. The {write} option will write all triggers of the given class to file.
  310. The {kill} option will delete all triggers of the given class.
  311. Keep in mind that the kill and read option are very fast allowing
  312. them to be used to enable and disable classes.
  313. </span><span class='l37'>Example</span><span class='d37'>: #class extra kill;#class extra read extra.tin
  314. Deletes all triggers of 'extra' class if any. Read 'extra.tin' file,
  315. all triggers loaded will be assigned to the fresh new 'extra' class.
  316. </span><span class='l37'>Related</span><span class='d37'>: config, debug, ignore, info, kill, line and message.
  317. <a name='COLORS'></a>
  318. </span><span class='l32'> COLORS
  319. </span><span class='l37'>Syntax</span><span class='d37'>: &lt;xyz&gt; with x, y, z being parameters
  320. Parameter 'x': VT100 code
  321. 0 - Reset all colors and codes to default
  322. 1 - Bold
  323. 2 - Dim
  324. 4 - Underscore
  325. 5 - Blink
  326. 7 - Reverse
  327. 8 - Skip (use previous code)
  328. Parameter 'y': Foreground color
  329. Parameter 'z': Background color
  330. 0 - Black 5 - Magenta
  331. 1 - Red 6 - Cyan
  332. 2 - Green 7 - White
  333. 3 - Yellow 8 - Skip
  334. 4 - Blue 9 - Default
  335. For xterm 256 colors support use &lt;aaa&gt; to &lt;fff&gt; for RGB foreground
  336. colors and &lt;AAA&gt; to &lt;FFF&gt; for RGB background colors. For the grayscale
  337. foreground colors use &lt;g00&gt; to &lt;g23&gt;, for grayscale background colors
  338. use &lt;G00&gt; to &lt;G23&gt;.
  339. The tertiary colors are as follows:
  340. &lt;acf&gt; - Azure &lt;afc&gt; - Jade
  341. &lt;caf&gt; - Violet &lt;cfa&gt; - Lime
  342. &lt;fac&gt; - Pink &lt;fca&gt; - Orange
  343. </span><span class='l37'>Example</span><span class='d37'>: #showme &lt;acf&gt;Azure &lt;afc&gt;Jade &lt;caf&gt;Violet
  344. </span><span class='l37'>Example</span><span class='d37'>: #showme &lt;cfa&gt;Lime &lt;fac&gt;Pink &lt;fca&gt;Orange
  345. For 12 bit truecolor use &lt;F000&gt; to &lt;FFFF&gt; for foreground colors and
  346. &lt;B000&gt; to &lt;BFFF&gt; for background colors.
  347. For 24 bit truecolor use &lt;F000000&gt; to &lt;FFFFFFF&gt; for foreground
  348. colors and &lt;B000000&gt; to &lt;BFFFFFF&gt; for background colors.
  349. If the color code exceeds your configured color mode it will be
  350. downgraded to the closest match.
  351. </span><span class='l37'>Related</span><span class='d37'>: characters, coordinates, escape, mathematics and pcre.
  352. <a name='COMMANDS'></a>
  353. </span><span class='l32'> COMMANDS
  354. </span><span class='l37'>Command</span><span class='d37'>: #commands </span><span class='l37'>{</span><span class='d37'>regex</span><span class='l37'>}
  355. </span><span class='d37'>
  356. Shows all commands or all commands matching the given search
  357. string.
  358. </span><span class='l37'>Related</span><span class='d37'>: help, info and statements.
  359. <a name='COORDINATES'></a>
  360. </span><span class='l32'> COORDINATES
  361. </span><span class='d37'>
  362. When the 0,0 coordinate is in the upper left corner TinTin++ uses
  363. a y,x / rows,cols notation. When the 0,0 coordinate is in the
  364. bottom left corner tintin uses a x,y / cols/rows notation.
  365. When a square is defined this is done by specifying the upper left
  366. and bottom right corner of the square using four coordinates.
  367. The vast majority of tintin commands use row,col notation.
  368. </span><span class='l37'>Related</span><span class='d37'>: characters, colors, escape, mathematics and pcre.
  369. <a name='CONFIG'></a>
  370. </span><span class='l32'> CONFIG
  371. </span><span class='l37'>Command</span><span class='d37'>: #config </span><span class='l37'>{</span><span class='d37'>option</span><span class='l37'>} {</span><span class='d37'>argument</span><span class='l37'>}</span><span class='d37'>
  372. This allows you to configure various settings, the settings can be
  373. written to file with the #write or #writesession command.
  374. If you configure the global session (the one you see as you start up
  375. tintin) all sessions started will inherite these settings.
  376. It's advised to make a configuration file to read on startup if you
  377. do not like the default settings.
  378. Config options which aren't listed by default:
  379. #CONFIG {BUFFER SIZE} {SIZE} Set the scrollback buffer size.
  380. #CONFIG {CHILD LOCK} {ON|OFF} Enable or disable command input.
  381. #CONFIG {CONVERT META} {ON|OFF} Shows color codes and key bindings.
  382. #CONFIG {DEBUG TELNET} {ON|OFF} Shows telnet negotiations y/n.
  383. #CONFIG {LOG LEVEL} {LOW|HIGH} LOW logs mud output before triggers.
  384. #CONFIG {INHERITANCE} {ON|OFF} Session trigger inheritance y/n.
  385. #CONFIG {MCCP} {ON|OFF} Enable or disable MCCP support.
  386. #CONFIG {PID} {NUMBER} Set the PID of the master process.
  387. </span><span class='l37'>Related</span><span class='d37'>: class and line.
  388. <a name='CONTINUE'></a>
  389. </span><span class='l32'> CONTINUE
  390. </span><span class='l37'>Command</span><span class='d37'>: #continue
  391. The continue command can be used inside the #FOREACH, #LOOP, #PARSE,
  392. #WHILE and #SWITCH commands. When #CONTINUE is found, tintin will go
  393. to the end of the command and proceed as normal, which may be to
  394. reiterate the command.
  395. </span><span class='l37'>Example</span><span class='d37'>: #loop 1 10 cnt {#if {&dollar;cnt % 2 == 0} {#continue} {say &dollar;cnt}}
  396. </span><span class='l37'>Related</span><span class='d37'>: break, foreach, list, loop, parse, repeat, return and while.
  397. <a name='CR'></a>
  398. </span><span class='l32'> CR
  399. </span><span class='l37'>Command</span><span class='d37'>: #cr
  400. Sends a carriage return to the session. Useful for aliases that need
  401. extra carriage returns.
  402. This command is obsolete as you can accomplish the same using #send
  403. without an argument or #send {}.
  404. </span><span class='l37'>Related</span><span class='d37'>: forall
  405. <a name='CURSOR'></a>
  406. </span><span class='l32'> CURSOR
  407. </span><span class='l37'>Command</span><span class='d37'>: #cursor </span><span class='l37'>{</span><span class='d37'>option</span><span class='l37'>} {</span><span class='d37'>argument</span><span class='l37'>}</span><span class='d37'>
  408. Typing #cursor without an option will show all available cursor
  409. options, their default binding, and an explanation of their function.
  410. The cursor command's primarly goal is adding customizable input editing
  411. with macros. Subsequently many cursor commands only work properly when
  412. used within a macro or event.
  413. </span><span class='l37'>Related</span><span class='d37'>: alias, history, keypad, macro, speedwalk and tab.
  414. <a name='DAEMON'></a>
  415. </span><span class='l32'> DAEMON
  416. </span><span class='l37'>Command</span><span class='d37'>: #daemon </span><span class='l37'>{</span><span class='d37'>attach</span><span class='l37'>|</span><span class='d37'>detach</span><span class='l37'>|</span><span class='d37'>kill</span><span class='l37'>|</span><span class='d37'>list</span><span class='l37'>} [</span><span class='d37'>name</span><span class='l37'>]
  417. </span><span class='d37'>#daemon provides functionality similar to that of the screen and tmux
  418. utilities.
  419. </span><span class='l37'>#daemon attach [name]
  420. </span><span class='d37'> The attach option will try to find a daemonized tintin instance and
  421. take over control. The name argument is optional.
  422. </span><span class='l37'>#daemon detach [name]
  423. </span><span class='d37'> The detach option will daemonize tintin, turning it into a background
  424. process. The name argument is optional and is useful if you have
  425. several daemonized tt++ instances running so you can keep them apart.
  426. </span><span class='l37'>#daemon kill [name]
  427. </span><span class='d37'> Kills all daemons or daemons with matching name.
  428. </span><span class='l37'>#daemon list [name]
  429. </span><span class='d37'> List all daemons or daemons with matching name.
  430. </span><span class='l37'>Related</span><span class='d37'>: script, system and run.
  431. <a name='DEBUG'></a>
  432. </span><span class='l32'> DEBUG
  433. </span><span class='l37'>Command</span><span class='d37'>: #debug </span><span class='l37'>{</span><span class='d37'>listname</span><span class='l37'>} {</span><span class='d37'>on</span><span class='l37'>|</span><span class='d37'>off</span><span class='l37'>|</span><span class='d37'>log</span><span class='l37'>}</span><span class='d37'>
  434. Toggles a list on or off. With no argument it shows your current
  435. settings, as well as the list names that you can debug.
  436. If you for example set ACTIONS to ON you will get debug information
  437. whenever an action is triggered.
  438. #debug {listname} {log} will silently write debugging information to
  439. the log file, you must be logging in order for this to work.
  440. Not every list has debug support yet.
  441. </span><span class='l37'>Related</span><span class='d37'>: class, ignore, info, kill and message.
  442. <a name='DEFAULT'></a>
  443. </span><span class='l32'> DEFAULT
  444. </span><span class='l37'>Command</span><span class='d37'>: #default </span><span class='l37'>{</span><span class='d37'>commands</span><span class='l37'>}</span><span class='d37'>
  445. The default command can only be used within the switch command. When
  446. the conditional argument of non of the case commands matches the switch
  447. command's conditional statement the default command is executed.
  448. </span><span class='l37'>Related</span><span class='d37'>: case, default, else, elseif, if, switch and regex.
  449. <a name='DELAY'></a>
  450. </span><span class='l32'> DELAY
  451. </span><span class='l37'>Command</span><span class='d37'>: #delay </span><span class='l37'>{</span><span class='d37'>seconds</span><span class='l37'>} {</span><span class='d37'>command</span><span class='l37'>}</span><span class='d37'>
  452. </span><span class='l37'>Command</span><span class='d37'>: #delay </span><span class='l37'>{</span><span class='d37'>name</span><span class='l37'>} {</span><span class='d37'>command</span><span class='l37'>} {</span><span class='d37'>seconds</span><span class='l37'>}</span><span class='d37'>
  453. Delay allows you to have tintin wait the given amount of seconds
  454. before executing the given command. tintin won't wait before
  455. executing following input commands if any.
  456. Floating point precision for miliseconds is possible.
  457. </span><span class='l37'>Example</span><span class='d37'>: #showme first;#delay {1} {#showme last}
  458. This will print 'first', and 'last' around one second later.
  459. </span><span class='l37'>Comment</span><span class='d37'>: If you want to remove a delay with the #undelay command you can add
  460. a name as the first argument, be aware this changes the syntax. If
  461. the name is a number keep in mind that delays with the same numeric
  462. name will not be overwritten
  463. </span><span class='l37'>Related</span><span class='d37'>: event and ticker.
  464. <a name='DRAW'></a>
  465. </span><span class='l32'> DRAW
  466. </span><span class='l37'>Command</span><span class='d37'>: #draw </span><span class='l37'>[</span><span class='d37'>color</span><span class='l37'>] [</span><span class='d37'>options</span><span class='l37'>] &lt;</span><span class='d37'>type</span><span class='l37'>&gt; &lt;</span><span class='d37'>square</span><span class='l37'>&gt; {</span><span class='d37'>text</span><span class='l37'>}
  467. </span><span class='d37'>
  468. The draw commands allows you to draw various types of lines and shapes
  469. on the screen. Common options and types with a brief description are
  470. provided when you type #draw without an argument.
  471. The square arguments should exists of two coordinates defining the
  472. upper left and bottom right corner using row, col, row, col syntax.
  473. You can prefix the option with a color code or color name to color the
  474. lines and shapes.
  475. You can further prefix the option as following:
  476. ASCII will draw in ASCII mode.
  477. BLANKED will blank the lines and corners.
  478. BOTTOM will draw on the bottom side if possible.
  479. BUMPED will precede the draw with an enter.
  480. CIRCLED will circle the corners.
  481. CONVERT will draw text with meta conversion.
  482. CORNERED will draw lines with corners if possible.
  483. CROSSED will cross the corners.
  484. HORIZONTAL will draw horizontal if possible.
  485. JEWELED will diamond the corners.
  486. LEFT will draw on the left side if possible.
  487. PRUNED will prune the corners.
  488. RIGHT will draw on the right side if possible.
  489. ROUNDED will round the corners.
  490. TEED will tee the corners.
  491. TOP will draw on the top side if possible.
  492. TUBED will draw tubes instead of lines.
  493. UNICODE will draw in unicode mode.
  494. VERTICAL will draw vertical if possible.
  495. The following types are available.
  496. BOX will draw a box.
  497. LINE will draw a line.
  498. SIDE will draw one or more sides of a box.
  499. TILE will draw a tile
  500. All draw types take an optional text argument as long as a valid
  501. square with enough space has been defined. Text is automatically
  502. word wrapped.
  503. </span><span class='l37'>Example</span><span class='d37'>: #draw {box} 1 1 3 20 {Hello world!}
  504. </span><span class='l37'>Related</span><span class='d37'>: buffer, echo, grep and showme.
  505. <a name='ECHO'></a>
  506. </span><span class='l32'> ECHO
  507. </span><span class='l37'>Command</span><span class='d37'>: #echo </span><span class='l37'>{</span><span class='d37'>format</span><span class='l37'>} {</span><span class='d37'>argument1</span><span class='l37'>} {</span><span class='d37'>argument2</span><span class='l37'>} {</span><span class='d37'>etc</span><span class='l37'>}</span><span class='d37'>
  508. Echo command displays text on the screen with formatting options. See
  509. the help file for the format command for more informations.
  510. The echo command does not trigger actions.
  511. As with the #showme command you can split the {format} argument up into
  512. two braced arguments, in which case the 2nd argument is the row number.
  513. </span><span class='l37'>Example</span><span class='d37'>: #echo {The current date is %t.} {%Y-%m-%d %H:%M:%S}
  514. #echo {[%38s][%-38s]} {Hello World} {Hello World}
  515. #echo {{this is %s on the top row} {-1}} {printed}
  516. </span><span class='l37'>Related</span><span class='d37'>: buffer, grep and showme.
  517. <a name='ELSE'></a>
  518. </span><span class='l32'> ELSE
  519. </span><span class='l37'>Command</span><span class='d37'>: #else </span><span class='l37'>{</span><span class='d37'>commands</span><span class='l37'>}</span><span class='d37'>
  520. The else statement should follow an #IF or #ELSEIF statement and is
  521. only called if the proceeding #IF or #ELSEIF is false.
  522. </span><span class='l37'>Example</span><span class='d37'>: #if {1d2 == 1} {smile};#else {grin}
  523. </span><span class='l37'>Related</span><span class='d37'>: case, default, elseif, if, switch and regex.
  524. <a name='ELSEIF'></a>
  525. </span><span class='l32'> ELSEIF
  526. </span><span class='l37'>Command</span><span class='d37'>: #elseif </span><span class='l37'>{</span><span class='d37'>conditional</span><span class='l37'>} {</span><span class='d37'>commands</span><span class='l37'>}</span><span class='d37'>
  527. The elseif statement should follow an #IF or #ELSEIF statement and is
  528. only called when the statement is true and the proceeding #IF and
  529. #ELSEIF statements are false.
  530. </span><span class='l37'>Example</span><span class='d37'>: #if {1d3 == 1} {smirk};#elseif {1d2 == 1} {snicker}
  531. </span><span class='l37'>Related</span><span class='d37'>: case, default, else, if, switch and regex.
  532. <a name='END'></a>
  533. </span><span class='l32'> END
  534. </span><span class='l37'>Command</span><span class='d37'>: #end {&lt;message&gt;}
  535. Terminates tintin and return to unix. On most systems, ctrl-c has
  536. the same result.
  537. The message is optional and is printed before tintin exits. When
  538. using #end {&bsol;} tintin will terminate silently.
  539. </span><span class='l37'>Related</span><span class='d37'>: zap
  540. <a name='ESCAPE CODES'></a>
  541. </span><span class='l32'> ESCAPE CODES
  542. </span><span class='d37'> You may use the escape character &bsol; for various special characters.
  543. &bsol;a beep the terminal.
  544. &bsol;c send a control character, &bsol;ca for ctrl-a.
  545. &bsol;e start an escape sequence.
  546. &bsol;n send a line feed.
  547. &bsol;r send a carriage return.
  548. &bsol;t send a horizontal tab.
  549. &bsol;x print an 8 bit character using hexadecimal, &bsol;xFF for example.
  550. &bsol;x7B send the '{' character.
  551. &bsol;x7D send the '}' character.
  552. &bsol;u print a 16 bit unicode character, &bsol;uFFFD for example.
  553. &bsol;U print a 21 bit unicode character, &bsol;U02AF21 for example.
  554. &bsol;v send a vertical tab
  555. Ending a line with &bsol; will stop tintin from appending a line feed.
  556. To escape arguments in an alias or action use %%0 %%1 %%2 etc.
  557. </span><span class='l37'>Related</span><span class='d37'>: characters, colors, coordinates, mathematics and pcre.
  558. <a name='EVENT'></a>
  559. </span><span class='l32'> EVENT
  560. </span><span class='l37'>Command</span><span class='d37'>: #event </span><span class='l37'>{</span><span class='d37'>event type</span><span class='l37'>}</span><span class='d37'>
  561. Events allow you to create triggers for predetermined client events.
  562. Use #event without an argument to see a list of possible events with
  563. a brief description. Use #event %* to see the current list of defined
  564. events. Use #info {events} {on} to see events get thrown.
  565. Some events can be prefixed with CATCH to interrupt default behavior.
  566. CATCH &lt;EVENT&gt;
  567. CHAT MESSAGE %0 default %1 plain
  568. CLASS ACTIVATED %0 class name
  569. CLASS DEACTIVATED %0 class name
  570. DATE %1 month - %3 day %4 hour : %5 minute
  571. DAY &lt;DAY&gt; %3 day of the month
  572. DOUBLE-CLICKED &lt;VAR&gt; %0 row %1 col %2 -row %3 -col %4 word %5 line
  573. END OF PATH
  574. HOUR %4 hour
  575. IAC &lt;VAR&gt; &lt;VAR&gt;
  576. IAC SB GMCP &lt;MODULE&gt; %0 data %1 raw data
  577. IAC SB MSSP %0 variable %1 value
  578. IAC SB MSDP %0 variable %1 value
  579. IAC SB MSDP &lt;VAR&gt; %1 value
  580. IAC SB NEW-ENVIRON %0 variable %1 value
  581. IAC SB ZMP &lt;VAR&gt; %0 value
  582. IAC SB &lt;VAR&gt; %0 raw text %1 raw data
  583. LONG-CLICKED &lt;VAR&gt; %0 row %1 col %2 -row %3 -col %4 word %5 line
  584. MAP ENTER MAP %0 new vnum
  585. MAP ENTER ROOM %0 new vnum %1 old vnum
  586. MAP ENTER ROOM &lt;VAR&gt; %0 new vnum %1 old vnum
  587. MAP EXIT MAP %0 old vnum
  588. MAP EXIT ROOM %0 old vnum %1 new vnum
  589. MAP EXIT ROOM &lt;VAR&gt; %0 old vnum %1 new vnum
  590. MAP FOLLOW MAP %0 old vnum %1 new vnum %2 exit name
  591. MAP UPDATED VTMAP
  592. MINUTE %5 minute
  593. MONTH %1 month
  594. MOVED &lt;VAR&gt; %0 row %1 col %2 -row %3 -col %4 word %5 line
  595. PORT CONNECTION %0 name %1 ip %2 port
  596. PORT DISCONNECTION %0 name %1 ip %2 port
  597. PORT MESSAGE %0 data %1 plain data
  598. PORT LOG MESSAGE %0 name %1 ip %2 port %3 data %4 plain data
  599. PORT RECEIVED MESSAGE %0 name %1 ip %2 port %3 data %4 plain data
  600. PRESSED &lt;VAR&gt; %0 row %1 col %2 -row %3 -col %4 word %5 line
  601. PROGRAM START %0 startup arguments
  602. PROGRAM TERMINATION %0 goodbye message
  603. READ ERROR %0 filename %1 error message
  604. RECEIVED INPUT %0 raw text
  605. RECEIVED KEYPRESS %0 raw text %1 unicode index
  606. RECEIVED LINE %0 raw text %1 plain text
  607. RECEIVED OUTPUT %0 raw text
  608. RECEIVED PROMPT %0 raw text %1 plain text
  609. RELEASED &lt;VAR&gt; %0 row %1 col %2 -row %3 -col %4 word %5 line
  610. SCAN CSV HEADER %0 all args %1 arg1 %2 arg2 .. %99 arg99
  611. SCAN CSV LINE %0 all args %1 arg1 %2 arg3 .. %99 arg99
  612. SCAN TSV HEADER %0 all args %1 arg1 %2 arg3 .. %99 arg99
  613. SCAN TSV LINE %0 all args %1 arg1 %2 arg3 .. %99 arg99
  614. SCREEN RESIZE %0 rows %1 cols %1 height %2 width
  615. SCREEN SPLIT %0 top row %1 top col %2 bot row %3 bot col
  616. SCREEN UNSPLIT %0 top row %1 top col %2 bot row %3 bot col
  617. SCROLLED &lt;VAR&gt; %0 row %1 col %2 -row %3 -col %4 word %5 line
  618. SECOND %6 second
  619. SEND OUTPUT %0 raw text %1 size
  620. SENT OUTPUT %0 raw text %1 size
  621. SESSION ACTIVATED %0 name
  622. SESSION CONNECTED %0 name %1 host %2 ip %3 port
  623. SESSION CREATED %0 name %1 host %2 ip %3 port
  624. SESSION DEACTIVATED %0 name
  625. SESSION DISCONNECTED %0 name %1 host %2 ip %3 port
  626. SESSION TIMED OUT %0 name %1 host %2 ip %3 port
  627. SHORT-CLICKED &lt;VAR&gt; %0 row %1 col %2 -row %3 -col %4 word %5 line
  628. SYSTEM ERROR %0 name %1 system msg %2 error %3 error msg
  629. TIME %4 hour : %5 minute : %6 second
  630. TRIPLE-CLICKED &lt;VAR&gt; %0 row %1 col %2 -row %3 -col %4 word %5 line
  631. UNKNOWN COMMAND %0 raw text
  632. VARIABLE UPDATE &lt;VAR&gt; %0 name %1 new value
  633. VARIABLE UPDATED &lt;VAR&gt; %0 name %1 new value
  634. VT100 SCROLL REGION %0 top row %1 bot row %2 rows %3 cols %4 wrap
  635. WEEK &lt;DAY&gt; %2 day of the week
  636. WINDOW FOCUS IN %0 name
  637. WINDOW FOCUS OUT %0 name
  638. WRITE ERROR %0 filename %1 error message
  639. YEAR %0 year
  640. To see all events trigger use #event info on. Since this can quite
  641. spammy it's possible to gag event info messages.
  642. </span><span class='l37'>Example</span><span class='d37'>: #event {SESSION CONNECTED} {#read mychar.tin}
  643. </span><span class='l37'>Comment</span><span class='d37'>: You can remove an event with the #unevent command.
  644. </span><span class='l37'>Related</span><span class='d37'>: button, delay and ticker.
  645. <a name='FORALL'></a>
  646. </span><span class='l32'> FORALL
  647. </span><span class='l37'>This command is obsolete, please use foreach instead.
  648. Related</span><span class='d37'>: cr
  649. <a name='FOREACH'></a>
  650. </span><span class='l32'> FOREACH
  651. </span><span class='l37'>Command</span><span class='d37'>: #foreach </span><span class='l37'>{</span><span class='d37'>list</span><span class='l37'>} {</span><span class='d37'>variable</span><span class='l37'>} {</span><span class='d37'>commands</span><span class='l37'>}</span><span class='d37'>
  652. For each item in the provided list the foreach statement will update
  653. the given variable and execute the command part of the statement. List
  654. elements must be separated by braces or semicolons.
  655. </span><span class='l37'>Example</span><span class='d37'>: #foreach {bob;tim;kim} {name} {tell &dollar;name Hello}
  656. </span><span class='l37'>Example</span><span class='d37'>: #foreach {{bob}{tim}{kim}} {name} {tell &dollar;name Hello}
  657. </span><span class='l37'>Related</span><span class='d37'>: break, continue, list, loop, parse, repeat, return and while.
  658. <a name='FORMAT'></a>
  659. </span><span class='l32'> FORMAT
  660. </span><span class='l37'>Command</span><span class='d37'>: #format </span><span class='l37'>{</span><span class='d37'>variable</span><span class='l37'>} {</span><span class='d37'>format</span><span class='l37'>} {</span><span class='d37'>argument1</span><span class='l37'>} {</span><span class='d37'>argument2</span><span class='l37'>} {</span><span class='d37'>etc</span><span class='l37'>}</span><span class='d37'>
  661. Allows you to store a string into a variable in the exact same way
  662. C's sprintf works with a few enhancements and limitations such as
  663. no integer operations and a maximum of 30 arguments.
  664. If you use #format inside an alias or action you must escape %1s as
  665. %+1s or %%1s or %&bsol;1s so the %1 isn't substituted by the trigger.
  666. #format {test} {%+9s} {string} pad string with up to 9 spaces
  667. #format {test} {%-9s} {string} post pad string with up to 9 spaces
  668. #format {test} {%.8s} {string} copy at most 8 characters
  669. #format {test} {%a} {number} print corresponding charset character
  670. #format {test} {%c} {string} use a highlight color name
  671. #format {test} {%d} {number} print a number with integer formatting
  672. #format {test} {%f} {string} perform floating point math
  673. #format {test} {%g} {number} perform thousand grouping on {number}
  674. #format {test} {%h} {string} turn text into a header line
  675. #format {test} {%l} {string} lowercase text
  676. #format {test} {%m} {string} perform mathematical calculation
  677. #format {test} {%n} {name} capitalize the first letter
  678. #format {test} {%p} {string} strip leading and trailing spaces
  679. #format {test} {%r} {string} reverse text, hiya = ayih
  680. #format {test} {%s} {string} print given string
  681. #format {test} {%t} {format} display time with strftime format
  682. optional {{format}{time}} syntax
  683. #format {test} {%u} {string} uppercase text
  684. #format {list} {%w} {string} store wordwrapped text in {list}
  685. optional {{string}{width}} syntax
  686. #format {test} {%x} {hex} print corresponding charset character
  687. #format {test} {%A} {char} store corresponding character value
  688. #format {test} {%D} {hex} convert hex to decimal in {test}
  689. #format {hash} {%H} {string} store a 64 bit string hash in {hash}
  690. #format {test} {%L} {string} store the string length in {test}
  691. #format {time} {%T} {} store the epoch time in {time}
  692. #format {time} {%U} {} store the micro epoch time in {time}
  693. #format {test} {%X} {dec} convert dec to hexadecimal in {test}
  694. #format {test} {%%} a literal % character
  695. </span><span class='l37'>Comment</span><span class='d37'>: See #help TIME for help on the %t argument.
  696. </span><span class='l37'>Related</span><span class='d37'>: echo, function, local, math, replace, script, time and variable.
  697. <a name='FUNCTION'></a>
  698. </span><span class='l32'> FUNCTION
  699. </span><span class='l37'>Command</span><span class='d37'>: #function </span><span class='l37'>{</span><span class='d37'>name</span><span class='l37'>} {</span><span class='d37'>operation</span><span class='l37'>}</span><span class='d37'>
  700. Functions allow you to execute a script within a line of text, and
  701. replace the function call with the line of text generated by the
  702. function.
  703. Be aware that each function should set the &dollar;result variable at the
  704. end of the function, or call #return with the given result.
  705. To use a function use the @ character before the function name.
  706. The function arguments should be placed between braces behind the
  707. function name with argument separated by semicolons.
  708. The function itself can use the provided arguments which are stored
  709. in %1 to %9, with %0 holding all arguments.
  710. </span><span class='l37'>Example</span><span class='d37'>: #function {rnd} {#math {result} {1 d (%2 - %1 + 1) + %1 - 1}}
  711. #showme A random number between 100 and 200: @rnd{100;200}
  712. </span><span class='l37'>Example</span><span class='d37'>: #function gettime {#format result %t %H:%M}
  713. #showme The current time is @gettime{}
  714. </span><span class='l37'>Comment</span><span class='d37'>: You can remove a function with the #unfunction command.
  715. </span><span class='l37'>Related</span><span class='d37'>: format, local, math, replace, script and variable.
  716. <a name='GAG'></a>
  717. </span><span class='l32'> GAG
  718. </span><span class='l37'>Command</span><span class='d37'>: #gag </span><span class='l37'>{</span><span class='d37'>string</span><span class='l37'>}</span><span class='d37'>
  719. Removes any line that contains the string.
  720. </span><span class='l37'>Comment</span><span class='d37'>: See '#help action', for more information about triggers.
  721. </span><span class='l37'>Comment</span><span class='d37'>: You can remove a gag with the #ungag command.
  722. </span><span class='l37'>Related</span><span class='d37'>: action, highlight, prompt and substitute.
  723. <a name='GREETING'></a>
  724. </span><span class='l32'> GREETING
  725. </span><span class='d36'> ####################################################################
  726. #</span><span class='d37'> T I N T I N + + 2.01.92b </span><span class='d36'>#
  727. #</span><span class='d37'> </span><span class='d36'>#
  728. #</span><span class='d37'> </span><span class='d36'>T</span><span class='d37'>he K</span><span class='d36'>i</span><span class='d37'>cki</span><span class='d36'>n</span><span class='d37'> </span><span class='d36'>T</span><span class='d37'>ickin D</span><span class='d36'>i</span><span class='d37'>kuMUD Clie</span><span class='d36'>n</span><span class='d37'>t </span><span class='d36'> #
  729. #</span><span class='d37'> </span><span class='d36'>#
  730. #</span><span class='d37'> Code by Peter Unold, Bill Reis, and Igor van den Hoven </span><span class='d36'>#
  731. ####################################################################
  732. <a name='GREP'></a>
  733. </span><span class='l32'> GREP
  734. </span><span class='l37'>Command</span><span class='d37'>: #grep </span><span class='l37'>[</span><span class='d37'>page</span><span class='l37'>] {</span><span class='d37'>search string</span><span class='l37'>}</span><span class='d37'>
  735. This command allows you to search for matching lines in your scroll
  736. back buffer. The amount of matches shown equals your screen size. If
  737. you want to search back further use the optional page number. You can
  738. use wildcards for better search results. Be aware the search string
  739. is case sensitive, which can be disabled by using %i.
  740. By default grep searches from the end of the scrollback buffer to the
  741. beginning, this can be reversed by using a negative page number.
  742. </span><span class='l37'>Example</span><span class='d37'>: #grep Bubba tells you
  743. This will show all occasions where bubba tells you something.
  744. </span><span class='l37'>Related</span><span class='d37'>: buffer, echo and showme.
  745. <a name='HELP'></a>
  746. </span><span class='l32'> HELP
  747. </span><span class='l37'>Command</span><span class='d37'>: #help </span><span class='l37'>{</span><span class='d37'>subject</span><span class='l37'>}</span><span class='d37'>
  748. Without an argument #help will list all available help subjects.
  749. Using #help %* will display all help entries.
  750. </span><span class='l37'>Related</span><span class='d37'>: commands, debug, ignore, info, message and statements.
  751. <a name='HIGHLIGHT'></a>
  752. </span><span class='l32'> HIGHLIGHT
  753. </span><span class='l37'>Command</span><span class='d37'>: #highlight </span><span class='l37'>{</span><span class='d37'>string</span><span class='l37'>} {</span><span class='d37'>color names</span><span class='l37'>}</span><span class='d37'>
  754. The highlight command is used to allow you to highlight strings of text.
  755. Available color options are:
  756. reset - resets the color state to default
  757. light - turns the color light in 16 color mode.
  758. dark - turns the color dark in 16 color mode.
  759. underscore - underscores the text.
  760. blink - makes the text blink.
  761. reverse - reverse foreground and background color.
  762. b - makes next color the background color.
  763. Available color names are:
  764. &lt;F06B&gt; - azure &lt;F08F&gt; - Azure
  765. &lt;F00B&gt; - blue &lt;F00F&gt; - Blue
  766. &lt;F0BB&gt; - cyan &lt;F0FF&gt; - Cyan
  767. &lt;F000&gt; - ebony &lt;F666&gt; - Ebony
  768. &lt;F0B0&gt; - green &lt;F0F0&gt; - Green
  769. &lt;F0B6&gt; - jade &lt;F0F8&gt; - Jade
  770. &lt;F6B0&gt; - lime &lt;F8F0&gt; - Lime
  771. &lt;FB0B&gt; - magenta &lt;FF0F&gt; - Magenta
  772. &lt;FB60&gt; - orange &lt;FF80&gt; - Orange
  773. &lt;FB06&gt; - pink &lt;FF08&gt; - Pink
  774. &lt;FB00&gt; - red &lt;FF00&gt; - Red
  775. &lt;F888&gt; - silver &lt;FDDD&gt; - Silver
  776. &lt;F860&gt; - tan &lt;FDB0&gt; - Tan
  777. &lt;F60B&gt; - violet &lt;F80F&gt; - Violet
  778. &lt;FBBB&gt; - white &lt;FFFF&gt; - White
  779. &lt;FBB0&gt; - yellow &lt;FFF0&gt; - Yellow
  780. The %1-99 variables can be used as 'wildcards' that will match with any
  781. text. They are useful for highlighting a complete line. The %0 variable
  782. should never be used in highlights.
  783. You may start the string to highlight with a ^ to only highlight text
  784. if it begins the line.
  785. Besides color names also &lt;abc&gt; color codes can be used.
  786. </span><span class='l37'>Example</span><span class='d37'>: #high {Valgar} {reverse blink}
  787. Prints every occurrence of 'Valgar' in blinking reverse video.
  788. </span><span class='l37'>Example</span><span class='d37'>: #high {^You %1} {bold cyan}
  789. Boldfaces any line that starts with 'You' in cyan.
  790. </span><span class='l37'>Example</span><span class='d37'>: #high {Bubba} {red underscore b green}
  791. Highlights the name Bubba as red underscored text on green background.
  792. </span><span class='l37'>Comment</span><span class='d37'>: See '#help action', for more information about triggers.
  793. </span><span class='l37'>Comment</span><span class='d37'>: See '#help substitute', for more advanced color substitution.
  794. </span><span class='l37'>Comment</span><span class='d37'>: This command only works with ANSI/VT100 terminals or emulators.
  795. </span><span class='l37'>Comment</span><span class='d37'>: You can remove a highlight with the #unhighlight command.
  796. </span><span class='l37'>Related</span><span class='d37'>: action, gag, prompt and substitute.
  797. <a name='HISTORY'></a>
  798. </span><span class='l32'> HISTORY
  799. </span><span class='l37'>Command</span><span class='d37'>: #history </span><span class='l37'>{</span><span class='d37'>delete</span><span class='l37'>}</span><span class='d37'> Delete the last command.
  800. #history </span><span class='l37'>{</span><span class='d37'>insert</span><span class='l37'>} {</span><span class='d37'>command</span><span class='l37'>}</span><span class='d37'> Insert a command.
  801. #history </span><span class='l37'>{</span><span class='d37'>list</span><span class='l37'>}</span><span class='d37'> Display the entire command history.
  802. #history </span><span class='l37'>{</span><span class='d37'>read</span><span class='l37'>} {</span><span class='d37'>filename</span><span class='l37'>}</span><span class='d37'> Read a command history from file.
  803. #history </span><span class='l37'>{</span><span class='d37'>write</span><span class='l37'>} {</span><span class='d37'>filename</span><span class='l37'>}</span><span class='d37'> Write a command history to file.
  804. Without an argument all available options are shown.
  805. By default all commands are saved to the history list and the history
  806. list is saved between sessions in the ~/.tintin/history.txt file.
  807. You can set the character to repeat a command in the history with the
  808. #config {REPEAT CHAR} {&lt;character&gt;} configuration option, by default
  809. this is set to the exclamation mark.
  810. You can use ! by itself to repeat the last command, or !&lt;text&gt; to
  811. repeat the last command starting with the given text.
  812. You can use #config {REPEAT ENTER} {ON} to repeat the last command
  813. when you press enter on an empty line.
  814. You can press ctrl-r to enter an interactive regex enabled history
  815. search mode, or by issueing #cursor {history search}.
  816. TinTin++ tries to bind the arrow up and down keys to scroll through
  817. the history list by default. You can bind these with a macro yourself
  818. using #cursor {history next} and #cursor {history prev}. Many #cursor
  819. commands only work properly when bound with a macro.
  820. </span><span class='l37'>Related</span><span class='d37'>: alias, cursor, keypad, macro, speedwalk and tab.
  821. <a name='IF'></a>
  822. </span><span class='l32'> IF
  823. </span><span class='l37'>Command</span><span class='d37'>: #if </span><span class='l37'>{</span><span class='d37'>conditional</span><span class='l37'>} {</span><span class='d37'>commands if true</span><span class='l37'>} {</span><span class='d37'>commands if false</span><span class='l37'>}</span><span class='d37'>
  824. The 'if' command is one of the most powerful commands added since
  825. TINTIN III. It works similar to an 'if' statement in other languages,
  826. and is strictly based on the way C handles its conditional statements.
  827. When an 'if' command is encountered, the conditional statement is
  828. evaluated, and if TRUE (any non-zero result) the commands are executed.
  829. The 'if' statement is only evaluated if it is read, so you must nest
  830. the 'if' statement inside another statement (most likely an 'action'
  831. command). The conditional is evaluated exactly the same as in the
  832. 'math' command only instead of storing the result, the result is used
  833. to determine whether to execute the commands.
  834. </span><span class='l37'>Example</span><span class='d37'>: #action {%0 gives you %1 gold coins.} {#if {%1&gt;5000} {thank %0}}
  835. If someone gives you more than 5000 coins, thank them.
  836. </span><span class='l37'>Comment</span><span class='d37'>: See '#help math', for more information.
  837. </span><span class='l37'>Related</span><span class='d37'>: case, default, else, elseif, switch and regex.
  838. <a name='IGNORE'></a>
  839. </span><span class='l32'> IGNORE
  840. </span><span class='l37'>Command</span><span class='d37'>: #ignore </span><span class='l37'>{</span><span class='d37'>listname</span><span class='l37'>} {</span><span class='d37'>on</span><span class='l37'>|</span><span class='d37'>off</span><span class='l37'>}</span><span class='d37'>
  841. Toggles a list on or off. With no arguments it shows your current
  842. settings, as well as the list names that you can ignore.
  843. If you for example set ACTIONS to OFF actions will no longer trigger.
  844. Not every list can be ignored.
  845. </span><span class='l37'>Related</span><span class='d37'>: class, debug, info, kill and message.
  846. <a name='INDEX'></a>
  847. </span><span class='l32'> INDEX
  848. </span><span class='d37'> On this page you'll find an introduction to using TinTin++. Additional
  849. information can be found in the individual help sections.
  850. </span><span class='l32'>
  851. Starting and Ending
  852. </span><span class='d37'>
  853. The syntax for starting TinTin++ is: ./tt++ [command file]
  854. Read more about the command file in the files section below. Remember
  855. one thing though. All actions, aliases, substitutions, etc, defined
  856. when starting up TinTin++ are inherited by all sessions.
  857. If you want to exit TinTin++ type '#end' or press ctrl-d on an empty
  858. line.
  859. For the WinTin++ users, if you want to paste text use shift-insert,
  860. text is automatically copied upon selection. This is typical Linux
  861. behavior, but it can take some getting used to.
  862. </span><span class='l32'>
  863. Basic features
  864. </span><span class='d37'>
  865. I'll start by explaining some of the very basic and important features:
  866. All TinTin++ commands starts with a '#'.
  867. </span><span class='l37'>Example</span><span class='d37'>: #help -- #help is a mud client command, and isn't send to the mud
  868. server.
  869. All TinTin++ commands can be abbreviated when typed.
  870. #he -- Typing #he is the same as typing #help though it's suggested to
  871. use at least 3 letter abbreviations just in case another command is
  872. added that starts with 'he'.
  873. All commands can be separated with a ';'.
  874. n;l green;s;say Dan Dare is back! -- do these 4 commands
  875. There are 3 ways ';'s can be overruled.
  876. &bsol;say Hello ;) -- Lines starting with a '&bsol;' aren't parsed by TinTin++.
  877. say Hello &bsol;;) -- The escape character can esape 1 letter.
  878. #config verbatim on -- Everything is send as is except '#' commands.
  879. </span><span class='l32'>
  880. Connecting to a mud
  881. </span><span class='l37'>
  882. Command</span><span class='d37'>: #session </span><span class='l37'>{</span><span class='d37'>session name</span><span class='l37'>} {</span><span class='d37'>mud address</span><span class='l37'>} {</span><span class='d37'>port</span><span class='l37'>}</span><span class='d37'>
  883. Example: #session someone tintin.sourceforge.net 4321
  884. You can have more than one session, in which case you can switch
  885. between sessions typing #&lt;session name&gt;.
  886. You can get a list of all sessions by typing: #session. The current
  887. active session is marked with (active). Snooped sessions with
  888. (snooped). MCCP sessions (mud client compression protocol) with
  889. (mccp 2).
  890. </span><span class='l32'>
  891. Split
  892. </span><span class='l37'>
  893. Command</span><span class='d37'>: #split
  894. The split command will create a separated input and output area.
  895. Using the #prompt command you can capture the prompt and place it on
  896. the split line. To get rid of the split interface you can use #unsplit
  897. which will restore the terminal settings to default.
  898. </span><span class='l32'>
  899. Alias
  900. </span><span class='l37'>
  901. Command</span><span class='d37'>: #alias </span><span class='l37'>{</span><span class='d37'>name</span><span class='l37'>} {</span><span class='d37'>commands</span><span class='l37'>}</span><span class='d37'>
  902. The syntax of the #alias command is almost like alias in csh.
  903. Use this command to define aliases. The variables %0, %1.. %9 contain
  904. the arguments to the aliased command as follows:
  905. the %0 variable contains ALL the arguments.
  906. the %1 variable contains the 1st argument
  907. ....
  908. the %9 variable contains the 9th argument
  909. </span><span class='l37'>Example</span><span class='d37'>: #alias greet say Greetings, most honorable %1
  910. If there are no variables on the right-side of the alias definition,
  911. any arguments following the aliases-command will be appended to the
  912. command string.
  913. </span><span class='l37'>Example</span><span class='d37'>: #alias ff cast 'fireball' -- 'ff bob' equals: cast 'fireball' bob
  914. If you want an alias to execute more commands, you must use braces.
  915. </span><span class='l37'>Example</span><span class='d37'>: #alias ws </span><span class='l37'>{</span><span class='d37'>wake;stand</span><span class='l37'>}</span><span class='d37'>
  916. To delete an alias use the #unalias command.
  917. WARNING! TinTin++ doesn't baby sit, and hence does not check for
  918. recursive aliases! You can avoid recursion by escaping the entire
  919. line.
  920. </span><span class='l37'>Example</span><span class='d37'>: #alias put &bsol;put %1 in %2
  921. Or by using the send command.
  922. </span><span class='l37'>Example</span><span class='d37'>: #send put %1 in %2
  923. </span><span class='l32'> Action
  924. </span><span class='l37'>Command</span><span class='d37'>: #action </span><span class='l37'>{</span><span class='d37'>action-text</span><span class='l37'>} {</span><span class='d37'>commands</span><span class='l37'>}</span><span class='d37'>
  925. Use this command to define an action to take place when a particular
  926. text appears on your screen. There are 99 variables you can use as
  927. wildcards in the action-text.
  928. These variables are %1, %2, %3 .... %9, %10, %11 ... %97, %98, %99.
  929. </span><span class='l37'>Example</span><span class='d37'>: #action </span><span class='l37'>{</span><span class='d37'>You are hungry</span><span class='l37'>} {</span><span class='d37'>get bread bag;eat bread</span><span class='l37'>}</span><span class='d37'>
  930. </span><span class='l37'>Example</span><span class='d37'>: #action </span><span class='l37'>{</span><span class='d37'>%1 has arrived.</span><span class='l37'>}</span><span class='d37'> shake %1 -- shake hands with people arriving.
  931. </span><span class='l37'>Example</span><span class='d37'>: #action </span><span class='l37'>{</span><span class='d37'>%1 tells you '%2'</span><span class='l37'>}
  932. {</span><span class='d37'>tell bob %1 told me '%2'</span><span class='l37'>}</span><span class='d37'> -- forward tells.
  933. </span><span class='l37'>Example</span><span class='d37'>: #action </span><span class='l37'>{</span><span class='d37'>tells you</span><span class='l37'>}</span><span class='d37'> #bell -- beep on tell.
  934. You can have TinTin++ ignore actions if you type '#ignore actions on'.
  935. You can see what commands TinTin++ executes when an action triggers
  936. by typing '#debug actions on'.
  937. You can remove actions with the #unaction command.
  938. </span><span class='l32'>
  939. Highlight
  940. </span><span class='l37'>Command</span><span class='d37'>: #highlight </span><span class='l37'>{</span><span class='d37'>text</span><span class='l37'>} {</span><span class='d37'>color</span><span class='l37'>}</span><span class='d37'>
  941. This command works a bit like #action. The purpose of this command is
  942. to substitute text from the mud with color you provide. This command
  943. is a simplified version of the #substitute command.
  944. </span><span class='l37'>Example</span><span class='d37'>: #high </span><span class='l37'>{</span><span class='d37'>Snowy</span><span class='l37'>} {</span><span class='d37'>light yellow</span><span class='l37'>}</span><span class='d37'>
  945. </span><span class='l37'>Example</span><span class='d37'>: #high </span><span class='l37'>{</span><span class='d37'>%*Snowy%*</span><span class='l37'>} {</span><span class='d37'>light yellow</span><span class='l37'>}</span><span class='d37'>
  946. Use #unhigh to delete highlights.
  947. Speedwalk
  948. If you type a command consisting ONLY of letters and numbers n, e, s,
  949. w, u, d - then this command can be interpreted as a serie of movement
  950. commands.
  951. </span><span class='l37'>Example</span><span class='d37'>: ssw2n -- go south, south, west, north, north
  952. If you have problems with typing some commands that actually ONLY
  953. consists of these letters, then type them in CAPS. For example when
  954. checking the NEWS or when asked to enter NEW as your name.
  955. You must enable speedwalking with: #config speedwalk on/off.
  956. </span><span class='l32'>
  957. Ticker
  958. </span><span class='l37'>Command</span><span class='d37'>: #ticker </span><span class='l37'>{</span><span class='d37'>name</span><span class='l37'>} {</span><span class='d37'>commands</span><span class='l37'>} {</span><span class='d37'>seconds</span><span class='l37'>}</span><span class='d37'>
  959. Every 60 seconds on a standard dikumud a so called tick occures. You
  960. regenerate hp/mana/move faster if you're sleeping/resting during a
  961. tick. So it's pretty nice to know when the next tick occures. TinTin++
  962. helps you with that.
  963. </span><span class='l37'>Example</span><span class='d37'>: #tick </span><span class='l37'>{</span><span class='d37'>tick</span><span class='l37'>} {</span><span class='d37'>#delay 50 #show 10 SECONDS TO TICK!;#show TICK!!!</span><span class='l37'>} {</span><span class='d37'>60</span><span class='l37'>}</span><span class='d37'>
  964. This creates a ticker with the name </span><span class='l37'>{</span><span class='d37'>tick</span><span class='l37'>}</span><span class='d37'> which will print TICK!!!,
  965. as well as print a warning when the next tick will occure.
  966. You can remove tickers with #untick
  967. </span><span class='l32'>
  968. Command files
  969. </span><span class='d37'>
  970. When you order TinTin++ to read a command file, it parses all the text
  971. in the file. You can use command files to keep aliases/actions in,
  972. login to a mud (name, password etc..) and basically all kinds of
  973. commands.
  974. You can make the command files with either a text editor (suggested),
  975. or use the #write command to write out a file.
  976. Commands for files:
  977. #read filename -- read and execute the file.
  978. #write filename -- write all actions/aliases/substitutes/etc known for
  979. the current session to a file.
  980. </span><span class='l32'>
  981. Repeating Commands
  982. </span><span class='d37'>
  983. You can repeat a command, the syntax is: #number command
  984. </span><span class='l37'>Example</span><span class='d37'>: #5 cackle -- if you just killed bob the wizard.
  985. </span><span class='l37'>Example</span><span class='d37'>: #10 </span><span class='l37'>{</span><span class='d37'>buy bread;put bread bag</span><span class='l37'>}</span><span class='d37'> -- repeat these 2 commands 10 times.
  986. </span><span class='l37'>Example</span><span class='d37'>: #100 ooc w00t w00t!!!!! -- nochannel yourself.
  987. </span><span class='l32'>
  988. History
  989. </span><span class='d37'>
  990. TinTin++ has a limited subset of the csh history features.
  991. ! -- repeat the last command
  992. !cast -- repeat the last command starting with cast
  993. ctrl-r -- enter the reverse history search mode.
  994. </span><span class='l32'>
  995. Map commands
  996. </span><span class='d37'>
  997. TinTin++ has a powerful highly configurable automapper. Whenever
  998. you type n/ne/e/se/s/sw/w/nw/n/u/d tt++ tries to keep track of your
  999. movement.
  1000. Commands for map:
  1001. #map create -- create a map.
  1002. #map goto 1 -- go to the first room in the map, created by default.
  1003. #map map -- display the map.
  1004. #map undo -- undo your last map alteration.
  1005. #map write &lt;filename&gt; -- save the map to file.
  1006. #map read &lt;filename&gt; -- load a map from file.
  1007. There are many other map options and it's beyond the scope of this
  1008. help section to explain everything there is to know, but I'll give
  1009. a set of commands that will get most people started.
  1010. #map create
  1011. #split 12 1
  1012. #map flag unicode on
  1013. #map flag vt on
  1014. #map goto 1
  1015. These commands will create a 12 row vt100 split section at the top of
  1016. your screen where a map drawn using unicode characters is displayed.
  1017. </span><span class='l37'>Example</span><span class='d37'>: #action </span><span class='l37'>{</span><span class='d37'>There is no exit in that direction.</span><span class='l37'>} {</span><span class='d37'>#map undo</span><span class='l37'>}</span><span class='d37'>
  1018. The map will be automatically created as you move around.
  1019. </span><span class='l32'>
  1020. Help
  1021. </span><span class='l37'>Command</span><span class='d37'>: #help </span><span class='l37'>{</span><span class='d37'>subject</span><span class='l37'>}</span><span class='d37'>
  1022. The help command is your friend and contains the same helpfiles
  1023. inside TinTin++ as are available on the website. If you type #help
  1024. without an argument you will see the various available help subjects
  1025. which try to explain the TinTin++ commands and features in greater
  1026. detail.
  1027. </span><span class='l32'>
  1028. Enjoy</span><span class='d37'>
  1029. <a name='INFO'></a>
  1030. </span><span class='l32'> INFO
  1031. </span><span class='l37'>Command</span><span class='d37'>: #info </span><span class='l37'>{</span><span class='d37'>listname</span><span class='l37'>} {</span><span class='d37'>LIST</span><span class='l37'>|</span><span class='d37'>ON</span><span class='l37'>|</span><span class='d37'>OFF</span><span class='l37'>|</span><span class='d37'>SAVE</span><span class='l37'>}</span><span class='d37'>
  1032. Without an argument info displays the settings of every tintin list.
  1033. By providing the name of a list and the LIST option it shows all
  1034. triggers/variables associated with that list. With the SAVE option
  1035. This data is written to the info variable.
  1036. #info cpu will show information about tintin's cpu usage.
  1037. #info system will show some system information.
  1038. </span><span class='l37'>Related</span><span class='d37'>: class, debug, ignore, kill and message.
  1039. <a name='KEYPAD'></a>
  1040. </span><span class='l32'> KEYPAD
  1041. </span><span class='d37'>When TinTin++ starts up it sends &bsol;e= to the terminal to enable the terminal's
  1042. application keypad mode, which can be disabled using #showme {&bsol;e&gt;}
  1043. </span><span class='l37'> Configuration A Configuration B Configuration C</span><span class='d37'>
  1044. +-----+-----+-----+-----+ +-----+-----+-----+-----+ +-----+-----+-----+-----+
  1045. |Num |/ |* |- | |Num |/ |* |- | |Num |nkp/ |nkp* |nkp- |
  1046. +-----+-----+-----+-----+ +-----+-----+-----+-----+ +-----+-----+-----+-----+
  1047. |7 |8 |9 | | |Home |Up |PgUp | | |nkp7 |nkp8 |nkp9 | |
  1048. +-----+-----+-----+ | +-----+-----+-----+ | +-----+-----+-----+ |
  1049. |4 |5 |6 |+ | |Left |Centr|Right|+ | |nkp4 |nkp5 |nkp6 |nkp+ |
  1050. +-----+-----+-----+-----+ +-----+-----+-----+-----+ +-----+-----+-----+-----+
  1051. |1 |2 |3 | | |End |Down |PgDn | | |nkp1 |nkp2 |nkp3 | |
  1052. +-----+-----+-----+ | +-----+-----+-----+ | +-----+-----+-----+ |
  1053. |0 |. |Enter| |Ins |Del |Enter| |nkp0 |nkp. |nkpEn|
  1054. +-----------+-----+-----+ +-----------+-----+-----+ +-----------+-----+-----+
  1055. With keypad mode disabled numlock on will give you configuration A, and numlock
  1056. off will give you configuration B. With keypad mode enabled you'll get
  1057. configuration C.
  1058. </span><span class='l37'>Terminals that support keypad mode
  1059. </span><span class='d37'>Linux Console, PuTTY, Eterm, aterm.
  1060. </span><span class='l37'>Terminals that do not support keypad mode
  1061. </span><span class='d37'>RXVT on Cygwin, Windows Console, Gnome Terminal, Konsole.
  1062. </span><span class='l37'>Peculiar Terminals
  1063. </span><span class='d37'>RXVT requires turning off numlock to enable configuration C.
  1064. Xterm may require disabling Alt/NumLock Modifiers (num-lock) in the ctrl-left
  1065. click menu. Or edit ~/.Xresources and add XTerm*VT100.numLock:false
  1066. Mac OS X Terminal requires enabling 'strict vt100 keypad behavior' in
  1067. Terminal -&gt; Window Settings -&gt; Emulation.
  1068. </span><span class='l37'>Related</span><span class='d37'>: colors, coordinates, escape, mathematics and pcre.
  1069. <a name='KILL'></a>
  1070. </span><span class='l32'> KILL
  1071. </span><span class='l37'>Command</span><span class='d37'>: #kill </span><span class='l37'>{</span><span class='d37'>list</span><span class='l37'>} {</span><span class='d37'>pattern</span><span class='l37'>}</span><span class='d37'>
  1072. Without an argument, the kill command clears all lists. Useful if
  1073. you don't want to exit tintin to reload your command files.
  1074. With one argument a specific list can be cleared.
  1075. With two arguments the triggers in the chosen list that match the
  1076. given pattern will be removed.
  1077. </span><span class='l37'>Example</span><span class='d37'>: #kill alias %*test*
  1078. </span><span class='l37'>Related</span><span class='d37'>: class, debug, ignore, info and message.
  1079. <a name='LINE'></a>
  1080. </span><span class='l32'> LINE
  1081. </span><span class='l37'>Command</span><span class='d37'>: #line </span><span class='l37'>{</span><span class='d37'>option</span><span class='l37'>} {</span><span class='d37'>argument</span><span class='l37'>}</span><span class='d37'>
  1082. </span><span class='l37'>#line background &lt;argument&gt;
  1083. </span><span class='d37'> Prevent new session activation.
  1084. </span><span class='l37'>#line debug &lt;argument&gt;
  1085. </span><span class='d37'> Argument is executed in debug mode.
  1086. </span><span class='l37'>#line gag
  1087. </span><span class='d37'> Gag the next line.
  1088. </span><span class='l37'>#line ignore {argument}
  1089. </span><span class='d37'> Argument is executed without any triggers being checked.
  1090. </span><span class='l37'>#line log &lt;filename&gt; [text]
  1091. </span><span class='d37'> Log the next line to file unless the [text] argument is
  1092. provided.
  1093. </span><span class='l37'>#line logmode &lt;option&gt; &lt;argument&gt;
  1094. </span><span class='d37'> Argument is executed using the provided logmode, available
  1095. modes are: html, plain, and raw.
  1096. </span><span class='l37'>#line oneshot &lt;argument&gt;
  1097. </span><span class='d37'> Argument is executed in oneshot mode, all triggers created will
  1098. only fire once.
  1099. </span><span class='l37'>#line quiet &lt;argument&gt;
  1100. </span><span class='d37'> Argument is executed with suppression of most system messages.
  1101. </span><span class='l37'>#line strip &lt;argument&gt;
  1102. </span><span class='d37'> Argument is executed with all color codes stripped.
  1103. </span><span class='l37'>#line substitute &lt;options&gt; &lt;argument&gt;
  1104. </span><span class='d37'> Argument is executed using the provided substitutions, available
  1105. options are: arguments, colors, escapes, functions, secure, and
  1106. variables.
  1107. </span><span class='l37'>#line verbatim &lt;argument&gt;
  1108. </span><span class='d37'> Argument is executed verbatim, prohibiting variable and function
  1109. substitutions.
  1110. </span><span class='l37'>#line verbose &lt;argument&gt;
  1111. </span><span class='d37'> Argument is executed with most system messages enabled.
  1112. When using #line log and logging in html format use &bsol;c&lt; &bsol;c&gt; &bsol;c&amp; &bsol;c&quot; to
  1113. log a literal &lt; &gt; &amp; and &quot;.
  1114. </span><span class='l37'>Related</span><span class='d37'>: class and config.
  1115. <a name='LIST'></a>
  1116. </span><span class='l32'> LIST
  1117. </span><span class='l37'>Command</span><span class='d37'>: #list </span><span class='l37'>{</span><span class='d37'>variable</span><span class='l37'>} {</span><span class='d37'>option</span><span class='l37'>} {</span><span class='d37'>argument</span><span class='l37'>}</span><span class='d37'>
  1118. #list {var} {add} {item} Add {item} to the list
  1119. #list {var} {clear} Empty the given list
  1120. #list {var} {create} {item} Create a list using {items}
  1121. #list {var} {delete} {index} {number} Delete the item at {index},
  1122. the {number} is optional.
  1123. #list {var} {insert} {index} {string} Insert {string} at given index
  1124. #list {var} {find} {string} {variable} Return the found index
  1125. #list {var} {get} {index} {variable} Copy an item to {variable}
  1126. #list {var} {set} {index} {string} Change the item at {index}
  1127. #list {var} {simplify} {variable} Copy simple list to {variable}
  1128. #list {var} {size} {variable} Copy list size to {variable}
  1129. #list {var} {sort} {string} Insert item in alphabetic order
  1130. #list {var} {tokenize} {string} Create a character list
  1131. The index should be between 1 and the list's length. You can also give
  1132. a negative value, in which case -1 equals the last item in the list, -2
  1133. the second last, etc.
  1134. When inserting an item a positive index will prepend the item at the
  1135. given index, while a negative index will append the item.
  1136. The add and create options allow using multiple items, as well
  1137. as semicolon separated items.
  1138. A length of 0 is returned for an empty or non existant list.
  1139. You can directly access elements in a list variable using &dollar;var[1],
  1140. &dollar;var[2], &dollar;var[-1], etc.
  1141. </span><span class='l37'>Related</span><span class='d37'>: break, continue, foreach, loop, parse, repeat, return and while.
  1142. <a name='LOCAL'></a>
  1143. </span><span class='l32'> LOCAL
  1144. </span><span class='l37'>Command</span><span class='d37'>: #local </span><span class='l37'>{</span><span class='d37'>variable name</span><span class='l37'>} {</span><span class='d37'>text to fill variable</span><span class='l37'>}</span><span class='d37'>
  1145. The local command sets a local variable. Unlike a regular variable
  1146. a local variable will only stay in memory for the duration of the
  1147. event that created it. They are accessed in the same way as a
  1148. regular variable.
  1149. Commands that store information to a variable will use a local variable
  1150. if it exists.
  1151. Avoid setting the result variable as local in a function.
  1152. </span><span class='l37'>Example</span><span class='d37'>: #alias {swap} {#local x %0;#replace x {e} {u};#showme &dollar;x}
  1153. </span><span class='l37'>Related</span><span class='d37'>: format, function, math, replace, script and variable.
  1154. <a name='LOG'></a>
  1155. </span><span class='l32'> LOG
  1156. </span><span class='l37'>Command</span><span class='d37'>: #log </span><span class='l37'>{</span><span class='d37'>append</span><span class='l37'>|</span><span class='d37'>overwrite</span><span class='l37'>} {</span><span class='d37'>filename</span><span class='l37'>}</span><span class='d37'>
  1157. Logs session to a file, you can set the data type to either plain,
  1158. raw, or html with the config command.
  1159. </span><span class='l37'>Related</span><span class='d37'>: read, scan, textin and write.
  1160. <a name='LOOP'></a>
  1161. </span><span class='l32'> LOOP
  1162. </span><span class='l37'>Command</span><span class='d37'>: #loop </span><span class='l37'>{</span><span class='d37'>&lt;start&gt;</span><span class='l37'>} {</span><span class='d37'>&lt;finish&gt;</span><span class='l37'>} {</span><span class='d37'>&lt;variable&gt;</span><span class='l37'>} {</span><span class='d37'>commands</span><span class='l37'>}</span><span class='d37'>
  1163. Like a for statement, loop will loop from start to finish incrementing
  1164. or decrementing by 1 each time through. The value of the loop counter
  1165. is stored in the provided variable, which you can use in the commands.
  1166. </span><span class='l37'>Example</span><span class='d37'>: #loop 1 3 loop {get all &dollar;loop&bsol;.corpse}
  1167. This equals 'get all 1.corpse;get all 2.corpse;get all 3.corpse'.
  1168. The . needs to be escaped so it's not treated as part of the variable.
  1169. </span><span class='l37'>Example</span><span class='d37'>: #loop 3 1 cnt {drop &dollar;cnt&bsol;.key}
  1170. This equals 'drop 3.key;drop 2.key;drop 1.key'.
  1171. </span><span class='l37'>Related</span><span class='d37'>: break, continue, foreach, list, parse, repeat, return and while.
  1172. <a name='MACRO'></a>
  1173. </span><span class='l32'> MACRO
  1174. </span><span class='l37'>Command</span><span class='d37'>: #macro </span><span class='l37'>{</span><span class='d37'>key sequence</span><span class='l37'>} {</span><span class='d37'>commands</span><span class='l37'>}</span><span class='d37'>
  1175. Macros allow you to make tintin respond to function keys.
  1176. The key sequence send to the terminal when pressing a function key
  1177. differs for every OS and terminal. To find out what sequence is send
  1178. you can enable the CONVERT META config option.
  1179. Another option is pressing ctrl-v, which will enable CONVERT META for
  1180. the next key pressed.
  1181. If you only want a key sequence to trigger at the start of an input
  1182. line prefix the key sequence with ^.
  1183. </span><span class='l37'>Example</span><span class='d37'>: #macro {(press ctrl-v)(press F1)} {#showme &bsol;e[2J;#buffer lock}
  1184. Clear the screen and lock the window when you press F1, useful when the
  1185. boss is near.
  1186. </span><span class='l37'>Example</span><span class='d37'>: #macro {&bsol;eOM} {#cursor enter}
  1187. Makes the keypad's enter key work as an enter in keypad mode.
  1188. </span><span class='l37'>Example</span><span class='d37'>: #macro {^nn} {n}
  1189. Makes pressing n twice on an empty line execute north.
  1190. </span><span class='l37'>Comment</span><span class='d37'>: Not all terminals properly initialize the keypad key sequences.
  1191. If this is the case you can still use the keypad, but instead of the
  1192. arrow keys use ctrl b, f, p, and n.
  1193. </span><span class='l37'>Comment</span><span class='d37'>: You can remove a macro with the #unmacro command.
  1194. </span><span class='l37'>Related</span><span class='d37'>: alias, cursor, history, keypad, speedwalk and tab.
  1195. <a name='MAP'></a>
  1196. </span><span class='l32'> MAP
  1197. </span><span class='l37'>Command</span><span class='d37'>: #map
  1198. The map command is the backbone of the auto mapping feature.
  1199. </span><span class='l37'>#map at &lt;exit|vnum&gt; &lt;command&gt;
  1200. </span><span class='d37'> Execute the command at the given exit or vnum.
  1201. </span><span class='l37'>#map center &lt;x&gt; &lt;y&gt; &lt;z&gt;
  1202. </span><span class='d37'> Sets displaying center of the map viewer, default is 0 0 0.
  1203. </span><span class='l37'>#map color &lt;field&gt; [value]
  1204. </span><span class='d37'> Sets the map color for the given color field.
  1205. </span><span class='l37'>#map create &lt;size&gt;
  1206. </span><span class='d37'> Creates a new map and room 1. The default size is 50000 rooms.
  1207. </span><span class='l37'>#map destroy
  1208. </span><span class='d37'> Deletes the map.
  1209. </span><span class='l37'>#map delete &lt;exit|vnum&gt;
  1210. </span><span class='d37'> Deletes the room for the given exit or vnum.
  1211. </span><span class='l37'>#map dig &lt;exit|vnum&gt; [new|&lt;vnum&gt;]
  1212. </span><span class='d37'> Creates an exit for the given exit name. If no valid exit name
  1213. is given or no existing room is found a new room is created.
  1214. Useful for portal links and other alternative forms of
  1215. transportation. If the 'new' argument is provided all existing
  1216. rooms are ignored and a new room is created. If a room vnum is
  1217. given as the second argument an exit will be created leading
  1218. to the given room vnum. If the room vnum doesn't exist a new
  1219. room is created.
  1220. </span><span class='l37'>#map exit &lt;exit&gt; &lt;option&gt; &lt;arg&gt;
  1221. </span><span class='d37'> Set the exit data. Useful with a closed door where you can
  1222. set the exit command: '#map exit e command {open east;e}'.
  1223. Use #map exit &lt;exit&gt; for a list of available options.
  1224. </span><span class='l37'>#map exitflag &lt;exit&gt; &lt;HIDE|AVOID&gt; [on|off]
  1225. </span><span class='d37'> Set exit flags. See #map roomflag for more info.
  1226. </span><span class='l37'>#map explore &lt;exit&gt;
  1227. </span><span class='d37'> Explores the given exit until a dead end or an
  1228. intersection is found. The route is stored in #path and can
  1229. subsequently be used with #walk. Useful for long roads.
  1230. </span><span class='l37'>#map find &lt;name&gt; &lt;exits&gt; &lt;desc&gt; &lt;area&gt; &lt;note&gt; &lt;terrain&gt; &lt;flag&gt;
  1231. </span><span class='d37'> searches for the given room name. If found the shortest path
  1232. from your current location to the destination is calculated.
  1233. The route is stored in #path and can subsequently be used with
  1234. the various #path commands. If &lt;exits&gt; is provided all exits
  1235. must be matched, if &lt;roomdesc&gt;, &lt;roomarea&gt; or &lt;roomnote&gt; or
  1236. &lt;roomterrain&gt; or &lt;roomflag&gt; is provided these are matched as
  1237. well against the room to be found.
  1238. These options are also available to the at, delete, goto
  1239. link, list and run commands.
  1240. </span><span class='l37'>#map flag asciigraphics
  1241. </span><span class='d37'> Takes up more space but draws a more detailed
  1242. map that displays the ne se sw nw exits and room symbols.
  1243. </span><span class='l37'>#map flag asciivnums
  1244. </span><span class='d37'> Display room vnums if asciigraphics is enabled.
  1245. </span><span class='l37'>#map flag nofollow
  1246. </span><span class='d37'> When you enter movement commands the map will no longer
  1247. automatically follow along. Useful for MSDP and GMCP
  1248. automapping scripts.
  1249. </span><span class='l37'>#map flag static
  1250. </span><span class='d37'> Will make the map static so new rooms are no longer
  1251. created when walking into an unmapped direction. Useful when
  1252. you're done mapping and regularly bump into walls accidentally
  1253. creating a new room. #map dig etc will still work.
  1254. </span><span class='l37'>#map flag vtgraphics
  1255. </span><span class='d37'> Enables vt line drawing on some terminals
  1256. </span><span class='l37'>#map flag vtmap
  1257. </span><span class='d37'> Will enable the vtmap which is shown in the top split
  1258. screen if you have one. You can create a 16 rows high top
  1259. screen by using '#split 16 1'.
  1260. </span><span class='l37'>#map get &lt;option&gt; &lt;variable&gt; [vnum]
  1261. </span><span class='d37'> Store a map value into a variable, if no vnum is given the
  1262. current room is used. Use 'all' as the option to store all
  1263. values as a table.
  1264. </span><span class='l37'>#map get roomexits &lt;variable&gt;
  1265. </span><span class='d37'> Store all room exits into variable.
  1266. </span><span class='l37'>#map global &lt;room vnum&gt;
  1267. </span><span class='d37'> Set the vnum of a room that contains global
  1268. exits, for example an exit named 'recall' that leads to the
  1269. recall location. The room can contain multiple exits, in case
  1270. there are multiple commands that are similar to recall.
  1271. </span><span class='l37'>#map goto &lt;room vnum&gt; [dig]
  1272. </span><span class='d37'> Takes you to the given room vnum, with the
  1273. dig argument a new room will be created if none exists.
  1274. </span><span class='l37'>#map goto &lt;name&gt; &lt;exits&gt; &lt;desc&gt; &lt;area&gt; &lt;note&gt; &lt;terrain&gt;
  1275. </span><span class='d37'> Takes you to the given room name, if you provide exits those
  1276. must match.
  1277. </span><span class='l37'>#map info
  1278. </span><span class='d37'> Gives information about the map and room you are in.
  1279. </span><span class='l37'>#map insert &lt;direction&gt; [roomflag]
  1280. </span><span class='d37'> Insert a room in the given direction. Most useful for inserting
  1281. void rooms.
  1282. </span><span class='l37'>#map jump &lt;x&gt; &lt;y&gt; &lt;z&gt;
  1283. </span><span class='d37'> Jump to the given coordinate, which is relative
  1284. to your current room.
  1285. </span><span class='l37'>#map leave
  1286. </span><span class='d37'> Makes you leave the map. Useful when entering a maze. You
  1287. can return to your last known room using #map return.
  1288. </span><span class='l37'>#map legend &lt;legend&gt; [symbols|reset]
  1289. #map legend &lt;legend&gt; &lt;index&gt; [symbol]
  1290. </span><span class='d37'> There are several legends and sub-legends available for
  1291. drawing maps to suit personal preference and character sets.
  1292. Use #map legend all to see the legend as currently defined.
  1293. Use #map legend &lt;legend&gt; &lt;reset&gt; to set the default legend.
  1294. Use #map legend &lt;legend&gt; &lt;character list&gt; to create a custom
  1295. legend. Custom legends are automatically saved and loaded by
  1296. using #map read and #map write.
  1297. </span><span class='l37'>#map link &lt;direction&gt; &lt;room name&gt; [both]
  1298. </span><span class='d37'> Links two rooms. If the both
  1299. argument and a valid direction is given the link is two ways.
  1300. </span><span class='l37'>#map list &lt;name&gt; &lt;exits&gt; &lt;desc&gt; &lt;area&gt; &lt;note&gt; &lt;terrain&gt;
  1301. </span><span class='d37'> Lists all matching rooms and their distance. The following
  1302. search keywords are supported.
  1303. {roomarea} &lt;arg&gt; will list rooms with matching area name.
  1304. {roomdesc} &lt;arg&gt; will list rooms with matching room desc.
  1305. {roomexits} &lt;arg&gt; will list rooms with identical room exits.
  1306. {roomflag} &lt;arg&gt; will list rooms with matching room flags.
  1307. {roomid} &lt;arg&gt; will list rooms with identical id name.
  1308. {roomname} &lt;arg&gt; will list rooms with matching room name.
  1309. {roomnote} &lt;arg&gt; will list rooms with matching room note.
  1310. {roomterrain} &lt;arg&gt; will list rooms with matching room terrain.
  1311. {variable} &lt;arg&gt; will save the output to given variable.
  1312. </span><span class='l37'>#map map &lt;rows&gt; &lt;cols&gt; &lt;append|overwrite|list|variable&gt; &lt;name&gt;
  1313. </span><span class='d37'> Display a drawing of the map of the given height and width.
  1314. All arguments are optional. If {rows} or {cols} are set to {}
  1315. or {0} they will use the scrolling window size as the default.
  1316. If {rows} or {cols} are a negative number this number is
  1317. subtracted from the scrolling window size.
  1318. </span><span class='l37'>#map map &lt;rows&gt; &lt;cols&gt; draw &lt;square&gt;
  1319. </span><span class='d37'> Display a drawing of the map of the given height and width.
  1320. The square argument exists of 4 numbers formulating the top
  1321. left corner and bottom right corner of a square.
  1322. If you use {append|overwrite} the map is written to the specified
  1323. file name which must be given as the 4th argument.
  1324. If you use {list|variable} the map is saved to the specified
  1325. variable name.
  1326. </span><span class='l37'>#map move &lt;direction&gt;
  1327. </span><span class='d37'> This does the same as an actual movement
  1328. command, updating your location on the map and creating new
  1329. rooms. Useful when you are following someone and want the map
  1330. to follow. You will need to create actions using '#map move',
  1331. for this to work.
  1332. </span><span class='l37'>#map offset &lt;row&gt; &lt;col&gt; &lt;row&gt; &lt;col&gt;
  1333. </span><span class='d37'> Define the offset of the vtmap as a square. Without an argument
  1334. it defaults to the entire top split region.
  1335. </span><span class='l37'>#map read &lt;filename&gt;
  1336. </span><span class='d37'> Will load the given map file.
  1337. </span><span class='l37'>#map resize &lt;size&gt;
  1338. </span><span class='d37'> Resize the map, setting the maximum number of rooms.
  1339. </span><span class='l37'>#map return
  1340. </span><span class='d37'> Returns you to your last known room after leaving the map
  1341. or loading a map.
  1342. </span><span class='l37'>#map roomflag &lt;flags&gt; &lt;get|on|off&gt;
  1343. </span><span class='d37'>
  1344. </span><span class='l37'>#map roomflag avoid
  1345. </span><span class='d37'> When set, '#map find' will avoid a route leading
  1346. through that room. Useful when you want to avoid death traps.
  1347. </span><span class='l37'>#map roomflag hide
  1348. </span><span class='d37'> When set, '#map' will not display the map beyond
  1349. this room. When mapping overlapping areas or areas that aren't
  1350. build consistently you need this flag as well to stop
  1351. auto-linking, unless you use void rooms.
  1352. </span><span class='l37'>#map roomflag leave
  1353. </span><span class='d37'> When entering a room with this flag, you will
  1354. automatically leave the map. Useful when set at the entrance
  1355. of an unmappable maze.
  1356. </span><span class='l37'>#map roomflag noglobal
  1357. </span><span class='d37'> This marks a room as not allowing global
  1358. transportation, like norecall rooms that block recall.
  1359. </span><span class='l37'>#map roomflag void
  1360. </span><span class='d37'> When set the room becomes a spacing room that can
  1361. be used to connect otherwise overlapping areas. A void room
  1362. should only have two exits. When entering a void room you are
  1363. moved to the connecting room until you enter a non void room.
  1364. </span><span class='l37'>#map roomflag static
  1365. </span><span class='d37'> When set the room will no longer be autolinked
  1366. when walking around. Useful for mapping mazes.
  1367. </span><span class='l37'>#map run &lt;room name&gt; [delay]
  1368. </span><span class='d37'> Calculates the shortest path to the destination and walks you
  1369. there. The delay is optional and requires using braces. Besides
  1370. the room name a list of exits can be provided for more precise
  1371. matching.
  1372. </span><span class='l37'>#map set &lt;option&gt; &lt;value&gt; [vnum]
  1373. </span><span class='d37'> Set a map value for your current room, or given room if a room
  1374. vnum is provided.
  1375. </span><span class='l37'>#map travel &lt;direction&gt; &lt;delay&gt;
  1376. </span><span class='d37'> Follows the direction until a dead end or an intersection is
  1377. found. Use braces around the direction if you use the delay,
  1378. which will add the given delay between movements.
  1379. Use #path stop to stop a delayed run.
  1380. </span><span class='l37'>#map undo
  1381. </span><span class='d37'> Will undo your last move. If this created a room or a link
  1382. they will be deleted, otherwise you'll simply move back a
  1383. room. Useful if you walked into a non existant direction.
  1384. </span><span class='l37'>#map uninsert &lt;direction&gt;
  1385. </span><span class='d37'> Exact opposite of the insert command.
  1386. </span><span class='l37'>#map unlink &lt;direction&gt; [both]
  1387. </span><span class='d37'> Will remove the exit, this isn't two way so you can have the
  1388. properly display no exit rooms and mazes.
  1389. If you use the both argument the exit is removed two-ways.
  1390. </span><span class='l37'>#map update
  1391. </span><span class='d37'> Sets the vtmap to update within the next 0.1 seconds.
  1392. </span><span class='l37'>#map vnum &lt;low&gt; [high]
  1393. </span><span class='d37'> Change the room vnum to the given number, if a range is
  1394. provided the first available room in that range is selected.
  1395. </span><span class='l37'>#map write &lt;filename&gt; [force]
  1396. </span><span class='d37'> Will save the map, if you want to save a map to a .tin file
  1397. you must provide the {force} argument.
  1398. </span><span class='l37'>Related</span><span class='d37'>: path and pathdir.
  1399. <a name='MATH'></a>
  1400. </span><span class='l32'> MATH
  1401. </span><span class='l37'>Command</span><span class='d37'>: #math </span><span class='l37'>{</span><span class='d37'>variable</span><span class='l37'>} {</span><span class='d37'>expression</span><span class='l37'>}</span><span class='d37'>
  1402. Performs math operations and stores the result in a variable. The math
  1403. follows a C-like precedence, as follows, with the top of the list
  1404. having the highest priority.
  1405. Operators Priority Function
  1406. ------------------------------------------------
  1407. ! 0 logical not
  1408. ~ 0 bitwise not
  1409. * 1 integer multiply
  1410. ** 1 integer power
  1411. / 1 integer divide
  1412. // 1 integer sqrt // 2 or cbrt // 3
  1413. % 1 integer modulo
  1414. d 1 integer random dice roll
  1415. + 2 integer addition
  1416. - 2 integer subtraction
  1417. &lt;&lt; 3 bitwise shift
  1418. &gt;&gt; 3 bitwise shift
  1419. .. 3 bitwise ellipsis
  1420. &gt; 4 logical greater than
  1421. &gt;= 4 logical greater than or equal
  1422. &lt; 4 logical less than
  1423. &lt;= 4 logical less than or equal
  1424. == 5 logical equal (can use regex)
  1425. === 5 logical equal (never regex)
  1426. != 5 logical not equal (can use regex)
  1427. !== 5 logical not equal (never regex)
  1428. &amp; 6 bitwise and
  1429. ^ 7 bitwise xor
  1430. | 8 bitwise or
  1431. &amp;&amp; 9 logical and
  1432. ^^ 10 logical xor
  1433. || 11 logical or
  1434. True is any non-zero number, and False is zero. Parentheses () have
  1435. highest precedence, so inside the () is always evaluated first.
  1436. Strings must be enclosed in { } and use regex with == and !=,
  1437. in the case of &lt;= and &gt;= the alphabetic order is compared.
  1438. The #if and #switch commands use #math. Several commands accepting
  1439. integer input allow math operations as well.
  1440. Floating point precision is added by using the decimal . operator.
  1441. Time in seconds is calculated using [day]:[hour]:&lt;minute&gt;:&lt;second&gt;.
  1442. </span><span class='l37'>Example</span><span class='d37'>: #math {heals} {&dollar;mana / 40}
  1443. Assuming there is a variable &dollar;mana, divides its value by 40 and stores
  1444. the result in &dollar;heals.
  1445. </span><span class='l37'>Example</span><span class='d37'>: #action {^You receive %0 experience} {updatexp %0}
  1446. #alias updatexp {#math {xpneed} {&dollar;xpneed - %0}
  1447. Let's say you have a variable which stores xp needed for your next
  1448. level. The above will modify that variable after every kill, showing
  1449. the amount still needed.
  1450. </span><span class='l37'>Example</span><span class='d37'>: #action {%0 tells %1}
  1451. {#if {{%0} == {Bubba} &amp;&amp; &dollar;afk} {reply I'm away, my friend.}}
  1452. When you are away from keyboard, it will only reply to your friend.
  1453. </span><span class='l37'>Related</span><span class='d37'>: format, function, local, mathematics, replace, script and variable.
  1454. <a name='MATHEMATICS'></a>
  1455. </span><span class='l32'> MATHEMATICS
  1456. </span><span class='l37'>Number operations
  1457. </span><span class='d37'> Operators Priority Function
  1458. ------------------------------------------------
  1459. ! 0 logical not
  1460. ~ 0 bitwise not
  1461. * 1 integer multiply
  1462. ** 1 integer power
  1463. / 1 integer divide
  1464. // 1 integer sqrt // 2 or cbrt // 3
  1465. % 1 integer modulo
  1466. d 1 integer random dice roll
  1467. + 2 integer addition
  1468. - 2 integer subtraction
  1469. &lt;&lt; 3 bitwise shift
  1470. &gt;&gt; 3 bitwise shift
  1471. &gt; 4 logical greater than
  1472. &gt;= 4 logical greater than or equal
  1473. &lt; 4 logical less than
  1474. &lt;= 4 logical less than or equal
  1475. == 5 logical equal
  1476. != 5 logical not equal
  1477. &amp; 6 bitwise and
  1478. ^ 7 bitwise xor
  1479. | 8 bitwise or
  1480. &amp;&amp; 9 logical and
  1481. ^^ 10 logical xor
  1482. || 11 logical or
  1483. Operator priority can be ignored by using paranthesis, for example (1 + 1) * 2
  1484. equals 4, while 1 + 1 * 2 equals 3.
  1485. </span><span class='l37'>String operations</span><span class='d37'>
  1486. Operators Priority Function
  1487. ------------------------------------------------
  1488. &gt; 4 alphabetical greater than
  1489. &gt;= 4 alphabetical greater than or equal
  1490. &lt; 4 alphabetical less than
  1491. &lt;= 4 alphabetical less than or equal
  1492. == 5 alphabetical equal (can use regex)
  1493. != 5 alphabetical not equal (can use regex)
  1494. Strings must be encased in double quotes or braces. The &gt; &gt;= &lt; &lt;= operators
  1495. perform basic string comparisons. The == != operators perform regular
  1496. expressions, with the argument on the left being the string, and the argument
  1497. on the right being the regex. For example {bla} == {%*a} would evaluate as 1.
  1498. </span><span class='l37'>Related</span><span class='d37'>: math
  1499. <a name='MESSAGE'></a>
  1500. </span><span class='l32'> MESSAGE
  1501. </span><span class='l37'>Command</span><span class='d37'>: #message </span><span class='l37'>{</span><span class='d37'>listname</span><span class='l37'>} {</span><span class='d37'>on</span><span class='l37'>|</span><span class='d37'>off</span><span class='l37'>}</span><span class='d37'>
  1502. This will show the message status of all your lists if typed without an
  1503. argument. If you set for example VARIABLES to OFF you will no longer be
  1504. spammed when correctly using the #VARIABLE and #UNVARIABLE commands.
  1505. </span><span class='l37'>Related</span><span class='d37'>: class, debug, ignore, info and kill.
  1506. <a name='MSDP'></a>
  1507. </span><span class='l32'> MSDP
  1508. </span><span class='d37'>
  1509. MSDP is part of the #port functionality. See #help event for
  1510. additional documentation as all MSDP events are available as
  1511. regular events.
  1512. Available MSDP events can be queried using the MSDP protocol
  1513. as described in the specification.
  1514. </span><span class='l37'>
  1515. https://tintin.sourceforge.io/protocols/msdp
  1516. Related</span><span class='d37'>: event and port.
  1517. <a name='NOP'></a>
  1518. </span><span class='l32'> NOP
  1519. </span><span class='l37'>Command</span><span class='d37'>: #nop </span><span class='l37'>{</span><span class='d37'>whatever</span><span class='l37'>}</span><span class='d37'>
  1520. Short for 'no operation', and is ignored by the client. It is useful
  1521. for commenting in your coms file, any text after the nop and before a
  1522. semicolon or end of line is ignored. You shouldn't put braces { } in it
  1523. though, unless you close them properly.
  1524. </span><span class='l37'>Comment</span><span class='d37'>: By using braces you can comment out multiple lines of code in a script
  1525. file.
  1526. For commenting out an entire trigger and especially large sections of
  1527. triggers you would want to use /* text */
  1528. </span><span class='l37'>Example</span><span class='d37'>: #nop This is the start of my script file.
  1529. </span><span class='l37'>Related</span><span class='d37'>: read
  1530. <a name='PARSE'></a>
  1531. </span><span class='l32'> PARSE
  1532. </span><span class='l37'>Command</span><span class='d37'>: #parse </span><span class='l37'>{</span><span class='d37'>string</span><span class='l37'>} {</span><span class='d37'>variable</span><span class='l37'>} {</span><span class='d37'>commands</span><span class='l37'>}</span><span class='d37'>
  1533. Like the loop statement, parse will loop from start to finish through
  1534. the given string. The value of the current character is stored in the
  1535. provided variable.
  1536. </span><span class='l37'>Example</span><span class='d37'>: #parse {hello world} {char} {#showme &dollar;char}
  1537. </span><span class='l37'>Related</span><span class='d37'>: break, continue, foreach, list, loop, repeat, return and while.
  1538. <a name='PATH'></a>
  1539. </span><span class='l32'> PATH
  1540. </span><span class='l37'>Command</span><span class='d37'>: #path </span><span class='l37'>{</span><span class='d37'>option</span><span class='l37'>} {</span><span class='d37'>argument</span><span class='l37'>}</span><span class='d37'>
  1541. create Will clear the path and start path mapping.
  1542. delete Will delete the last move of the path.
  1543. describe Describe the path and current position.
  1544. destroy Will clear the path and stop path mapping.
  1545. goto Go the the start, end, or given position index.
  1546. insert Add the given argument to the path.
  1547. load Load the given variable as the new path.
  1548. map Display the map and the current position.
  1549. move Move the position forward or backward. If a number is given
  1550. the position is changed by the given number of steps.
  1551. run Execute the current path, with an optional floating point
  1552. delay in seconds as the second argument.
  1553. save Save the path to a variable. You must specify whether you
  1554. want to save the path 'forward' or 'backward'. If you use
  1555. the 'length' or 'position' keywords the current length or
  1556. position is saved.
  1557. swap Switch the forward and backward path.
  1558. unzip Load the given speedwalk as the new path.
  1559. walk Take one step forward or backward.
  1560. zip Turn the path into a speedwalk.
  1561. </span><span class='l37'>Example</span><span class='d37'>: #path ins {unlock n;open n} {unlock s;open s}
  1562. </span><span class='l37'>Related</span><span class='d37'>: map and pathdir.
  1563. <a name='PATHDIR'></a>
  1564. </span><span class='l32'> PATHDIR
  1565. </span><span class='l37'>Command</span><span class='d37'>: #pathdir </span><span class='l37'>{</span><span class='d37'>dir</span><span class='l37'>} {</span><span class='d37'>reversed dir</span><span class='l37'>} {</span><span class='d37'>coord</span><span class='l37'>}</span><span class='d37'>
  1566. By default tintin sets the most commonly used movement commands
  1567. meaning you generally don't really have to bother with pathdirs.
  1568. Pathdirs are used by the #path and #map commands.
  1569. The first argument is a direction, the second argument is the reversed
  1570. direction. The reverse direction of north is south, etc.
  1571. The third argument is a spatial coordinate which is a power of two.
  1572. 'n' is 1, 'e' is 2, 's' is 4, 'w' is '8', 'u' is 16, 'd' is 32. The
  1573. exception is for compound directions, whose value should be the sum
  1574. of the values of each cardinal direction it is composed of. For
  1575. example, 'nw' is the sum of 'n' and 'w' which is 1 + 8, so 'nw'
  1576. needs to be given the value of 9. This value is required for the
  1577. #map functionality to work properly.
  1578. </span><span class='l37'>Example</span><span class='d37'>: #pathdir {ue} {dw} {18}
  1579. #pathdir {dw} {ue} {40}
  1580. </span><span class='l37'>Comment</span><span class='d37'>: You can remove a pathdir with the #unpathdir command.
  1581. </span><span class='l37'>Related</span><span class='d37'>: map and path.
  1582. <a name='PCRE'></a>
  1583. </span><span class='l32'> PCRE
  1584. </span><span class='d37'>
  1585. A regular expression, regex or regexp is a sequence of characters that
  1586. defines a search pattern. Since the 1980s, different syntaxes for
  1587. writing regular expressions exist, the two most widely used ones being
  1588. the POSIX syntax and the similar but more advanced Perl standard.
  1589. TinTin++ supports the Perl standard known as PCRE (Perl Compatible
  1590. Regular Expressions).
  1591. Regular expressions are an integral part of TinTin++, but keep in mind
  1592. that tintin doesn't allow you to use regular expressions directly,
  1593. instead it uses a simpler intermediate syntax that still allows more
  1594. complex expressions when needed.
  1595. Commands that utilize regular expressions are: action, alias, elseif,
  1596. gag, grep, highlight, if, kill, local, math, prompt, regexp, replace,
  1597. substitute, switch, variable and while. Several other commands use
  1598. regular expressions in minor ways. Fortunately the basics are very
  1599. easy to learn.
  1600. </span><span class='l37'> TinTin++ Regular Expression</span><span class='d37'>
  1601. The following support is available for regular expressions.
  1602. ^ match start of line.
  1603. &dollar; match of end of line.
  1604. &bsol; escape one character.
  1605. %1-%99 match of any text, stored in the corresponding index.
  1606. %0 should be avoided in the regex, contains all matched text.
  1607. { } embed a perl compatible regular expression, matches are stored.
  1608. %!{ } embed a perc compatible regular expression, matches are not stored.
  1609. [ ] . + | ( ) ? * are treated as normal text unless used within braces. Keep in
  1610. mind that { } is replaced with ( ) automatically unless %!{ } is used.
  1611. </span><span class='l37'>
  1612. TinTin++ Description POSIX</span><span class='d37'>
  1613. %d Match zero to any number of digits ([0-9]*?)
  1614. %D Match zero to any number of non-digits ([^0-9]*?)
  1615. %i Matches become case insensitive (?i)
  1616. %I Matches become case sensitive (default) (?-i)
  1617. %s Match zero to any number of spaces ([&bsol;r&bsol;n&bsol;t ]*?)
  1618. %w Match zero to any number of word characters ([A-Za-z0-9_]*?)
  1619. %W Match zero to any number of non-word characters ([^A-Za-z0-9_]*?)
  1620. %? Match zero or one character (.??)
  1621. %. Match one character (.)
  1622. %+ Match one to any number of characters (.+?)
  1623. %* Match zero to any number of characters (.*?)
  1624. </span><span class='l37'>
  1625. Variables</span><span class='d37'>
  1626. If you use %1 in an action to perform a match the matched string is
  1627. stored in the %1 variable which can be used in the action body.
  1628. Example: %1 says 'Tickle me'} {tickle %1}
  1629. If you use %2 the match is stored in %2, etc. If you use an unnumbered
  1630. match like %* or %S the match is stored at the last used index
  1631. incremented by one.
  1632. Example: %3 says '%*'} {#if {&quot;%4&quot; == &quot;Tickle me&quot;} {tickle %3}}
  1633. The maximum variable index is 99. If you begin an action with %* the
  1634. match is stored in %1. You should never use %0 in the trigger part of
  1635. an action, when used in the body of an action %0 contains all the parts
  1636. of the string that were matched.
  1637. To prevent a match from being stored use %!*, %!w, etc.
  1638. </span><span class='l37'>
  1639. Perl Compatible Regular Expressions</span><span class='d37'>
  1640. You can embed a PCRE (Perl Compatible Regular Expression) using curley
  1641. braces { }, these braces are replaced with paranthesis ( ) unless you
  1642. use %!{ }.
  1643. </span><span class='l37'>
  1644. Or</span><span class='d37'>
  1645. You can separate alternatives within a PCRE using the | character.
  1646. Example: #act {%* raises {his|her|its} eyebrows.} {say 42..}
  1647. </span><span class='l37'>
  1648. Brackets</span><span class='d37'>
  1649. You can group alternatives and ranges within a PCRE using brackets.
  1650. Example: #act {%* says 'Who is number {[1-9]}} {say &dollar;number[%2] is number %2}
  1651. The example only triggers if someone provides a number between 1 and
  1652. 9. Any other character will cause the action to not trigger.
  1653. Example: #act {%* says 'Set password to {[^0-9]*}&dollar;} {say The password must
  1654. contain at least one number, not for security reasons, but just to
  1655. annoy you.} {4}
  1656. When the ^ character is used within brackets it creates an inverse
  1657. search, [^0-9] matches every character except for a number between 0
  1658. and 9.
  1659. </span><span class='l37'>
  1660. Quantification</span><span class='d37'>
  1661. A quantifier placed after a match specifies how often the match is
  1662. allowed to occur.
  1663. ? repeat zero or one time.
  1664. * repeat zero or multiple times.
  1665. + repeat once or multiple times.
  1666. {n} repeat exactly n times, n must be a number.
  1667. {n,} repeat at least n times, n must be a number.
  1668. {n,o} repeat between n and o times, n and o must be a number.
  1669. Example: #act {%* says 'Who is number {[1-9][0-9]{0,2}} {Say &dollar;number[%2] is
  1670. number %2}
  1671. The example only triggers if someone provides a number between 1 and
  1672. 999.
  1673. </span><span class='l37'>Paranthesis</span><span class='d37'>
  1674. TinTin Regular Expressions automatically add parenthesis, for example
  1675. %* translates to (.*?) in PCRE unless the %* is found at the start or
  1676. end of the line, in which cases it translates to (.*). Paranthesis in
  1677. PCRE causes a change in execution priority similar to mathematical
  1678. expressions, but paranthesis also causes the match to be stored to a
  1679. variable.
  1680. When nesting multiple sets of paranthesis each nest is assigned its
  1681. numercial variable in order of appearance.
  1682. Example: #act {%* chats '{Mu(ha)+}'} {chat %2ha!}
  1683. If someone chats Muha you will chat Muhaha! If someone chats Muhaha
  1684. you will chat Muhahaha!
  1685. </span><span class='l37'>Lazy vs Greedy</span><span class='d37'>
  1686. By default regex matches are greedy, meaning {.*} will capture as much
  1687. text as possible.
  1688. Example: #regex {bli bla blo} {^{.*} {.*}&dollar;} {#showme Arg1=(&amp;1) Arg2=(&amp;2)}
  1689. This will display: Arg1=(bli bla) Arg2=(blo)
  1690. By appending a ? behind a regex it becomes lazy, meaning {.*?} will
  1691. capture as little text as possible.
  1692. Example: #regex {bli bla blo} {^{.*?} {.*?}&dollar;} {#showme Arg1=(&amp;1) Arg2=(&amp;2)}
  1693. This will display: Arg1=(bli) Arg2=(bla blo).
  1694. </span><span class='l37'>Escape Codes</span><span class='d37'>
  1695. PCRE support the following escape codes.
  1696. </span><span class='l37'>
  1697. PCRE Description POSIX</span><span class='d37'>
  1698. &bsol;A Match start of string ^
  1699. &bsol;b Match word boundaries (^|&bsol;r|&bsol;n|&bsol;t| |&dollar;)
  1700. &bsol;B Match non-word boundaries [^&bsol;r&bsol;n&bsol;t ]
  1701. &bsol;c Insert control character &bsol;c
  1702. &bsol;d Match digits [0-9]
  1703. &bsol;D Match non-digits [^0-9]
  1704. &bsol;e Insert escape character &bsol;e
  1705. &bsol;f Insert form feed character &bsol;f
  1706. &bsol;n Insert line feed character &bsol;n
  1707. &bsol;r Insert carriage return character &bsol;r
  1708. &bsol;s Match spaces [&bsol;r&bsol;n&bsol;t ]
  1709. &bsol;S Match non-spaces [^&bsol;r&bsol;n&bsol;t ]
  1710. &bsol;t Insert tab character &bsol;t
  1711. &bsol;w Match letters, numbers, and underscores [A-Za-z0-9_]
  1712. &bsol;W Match non-letters, numbers, and underscores [^A-Za-z0-9_]
  1713. &bsol;x Insert hex character &bsol;x
  1714. &bsol;Z Match end of string &dollar;
  1715. &bsol;s matches one space, &bsol;s+ matches one or multiple spaces.
  1716. </span><span class='l37'>Color triggers</span><span class='d37'>
  1717. To make matching easier text triggers (Actions, Gags, Highlights,
  1718. Prompts, and Substitutes) have their color codes stripped. If you
  1719. want to create a color trigger you must start the triggers with a ~
  1720. (tilda). To make escape codes visible use #config {convert meta} on.
  1721. Example: #action {~&bsol;e[1;37m%1} {#var roomname %1}
  1722. If the room name is the only line on the mud in bright white this
  1723. color trigger will save the roomname.
  1724. This covers the basics. PCRE has more options, most of which are
  1725. somewhat obscure, so you'll have to read a PCRE manual for additional
  1726. information.
  1727. </span><span class='l37'>Related</span><span class='d37'>: map and path.
  1728. <a name='PORT'></a>
  1729. </span><span class='l32'> PORT
  1730. </span><span class='l37'>Command</span><span class='d37'>: #port </span><span class='l37'>{</span><span class='d37'>option</span><span class='l37'>} {</span><span class='d37'>argument</span><span class='l37'>}</span><span class='d37'>
  1731. </span><span class='l37'>#port {init} {name} {port} {file}
  1732. </span><span class='d37'> Initilize a port session.
  1733. </span><span class='l37'>#port {call} {address} {port}
  1734. </span><span class='d37'> Connect to a remote socket.
  1735. </span><span class='l37'>#port {color} {color names}
  1736. </span><span class='d37'> Set the default color of port messages.
  1737. </span><span class='l37'>#port {dnd}
  1738. </span><span class='d37'> Do Not Disturb. Decline new connections
  1739. </span><span class='l37'>#port {group} {name} {group}
  1740. </span><span class='d37'> Assign a socket group.
  1741. </span><span class='l37'>#port {ignore} {name}
  1742. </span><span class='d37'> Ignore a socket
  1743. </span><span class='l37'>#port {info}
  1744. </span><span class='d37'> Display information about the port session.
  1745. </span><span class='l37'>#port {name} {name}
  1746. </span><span class='d37'> Change socket name.
  1747. </span><span class='l37'>#port {prefix} {text}
  1748. </span><span class='d37'> Set prefix before each message.
  1749. </span><span class='l37'>#port {send} {name|all} {text}
  1750. </span><span class='d37'> Send data to socket
  1751. </span><span class='l37'>#port {uninitialize}
  1752. </span><span class='d37'> Unitialize the port session.
  1753. </span><span class='l37'>#port {who}
  1754. </span><span class='d37'> Show all connections
  1755. </span><span class='l37'>#port {zap} {name}
  1756. </span><span class='d37'> Close a connection
  1757. The port command is very similar to chat except that it creates a
  1758. new session dedicated to receiving socket connections at the given
  1759. port number without built-in support for a communication protocol.
  1760. </span><span class='l37'>Related</span><span class='d37'>: all, chat, run, session, sessionname, snoop, ssl and zap.
  1761. <a name='PROMPT'></a>
  1762. </span><span class='l32'> PROMPT
  1763. </span><span class='l37'>Command</span><span class='d37'>: #prompt </span><span class='l37'>{</span><span class='d37'>text</span><span class='l37'>} {</span><span class='d37'>new text</span><span class='l37'>} {</span><span class='d37'>row #</span><span class='l37'>} {</span><span class='d37'>col #</span><span class='l37'>}</span><span class='d37'>
  1764. Prompt is a feature for split window mode, which will capture a line
  1765. received from the server and display it on the status bar of your
  1766. split screen terminal. You would define &lt;text&gt; and &lt;new text&gt; the
  1767. same way as with a substitution.
  1768. The row number is optional and useful if you use a non standard split
  1769. mode. A positive row number draws #row lines from the top while a
  1770. negative number draws #row lines from the bottom. Without an argument
  1771. #prompt will write to the default split line, which is at row -2.
  1772. The col number is optional and can be used to set the column index.
  1773. A positive col number draws the given number of columns from the left,
  1774. while a negative col number draws from the right. If you leave the
  1775. column argument empty tintin will clear the row before printing at
  1776. the start of the row.
  1777. The #showme command takes a row and col argument as well so it's also
  1778. possible to place text on your split lines using #showme.
  1779. </span><span class='l37'>Comment</span><span class='d37'>: See </span><span class='l37'>#help split</span><span class='d37'> for more information on split mode.
  1780. </span><span class='l37'>Comment</span><span class='d37'>: See </span><span class='l37'>#help substitute</span><span class='d37'> for more information on text
  1781. substitutions.
  1782. </span><span class='l37'>Comment</span><span class='d37'>: You can remove a prompt with the #unprompt command.
  1783. </span><span class='l37'>Related</span><span class='d37'>: action, gag, highlight and substitute.
  1784. <a name='READ'></a>
  1785. </span><span class='l32'> READ
  1786. </span><span class='l37'>Command</span><span class='d37'>: #read </span><span class='l37'>{</span><span class='d37'>filename</span><span class='l37'>}</span><span class='d37'>
  1787. Reads a commands file into memory. The coms file is merged in with
  1788. the currently loaded commands. Duplicate commands are overwritten.
  1789. If you uses braces, { and } you can use several lines for 1 commands.
  1790. This however means you must always match every { with a } for the read
  1791. command to work.
  1792. You can comment out triggers using /* text */
  1793. </span><span class='l37'>Related</span><span class='d37'>: log, scan, textin and write.
  1794. <a name='REGEXP'></a>
  1795. </span><span class='l32'> REGEXP
  1796. </span><span class='l37'>Command</span><span class='d37'>: #regexp </span><span class='l37'>{</span><span class='d37'>string</span><span class='l37'>} {</span><span class='d37'>expression</span><span class='l37'>} {</span><span class='d37'>true</span><span class='l37'>} {</span><span class='d37'>false</span><span class='l37'>}</span><span class='d37'>
  1797. Compares the string to the given regular expression.
  1798. Variables are stored in &amp;1 to &amp;99 with &amp;0 holding the matched substring.
  1799. ^ force match of start of line.
  1800. &dollar; force match of end of line.
  1801. &bsol; escape one character.
  1802. %1-%99 lazy match of any text, available at %1-%99.
  1803. %0 should be avoided in triggers, and if left alone lists all matches.
  1804. { } embed a raw regular expression, matches are stored to %1-%99.
  1805. %!{ } embed a raw regular expression, matches are not stored.
  1806. [ ] . + | ( ) ? * are treated as normal text unlessed used within
  1807. braces. Keep in mind that { } is replaced with ( ) automatically
  1808. unless %!{ } is used.
  1809. Of the following the (lazy) match is available at %1-%99 + 1
  1810. %w match zero to any number of word characters.
  1811. %W match zero to any number of non word characters.
  1812. %d match zero to any number of digits.
  1813. %D match zero to any number of non digits.
  1814. %s match zero to any number of spaces.
  1815. %S match zero to any number of non spaces.
  1816. %? match zero or one character.
  1817. %. match one character. (</span><span class='l31'>do not use</span><span class='d37'>)
  1818. %+ match one to any number of characters. (</span><span class='l31'>do not use</span><span class='d37'>)
  1819. %* match zero to any number of characters.
  1820. %i matching becomes case insensitive.
  1821. %I matching becomes case sensitive (default).
  1822. The match is automatically stored to a value between %1 and %99
  1823. starting at %1 and incrementing by 1 for every regex. If you use
  1824. %15 as a regular expression, the next unnumbered regular expression
  1825. would be %16. To prevent a match from being stored use %!*, %!w, etc.
  1826. </span><span class='l37'>Example</span><span class='d37'>: #regexp {bli bla blo} {bli {.*} blo} {#showme &amp;1}
  1827. </span><span class='l37'>Related</span><span class='d37'>: case, default, else, elseif, if and switch.
  1828. <a name='REPEAT'></a>
  1829. </span><span class='l32'> REPEAT
  1830. </span><span class='l37'>Command</span><span class='d37'>: #</span><span class='l37'>[</span></span><span class='b49'><span class='d37'>number</span><span class='l37'>] {</span><span class='d37'>commands</span><span class='l37'>}</span><span class='d37'>
  1831. Sometimes you want to repeat the same command multiple times. This is the
  1832. easiest way to accomplish that.
  1833. </span><span class='l37'>Example</span><span class='d37'>: #10 {buy bread}
  1834. </span><span class='l37'>Related</span><span class='d37'>: break, continue, foreach, list, loop, parse, return and while.
  1835. <a name='REPLACE'></a>
  1836. </span><span class='l32'> REPLACE
  1837. </span><span class='l37'>Command</span><span class='d37'>: #replace </span><span class='l37'>{</span><span class='d37'>variable</span><span class='l37'>} {</span><span class='d37'>oldtext</span><span class='l37'>} {</span><span class='d37'>newtext</span><span class='l37'>}</span><span class='d37'>
  1838. Searches the variable text replacing each occurance of 'oldtext' with
  1839. 'newtext'.
  1840. </span><span class='l37'>Related</span><span class='d37'>: format, function, local, math, script and variable.
  1841. <a name='RETURN'></a>
  1842. </span><span class='l32'> RETURN
  1843. </span><span class='l37'>Command</span><span class='d37'>: #return </span><span class='l37'>{</span><span class='d37'>text</span><span class='l37'>}</span><span class='d37'>
  1844. This command can be used to break out of a command string being
  1845. executed.
  1846. If used inside a #function you can use #return with an argument to both
  1847. break out of the function and set the result variable.
  1848. </span><span class='l37'>Related</span><span class='d37'>: break, continue, foreach, list, loop, parse, repeat and while.
  1849. <a name='RUN'></a>
  1850. </span><span class='l32'> RUN
  1851. </span><span class='l37'>Command</span><span class='d37'>: #run </span><span class='l37'>{</span><span class='d37'>name</span><span class='l37'>} {</span><span class='d37'>shell command</span><span class='l37'>} {</span><span class='d37'>file</span><span class='l37'>}</span><span class='d37'>
  1852. The run command works much like the system command except that it
  1853. runs the command in a pseudo terminal. The run command also creates
  1854. a session that treats the given shell command as a mud server. This
  1855. allows you to run ssh, as well as any other shell application, with
  1856. full tintin scripting capabilities. If a file name is given the file
  1857. is loaded prior to execution.
  1858. </span><span class='l37'>Example</span><span class='d37'>: #run {somewhere} {ssh someone@somewhere.com}
  1859. </span><span class='l37'>Example</span><span class='d37'>: #run {something} {tail -f chats.log}
  1860. </span><span class='l37'>Related</span><span class='d37'>: all, port, session, sessionname, snoop, ssl and zap.
  1861. <a name='SCAN'></a>
  1862. </span><span class='l32'> SCAN
  1863. </span><span class='l37'>Command</span><span class='d37'>: #scan </span><span class='l37'>{</span><span class='d37'>abort</span><span class='l37'>|</span><span class='d37'>csv</span><span class='l37'>|</span><span class='d37'>tsv</span><span class='l37'>|</span><span class='d37'>txt</span><span class='l37'>} {</span><span class='d37'>filename</span><span class='l37'>}</span><span class='d37'>
  1864. The scan command is a file loading utility.
  1865. </span><span class='l37'>#scan {abort}
  1866. </span><span class='d37'> This command must be called from with a SCAN event and will
  1867. abort the scan if one is in progress.
  1868. </span><span class='l37'>#scan {csv} &lt;filename&gt;
  1869. </span><span class='d37'> The scan csv command reads in a comma separated value file
  1870. without printing the content to the screen. Instead it triggers one
  1871. of two events.
  1872. The SCAN CSV HEADER event is triggered on the first line of the csv
  1873. file. The SCAN CSV LINE event is triggered on the second and each
  1874. subsequent line of the csv file. The %0 argument contains the entire
  1875. line, with %1 containing the first value, %2 the second value, etc,
  1876. all the way up to %99.
  1877. Values containing spaces must be surrounded with quotes, keep in mind
  1878. newlines within quotes are not supported. Use two quotes to print one
  1879. literal quote character.
  1880. </span><span class='l37'>#scan {tsv} &lt;filename&gt;
  1881. </span><span class='d37'> The scan tsv &lt;filename&gt; command reads in a tab separated value file
  1882. without printing the content to the screen. Instead it triggers the
  1883. SCAN TSV HEADER event for the first line and SCAN TSV LINE for all
  1884. subsequent lines.
  1885. </span><span class='l37'>#scan {file} &lt;filename&gt; {commands}
  1886. </span><span class='d37'> The scan file command reads the given files and executes the
  1887. commands argument. &amp;0 contains the raw content of the file and
  1888. &amp;1 contains the plain content. &amp;2 contains the raw byte size of the
  1889. file and &amp;3 the plain byte size. &amp;5 contains the line count.
  1890. </span><span class='l37'>#scan {txt} &lt;filename&gt;
  1891. </span><span class='d37'> The scan txt &lt;filename&gt; command reads in a file and sends its content
  1892. to the screen as if it was send by a mud. After using scan you can
  1893. use page-up and down to view the file.
  1894. This command is useful to convert ansi color files to html or viewing
  1895. raw log files.
  1896. Actions, highlights, and substitutions will trigger as normal, and it
  1897. is possible to create an action to execute #scan abort to prematurely
  1898. stop the scan.
  1899. </span><span class='l37'>Related</span><span class='d37'>: read and textin.
  1900. <a name='SCREEN'></a>
  1901. </span><span class='l32'> SCREEN
  1902. </span><span class='l37'>Command</span><span class='d37'>: #screen </span><span class='l37'>{</span><span class='d37'>option</span><span class='l37'>} {</span><span class='d37'>argument</span><span class='l37'>}
  1903. </span><span class='d37'>The screen command offers a variety of screen manipulation
  1904. commands and utilities.
  1905. </span><span class='l37'>#screen blur
  1906. </span><span class='d37'> Move the terminal to the back of the stack.
  1907. </span><span class='l37'>#screen clear [all|scroll region|square] &lt;args&gt;
  1908. </span><span class='d37'> Provide 4 arguments defining the top left and bottom right corner
  1909. when erasing a square.
  1910. </span><span class='l37'>#screen focus
  1911. </span><span class='d37'> Move the terminal to the front of the stack.
  1912. </span><span class='l37'>#screen fullscreen [on|off]
  1913. </span><span class='d37'> Toggles fullscreen mode when used without an argument.
  1914. </span><span class='l37'>#screen get &lt;rows|cols|height|width&gt; &lt;var&gt;
  1915. </span><span class='d37'> Get the rows/cols size in characters or height/width in pixels.
  1916. </span><span class='l37'>#screen get &lt;top_row|bot_row|top_split|bot_split&gt; &lt;var&gt;
  1917. </span><span class='d37'> Get the top and bot row of the scrolling region or the height
  1918. of the top and bot split bars.
  1919. </span><span class='l37'>#screen info
  1920. </span><span class='d37'> Debugging information.
  1921. </span><span class='l37'>#screen load &lt;both|label|title&gt;
  1922. </span><span class='d37'> Reload the saved title, label, or both.
  1923. </span><span class='l37'>#screen minimize &lt;on|off&gt;
  1924. </span><span class='d37'> Minimize with on, restore with off.
  1925. </span><span class='l37'>#screen maximize [on|off]
  1926. </span><span class='d37'> Maximize with on, restore with off.
  1927. </span><span class='l37'>#screen move &lt;height&gt; &lt;width&gt;
  1928. </span><span class='d37'> Move the upper left corner of the terminal to pixel coordinate.
  1929. </span><span class='l37'>#screen raise &lt;event&gt;
  1930. </span><span class='d37'> This will raise several screen events with %1 and %2 arguments.
  1931. </span><span class='l37'>#screen refresh
  1932. </span><span class='d37'> Terminal dependant, may do nothing.
  1933. </span><span class='l37'>#screen rescale &lt;height&gt; &lt;width&gt;
  1934. </span><span class='d37'> Resize the screen to the given height and width in pixels.
  1935. </span><span class='l37'>#screen resize &lt;rows&gt; &lt;cols&gt;
  1936. </span><span class='d37'> Resize the screen to the given height and width in characters.
  1937. </span><span class='l37'>#screen save &lt;both|label|title&gt;
  1938. </span><span class='d37'> Save the title, label, or both.
  1939. </span><span class='l37'>#screen set &lt;both|label|title&gt;
  1940. </span><span class='d37'> Set the title, label, or both. Only title works on Windows.
  1941. </span><span class='l37'>Related</span><span class='d37'>: bell
  1942. <a name='SCREEN READER'></a>
  1943. </span><span class='l32'> SCREEN READER
  1944. </span><span class='l37'>Command</span><span class='d37'>: #config </span><span class='l37'>{</span><span class='d37'>SCREEN READER</span><span class='l37'>} {</span><span class='d37'>ON|OFF</span><span class='l37'>}</span><span class='d37'>
  1945. Screen reader mode is enabled by using #config screen on. The main
  1946. purpose of the screen reader mode is to tell MUDs that a screen reader
  1947. is being used by using the MTTS standard. The MTTS specification is
  1948. available at:
  1949. http://tintin.sourceforge.net/protocols/mtts
  1950. With the screen reader mode enabled TinTin++ will try to remove visual
  1951. elements where possible.
  1952. </span><span class='l37'>Related</span><span class='d37'>: config
  1953. <a name='SCRIPT'></a>
  1954. </span><span class='l32'> SCRIPT
  1955. </span><span class='l37'>Command</span><span class='d37'>: #script </span><span class='l37'>{</span><span class='d37'>variable</span><span class='l37'>} {</span><span class='d37'>shell command</span><span class='l37'>}</span><span class='d37'>
  1956. The script command works much like the system command except that it
  1957. treats the generated echos as commands if no variable is provided.
  1958. This is useful for running php, perl, ruby, and python scripts. You
  1959. can run these scrips either from file or from within tintin if the
  1960. scripting language allows this.
  1961. If you provide a variable the output of the script is stored as a list.
  1962. </span><span class='l37'>Example</span><span class='d37'>: #script {ruby -e 'print &quot;#showme hello world&quot;'}
  1963. </span><span class='l37'>Example</span><span class='d37'>: #script {python -c 'print &quot;#showme hello world&quot;'}
  1964. </span><span class='l37'>Example</span><span class='d37'>: #script {php -r 'echo &quot;#showme hello world&quot;'}
  1965. </span><span class='l37'>Example</span><span class='d37'>: #script {path} {pwd};#showme The path is &dollar;path[1].
  1966. </span><span class='l37'>Related</span><span class='d37'>: format, function, local, math, replace and variable.
  1967. <a name='SEND'></a>
  1968. </span><span class='l32'> SEND
  1969. </span><span class='l37'>Command</span><span class='d37'>: #send </span><span class='l37'>{</span><span class='d37'>text</span><span class='l37'>}</span><span class='d37'>
  1970. Sends the text directly to the MUD, useful if you want to start with an
  1971. escape code.
  1972. </span><span class='l37'>Related</span><span class='d37'>: textin
  1973. <a name='SESSION'></a>
  1974. </span><span class='l32'> SESSION
  1975. </span><span class='l37'>Command</span><span class='d37'>: #session </span><span class='l37'>{</span><span class='d37'>name</span><span class='l37'>} {</span><span class='d37'>host</span><span class='l37'>} {</span><span class='d37'>port</span><span class='l37'>} {</span><span class='d37'>file</span><span class='l37'>}</span><span class='d37'>
  1976. Starts a telnet session with the given name, host, port, and optional
  1977. file name. The name can be anything you want, except the name of an
  1978. already existant session, a number, or the keywords '+', '-' and 'self'.
  1979. If a file name is given the file is only read if the session succesfully
  1980. connects.
  1981. Without an argument #session shows the currently defined sessions.
  1982. If you have more than one session, you can use the following commands:
  1983. #session {-} Switch to the previous session.
  1984. #session {+} Switch to the next session.
  1985. #session {&lt;number&gt;} Switch to the given session. Session 0 is the
  1986. startup session, +1 the first, +2 the second, and
  1987. -1 is the last session. Sessions are (currently)
  1988. sorted in order of creation.
  1989. #gts Switch to the startup session. The name gts stands
  1990. for global tintin session.
  1991. #ats Switch to the active session. The name ats stands
  1992. for active tintin session.
  1993. not necessarily the calling session.
  1994. #{name} Activates to the session with the given name.
  1995. #{name} {command}: Executes a command with the given session without
  1996. changing the active session.
  1997. @&lt;name&gt;{text}: Parse text in the given session, substituting the
  1998. variables and functions, and print the result in
  1999. the current active session.
  2000. The startup session is named 'gts' and can be used for relog scripts. Do
  2001. keep in mind that tickers do not work in the startup session.
  2002. </span><span class='l37'>Example</span><span class='d37'>: #event {SESSION DISCONNECTED} {#gts #delay 10 #ses %0 mymud.com 4321}
  2003. </span><span class='l37'>Related</span><span class='d37'>: all, port, run, sessionname, snoop, ssl and zap.
  2004. <a name='SESSIONNAME'></a>
  2005. </span><span class='l32'> SESSIONNAME
  2006. </span><span class='l37'>Syntax</span><span class='d37'>: #[sessionname] </span><span class='l37'>{</span><span class='d37'>commands</span><span class='l37'>}</span><span class='d37'>
  2007. You can create multiple sessions with the #session command. By default only one
  2008. session is active, meaning commands you input are executed in the active
  2009. session. While all sessions receive output, only output sent to the active
  2010. session is displayed.
  2011. When you create a session with the #session command you must specify a session
  2012. name, the session name, prepended with a hashtag, can be used to activate the
  2013. session when used without an argument. If an argument is given it will be
  2014. executed by that session as a command, the session will not be activated.
  2015. </span><span class='l37'>Example</span><span class='d37'>: #ses one mymud.com 23;#ses two mymud.com 23;#one;#two grin
  2016. This will create two sessions, the session that was created last (two in this
  2017. case) will be automatically activated upon creation. Using #one, session one is
  2018. activated. Using #two grin, the grin social will be executed by session two,
  2019. session one will remain the active session.
  2020. </span><span class='l37'>Related</span><span class='d37'>: all, port, run, session, snoop, ssl and zap.
  2021. <a name='SHOWME'></a>
  2022. </span><span class='l32'> SHOWME
  2023. </span><span class='l37'>Command</span><span class='d37'>: #showme </span><span class='l37'>{</span><span class='d37'>string</span><span class='l37'>} {</span><span class='d37'>row</span><span class='l37'>} {</span><span class='d37'>col</span><span class='l37'>}</span><span class='d37'>
  2024. Display the string to the terminal, do not send to the mud. Useful for
  2025. status, warnings, etc. The {row} and col number are optional and work
  2026. the same way as the row number of the #prompt trigger.
  2027. Actions can be triggered by the showme command. If you want to avoid
  2028. this from happening use: #line ignore #showme {&lt;string&gt;}.
  2029. </span><span class='l37'>Example</span><span class='d37'>: #tick {TICK} {#delay 50 #showme 10 SECONDS TO TICK!!!} {60}
  2030. </span><span class='l37'>Comment</span><span class='d37'>: The #prompt helpfile contains more information on using the
  2031. option {row} and {col} arguments.
  2032. </span><span class='l37'>Related</span><span class='d37'>: buffer, draw, echo and grep.
  2033. <a name='SNOOP'></a>
  2034. </span><span class='l32'> SNOOP
  2035. </span><span class='l37'>Command</span><span class='d37'>: #snoop </span><span class='l37'>{</span><span class='d37'>session name</span><span class='l37'>} {</span><span class='d37'>on</span><span class='l37'>|</span><span class='d37'>off</span><span class='l37'>}</span><span class='d37'>
  2036. If there are multiple sessions active, this command allows you to monitor
  2037. what is going on in the sessions that are not currently active. The
  2038. line of text from other sessions will be prefixed by the session's name.
  2039. You can toggle off snoop mode by executing #snoop a second time.
  2040. </span><span class='l37'>Related</span><span class='d37'>: all, port, run, session, sessionname, ssl and zap.
  2041. <a name='SPEEDWALK'></a>
  2042. </span><span class='l32'> SPEEDWALK
  2043. </span><span class='d37'>Speedwalking allows you to type multiple directions not separated by
  2044. semicolons, and now it lets you prefix a direction with a number, to
  2045. signify how many times to go that direction. You can turn it on/off
  2046. with #config.
  2047. </span><span class='l37'>Example</span><span class='d37'>: Without speedwalk, you have to type:
  2048. s;s;w;w;w;w;w;s;s;s;w;w;w;n;n;w
  2049. With speedwalk, you only have to type:
  2050. 2s5w3s3w2nw
  2051. </span><span class='l37'>Related</span><span class='d37'>: alias, cursor, history, keypad, macro and tab.
  2052. <a name='SPLIT'></a>
  2053. </span><span class='l32'> SPLIT
  2054. </span><span class='l37'>Command</span><span class='d37'>: #split </span><span class='l37'>{</span><span class='d37'>top bar</span><span class='l37'>} {</span><span class='d37'>bottom bar</span><span class='l37'>}
  2055. Command</span><span class='d37'>: #split </span><span class='l37'>{</span><span class='d37'>&lt;square&gt;</span><span class='l37'>}
  2056. This option requires for your terminal to support VT100 emulation.
  2057. #split allows the creation of a top status bar, a scrolling region, a
  2058. bottom status bar, and an input line.
  2059. --top status bar--------
  2060. </span><span class='d37'> scrolling region
  2061. </span><span class='l37'>--bottom status bar----------
  2062. </span><span class='d37'> input line
  2063. By default the bottom status bar is filled with dashes --- and
  2064. subsequently it is also known as the split line. The scrolling
  2065. region is also known as the main screen and this is where all
  2066. incoming text is displayed by default.
  2067. If you use #split without an argument it will set the height of the
  2068. top status bar to 0 lines and the bottom status bar to 1 line.
  2069. If you use #split with one argument it will set the height of the top
  2070. status bar to the given number of lines and the bottom status bar will
  2071. be set to 1 line.
  2072. If you use two arguments the first argument is the height of the top
  2073. status bar and the second argument the height of the bottom status bar.
  2074. The third and fourth argument are optional and tintin will interpret
  2075. four arguments as a square argument existing of two coordinates
  2076. defining the upper left corner and bottom right corner of the
  2077. scrolling region.
  2078. </span><span class='l37'>Example</span><span class='d37'>: #split 0 0
  2079. This will create a split screen with just a scrolling regino and an
  2080. input line. Great for the minimalist.
  2081. </span><span class='l37'>Comment</span><span class='d37'>: You can display text on the split line(s) with the #prompt and
  2082. #showme {line} {row} commands.
  2083. </span><span class='l37'>Comment</span><span class='d37'>: You can remove split mode with the #unsplit command.
  2084. </span><span class='l37'>Related</span><span class='d37'>: echo, prompt and showme.
  2085. <a name='SSL'></a>
  2086. </span><span class='l32'> SSL
  2087. </span><span class='l37'>Command</span><span class='d37'>: #ssl </span><span class='l37'>{</span><span class='d37'>name</span><span class='l37'>} {</span><span class='d37'>host</span><span class='l37'>} {</span><span class='d37'>port</span><span class='l37'>} {</span><span class='d37'>file</span><span class='l37'>}
  2088. Starts a secure socket telnet session with the given name, host, port,
  2089. and optional file name.
  2090. Related</span><span class='d37'>: all, port, run, sessionname, snoop, ssl and zap.
  2091. <a name='STATEMENTS'></a>
  2092. </span><span class='l32'> STATEMENTS
  2093. TinTin++ knows the following statements.
  2094. </span><span class='d37'>
  2095. #break
  2096. #case {value} {true}
  2097. #continue
  2098. #default {commands}
  2099. #else {commands}
  2100. #elseif {expression} {true}
  2101. #foreach {list} {variable} {commands}
  2102. #if {expression} {true}
  2103. #loop {min} {max} {variable} {commands}
  2104. #parse {string} {variable} {commands}
  2105. #return {value}
  2106. #switch {expression} {commands}
  2107. #while {expression} {commands}
  2108. </span><span class='l37'>Related</span><span class='d37'>: commands, help and info.
  2109. <a name='SUBSTITUTE'></a>
  2110. </span><span class='l32'> SUBSTITUTE
  2111. </span><span class='l37'>Command</span><span class='d37'>: #substitute </span><span class='l37'>{</span><span class='d37'>text</span><span class='l37'>} {</span><span class='d37'>new text</span><span class='l37'>}</span><span class='d37'>
  2112. Allows you to replace original text from the mud with different text.
  2113. This is helpful for complex coloring and making things more readable.
  2114. The %1-%99 variables can be used to capture text and use it as part of
  2115. the new output, and the ^ char is valid to only check the beginning of
  2116. the line for the text specified.
  2117. If only one argument is given, all active substitutions that match the
  2118. strings are displayed. The '%*' char is valid in this instance. See
  2119. '#help regex', for advanced wildcard information.
  2120. If no argument is given, all subs are displayed.
  2121. </span><span class='l37'>Example</span><span class='d37'>: #sub {Zoe} {ZOE}
  2122. Any instance of Zoe will be replaced with ZOE.
  2123. </span><span class='l37'>Example</span><span class='d37'>: #sub {~&bsol;e[0;34m} {&bsol;e[1;34m}
  2124. Replace generic dark blue color codes with bright blue ones.
  2125. </span><span class='l37'>Example</span><span class='d37'>: #sub {%1massacres%2} {&lt;018&gt;%1&lt;118&gt;MASSACRES&lt;018&gt;%2}
  2126. Replaces all occurrences of 'massacres' with 'MASSACRES' in red.
  2127. </span><span class='l37'>Comment</span><span class='d37'>: See '#help action', for more information about triggers.
  2128. </span><span class='l37'>Comment</span><span class='d37'>: See '#help colors', for more information.
  2129. </span><span class='l37'>Comment</span><span class='d37'>: You can remove a substitution with the #unsubstitute command.
  2130. </span><span class='l37'>Related</span><span class='d37'>: action, gag, highlight and prompt.
  2131. <a name='SUSPEND'></a>
  2132. </span><span class='l32'> SUSPEND
  2133. </span><span class='l37'>Command</span><span class='d37'>: #cursor suspend
  2134. Temporarily suspends tintin and returns you to your shell. To
  2135. return to tintin, type 'fg' at the shell prompt.
  2136. While suspended your tintin sessions will freeze. To keep a
  2137. suspended session running use the #detach command.
  2138. </span><span class='l37'>Related</span><span class='d37'>: end
  2139. <a name='SWITCH'></a>
  2140. </span><span class='l32'> SWITCH
  2141. </span><span class='l37'>Command</span><span class='d37'>: #switch </span><span class='l37'>{</span><span class='d37'>conditional</span><span class='l37'>} {</span><span class='d37'>arguments</span><span class='l37'>}</span><span class='d37'>
  2142. The switch command works similar to the switch statement in other
  2143. languages. When the 'switch' command is encountered its body is parsed
  2144. and each 'case' command found will be compared to the conditional
  2145. argument of the switch and executed if there is a match.
  2146. When comparing strings the switch and case arguments must be enclosed
  2147. in quote characters.
  2148. If the 'default' command is found and no 'case' statement has been
  2149. matched the default command's argument is executed.
  2150. </span><span class='l37'>Example</span><span class='d37'>: #switch {1d4} {#case 1 cackle;#case 2 smile;#default giggle}
  2151. </span><span class='l37'>Related</span><span class='d37'>: statements
  2152. <a name='SYSTEM'></a>
  2153. </span><span class='l32'> SYSTEM
  2154. </span><span class='l37'>Command</span><span class='d37'>: #system </span><span class='l37'>{</span><span class='d37'>command</span><span class='l37'>}</span><span class='d37'>
  2155. Executes the command specified as a shell command.
  2156. </span><span class='l37'>Related</span><span class='d37'>: detach, script and run.
  2157. <a name='TAB'></a>
  2158. </span><span class='l32'> TAB
  2159. </span><span class='l37'>Command</span><span class='d37'>: #tab </span><span class='l37'>{</span><span class='d37'>word</span><span class='l37'>}</span><span class='d37'>
  2160. Adds a word to the tab completion list, alphabetically sorted.
  2161. If no tabs are defined tintin will use the scrollback buffer
  2162. for auto tab completion.
  2163. </span><span class='l37'>Comment</span><span class='d37'>: You can remove a tab with the #untab command.
  2164. </span><span class='l37'>Related</span><span class='d37'>: alias, cursor, history, keypad, macro and speedwalk.
  2165. <a name='TEXTIN'></a>
  2166. </span><span class='l32'> TEXTIN
  2167. </span><span class='l37'>Command</span><span class='d37'>: #textin </span><span class='l37'>{</span><span class='d37'>filename</span><span class='l37'>} {</span><span class='d37'>delay</span><span class='l37'>}</span><span class='d37'>
  2168. Textin allows the user to read in a file, and send its contents
  2169. directly to the mud. Useful for doing online creation, or message
  2170. writing.
  2171. The delay is in seconds and takes a floating point number which is
  2172. cumulatively applied to each outgoing line.
  2173. </span><span class='l37'>Related</span><span class='d37'>: scan and send.
  2174. <a name='TICKER'></a>
  2175. </span><span class='l32'> TICKER
  2176. </span><span class='l37'>Command</span><span class='d37'>: #ticker </span><span class='l37'>{</span><span class='d37'>name</span><span class='l37'>} {</span><span class='d37'>commands</span><span class='l37'>} {</span><span class='d37'>interval in seconds</span><span class='l37'>}</span><span class='d37'>
  2177. Executes given command every # of seconds.
  2178. </span><span class='l37'>Comment</span><span class='d37'>: Tickers don't work in the startup session.
  2179. </span><span class='l37'>Comment</span><span class='d37'>: You can remove a ticker with the #unticker command.
  2180. </span><span class='l37'>Related</span><span class='d37'>: delay and event.
  2181. <a name='TIME'></a>
  2182. </span><span class='l32'> TIME
  2183. </span><span class='l37'>Command</span><span class='d37'>: #format </span><span class='l37'>{</span><span class='d37'>variable</span><span class='l37'>} {</span><span class='d37'>%t</span><span class='l37'>} {</span><span class='d37'>argument</span><span class='l37'>}</span><span class='d37'>
  2184. The %t format specifier of the #format command allows printing dates
  2185. using the strftime() format specifiers. By default the time stamp used
  2186. is the current time, if you want to print a past or future date use:
  2187. </span><span class='l37'>Command</span><span class='d37'>: #format </span><span class='l37'>{</span><span class='d37'>variable</span><span class='l37'>} {</span><span class='d37'>%t</span><span class='l37'>} {{</span><span class='d37'>argument</span><span class='l37'>} {{</span><span class='d37'>epoch time</span><span class='l37'>}}</span><span class='d37'>
  2188. The current epoch time value is obtained using #format {time} {%T}.
  2189. When using %t the argument should contain strftime format specifiers.
  2190. The output may differ depending on your locale.
  2191. %a Abbreviated name of the day of the week (mon ... sun).
  2192. %A Full name of the day of the week. (Monday ... Sunday)
  2193. %b Abbreviated name of the month (Jan ... Dec)
  2194. %B Full name of the month. (January ... December)
  2195. %C 2 digit numeric century. (19 ... 20)
  2196. %d 2 digit numeric day of the month (01 ... 31)
  2197. %H 2 digit numeric 24-hour clock hour. (00 ... 23)
  2198. %I 2 digit numeric 12-hour clock hour. (01 ... 12)
  2199. %j 3 digit numeric day of the year (001 ... 366)
  2200. %m 2 digit numeric month of the year (01 ... 12)
  2201. %M 2 digit numeric minute of the hour (00 ... 59)
  2202. %p Abbreviated 12 hour clock period (AM ... PM)
  2203. %P Abbreviated 12 hour clock period (am ... pm)
  2204. %S 2 digit numeric second of the minute (00 ...59
  2205. %u 1 digit numeric day of the week (1 ... 7)
  2206. %U 2 digit numeric Sunday week of the year (00 ... 53
  2207. %w 1 digit numeric day of the week (0 ... 6)
  2208. %W 2 digit numeric Monday week of the year (00 ... 53
  2209. %y 2 digit numeric year. (70 ... 38)
  2210. %Y 4 digit numeric year. (1970 ... 2038)
  2211. %z 5 digit timezone offset. (-1200 ... +1400)
  2212. %Z Abbreviated name of the time zone.
  2213. </span><span class='l37'>Related</span><span class='d37'>: echo and format.
  2214. <a name='VARIABLE'></a>
  2215. </span><span class='l32'> VARIABLE
  2216. </span><span class='l37'>Command</span><span class='d37'>: #variable </span><span class='l37'>{</span><span class='d37'>variable name</span><span class='l37'>} {</span><span class='d37'>text to fill variable</span><span class='l37'>}</span><span class='d37'>
  2217. Variables differ from the %0-99 arguments in the fact that you can
  2218. specify a full word as a variable, and they stay in memory for the
  2219. full session unless they are changed. They can be saved in the
  2220. coms file, and can be set to different values if you have two or
  2221. more sessions running at the same time. Variables are global for
  2222. each session and can be accessed by adding a &dollar; before the variable
  2223. name.
  2224. </span><span class='l37'>Example</span><span class='d37'>: #alias {target} {#var target %0}
  2225. #alias {x} {kick &dollar;target}
  2226. The name of a variable must exist of only letters, numbers and
  2227. underscores in order to be substituted. If you do not meet these
  2228. requirements do not panic, simply encapsulate the variable in braces:
  2229. </span><span class='l37'>Example</span><span class='d37'>: #variable {cool website} {http://tintin.sourceforge.net}
  2230. #chat I was on &dollar;{cool website} yesterday!.
  2231. Variables can be nested using brackets or dots:
  2232. </span><span class='l37'>Example</span><span class='d37'>: #var hp[self] 34;#var hp[target] 46
  2233. You can see the first nest of a variable using &dollar;variable[+1] and the
  2234. last nest using &dollar;variable[-1]. Using &dollar;variable[-2] will report the
  2235. second last variable, and so on. To show all indices use &dollar;variable[].
  2236. To show all values use &dollar;variable[%*] or a less generic regex.
  2237. Nested variables are also known as tables, table generally being used
  2238. to refer to several variables nested within one specific variable.
  2239. </span><span class='l37'>Example</span><span class='d37'>: #showme {Targets starting with the letter A: &dollar;targets[A%*]
  2240. To see the internal index of a variable use &amp;&lt;variable name&gt;. To see
  2241. the size of a table you would use: &amp;targets[] or &amp;targets[%*]. A non
  2242. existent nested variable will report itself as 0.
  2243. </span><span class='l37'>Example</span><span class='d37'>: #showme {Number of targets starting with A: &amp;targets[A%*]
  2244. In some scripts you need to know the name of a nested variable. This
  2245. is also known as the key, and you can get it using *variable. For
  2246. example *target[+1]. To get the first variable's name use *{+1}.
  2247. It's also possible to declare a table using brace notation. Using
  2248. #var hp[self] 34 is the equivalent of #var {hp} {{self}{34}}. This
  2249. also allows merging tables. #var hp[self] 34;#var hp[target] 46 is
  2250. the equivalent of #var {hp} {{self}{34} {target}{46}} as well as
  2251. #var {hp} {{self}{34}} {{target}{46}} or if you want to get creative
  2252. the equivalent of #var hp[self] 34;#var {hp} {&dollar;hp} {{target}{46}}.
  2253. </span><span class='l37'>Comment</span><span class='d37'>: You can remove a variable with the #unvariable command.
  2254. </span><span class='l37'>Related</span><span class='d37'>: format, function, local, math, replace and script.
  2255. <a name='WHILE'></a>
  2256. </span><span class='l32'> WHILE
  2257. </span><span class='l37'>Command</span><span class='d37'>: #while </span><span class='l37'>{</span><span class='d37'>conditional</span><span class='l37'>} {</span><span class='d37'>commands</span><span class='l37'>}</span><span class='d37'>
  2258. This command works similar to a 'while' statement in other languages.
  2259. When a 'while' command is encourated, the conditional is evaluated,
  2260. and if TRUE (any non-zero result) the commands are executed. The
  2261. 'while' loop will be repeated indefinitely until the conditional is
  2262. FALSE or the #BREAK or #RETURN commands are found.
  2263. The 'while' statement is only evaluated if it is read, so you must
  2264. nest it inside a trigger, like an alias or action.
  2265. The conditional is evaluated exactly the same as in the 'math' command.
  2266. </span><span class='l37'>Example</span><span class='d37'>: #math cnt 0;#while {&dollar;cnt &lt; 20} {#math cnt &dollar;cnt + 1;say &dollar;cnt}
  2267. </span><span class='l37'>Comment</span><span class='d37'>: See '#help math', for more information.
  2268. </span><span class='l37'>Related</span><span class='d37'>: statements
  2269. <a name='WRITE'></a>
  2270. </span><span class='l32'> WRITE
  2271. </span><span class='l37'>Command</span><span class='d37'>: #write </span><span class='l37'>{</span><span class='d37'>&lt;filename&gt;</span><span class='l37'>} {</span><span class='d37'>[FORCE]</span><span class='l37'>}</span><span class='d37'>
  2272. Writes all current actions, aliases, subs, highlights, and variables
  2273. to a command file, specified by filename.
  2274. By default you cannot write to .map files to prevent accidentally
  2275. overwriting a map file. Use the FORCE argument to ignore this
  2276. protection.
  2277. </span><span class='l37'>Related</span><span class='d37'>: log, read, scan and textin.
  2278. <a name='ZAP'></a>
  2279. </span><span class='l32'> ZAP
  2280. </span><span class='l37'>Command</span><span class='d37'>: #zap {[session]}
  2281. Kill your current session. If there is no current session, it will
  2282. cause the program to terminate. If you provide an argument it'll zap
  2283. the given session instead.
  2284. </span><span class='l37'>Related</span><span class='d37'>: all, port, run, session, sessionname, snoop and ssl.