help.html 140 KB

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