tutorial.html 114 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv='content-type' content='text/html; charset=utf-8'>
  5. <meta name='viewport' content='width=device-width, initial-scale=1.0'>
  6. <style type='text/css'>
  7. body {font-family:Consolas;font-size:12pt}
  8. a {text-decoration:none}
  9. a:link {color:#06b}
  10. a:visited {color:#6b0}
  11. a:hover {text-decoration:underline}
  12. a:active {color:#b06}
  13. </style>
  14. <body bgcolor='#000000'>
  15. </head>
  16. <pre>
  17. <span style='background-color:#000'><span style='color:#FFF'>
  18. <a href='#CHARACTERS'> CHARACTERS</a> <a href='#COLORS'> COLORS</a> <a href='#COORDINATES'> COORDINATES</a> <a href='#EDITING'> EDITING</a> <a href='#ESCAPE CODES'> ESCAPE CODES</a>
  19. <a href='#GREETING'> GREETING</a> <a href='#INDEX'> INDEX</a> <a href='#KEYPAD'> KEYPAD</a> <a href='#LISTS'> LISTS</a> <a href='#MAPPING'> MAPPING</a>
  20. <a href='#MATHEMATICS'> MATHEMATICS</a> <a href='#METRIC SYSTEM'> METRIC SYSTEM</a> <a href='#MOUSE'> MOUSE</a> <a href='#MSDP'> MSDP</a> <a href='#MSLP'> MSLP</a>
  21. <a href='#PCRE'> PCRE</a> <a href='#REPEAT'> REPEAT</a> <a href='#SCREEN READER'> SCREEN READER</a> <a href='#SESSIONNAME'> SESSIONNAME</a> <a href='#SPEEDWALK'> SPEEDWALK</a>
  22. <a href='#STATEMENTS'> STATEMENTS</a> <a href='#SUBSTITUTIONS'> SUBSTITUTIONS</a> <a href='#SUSPEND'> SUSPEND</a> <a href='#TIME'> TIME</a>
  23. <a name='INDEX'></a>
  24. </span><span style='color:#FF5'> INDEX
  25. </span><span style='color:#AAA'> On this page you'll find an introduction to using TinTin++. Additional
  26. information can be found in the individual help sections.
  27. </span><span style='color:#5F5'>
  28. Starting and Ending
  29. </span><span style='color:#AAA'>
  30. The syntax for starting TinTin++ is: ./tt++ [command file]
  31. Read more about the command file in the files section below. Remember
  32. one thing though. All actions, aliases, substitutions, etc, defined
  33. when starting up TinTin++ are inherited by all sessions.
  34. If you want to exit TinTin++ type '#end' or press ctrl-d on an empty
  35. line.
  36. For the WinTin++ users, if you want to paste text use shift-insert,
  37. text is automatically copied upon selection. This is typical Linux
  38. behavior, but it can take some getting used to.
  39. </span><span style='color:#5F5'>
  40. Basic features
  41. </span><span style='color:#AAA'>
  42. I'll start by explaining some of the very basic and important features:
  43. All TinTin++ commands starts with a '#'.
  44. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #help -- #help is a client command, and isn't send to the server.
  45. All TinTin++ commands can be abbreviated when typed.
  46. #he -- Typing #he is the same as typing #help though it's suggested to
  47. use at least 3 letter abbreviations just in case another command is
  48. added that starts with 'he'.
  49. All commands can be separated with a ';'.
  50. n;l dragon;s;say Dan Dare is back! -- do these 4 commands
  51. There are 3 ways ';'s can be overruled.
  52. &bsol;say Hello ;) -- Lines starting with a '&bsol;' aren't parsed by TinTin++.
  53. say Hello &bsol;;) -- The escape character can escape 1 letter.
  54. #config verbatim on -- Everything is sent as is except '#' commands.
  55. </span><span style='color:#5F5'>
  56. Connecting to a server
  57. </span><span style='color:#FFF'>
  58. Command</span><span style='color:#AAA'>: #session </span><span style='color:#FFF'>{</span><span style='color:#AAA'>session name</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>server address</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>port</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  59. Example: #session someone tintin.sourceforge.net 4321
  60. You can have more than one session, in which case you can switch
  61. between sessions typing #&lt;session name&gt;.
  62. You can get a list of all sessions by typing: #session. The current
  63. active session is marked with (active). Snooped sessions with
  64. (snooped). MCCP sessions (compression) with (mccp 2) and (mccp 3).
  65. </span><span style='color:#5F5'>
  66. Split
  67. </span><span style='color:#FFF'>
  68. Command</span><span style='color:#AAA'>: #split
  69. The split command will create a separated input and output area.
  70. Using the #prompt command you can capture the prompt and place it on
  71. the split line. To get rid of the split interface you can use #unsplit
  72. which will restore the terminal settings to default.
  73. </span><span style='color:#5F5'>
  74. Alias
  75. </span><span style='color:#FFF'>
  76. Command</span><span style='color:#AAA'>: #alias </span><span style='color:#FFF'>{</span><span style='color:#AAA'>name</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>commands</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  77. The syntax of the #alias command is almost like alias in csh.
  78. Use this command to define aliases. The variables %0, %1.. %9 contain
  79. the arguments to the aliased command as follows:
  80. the %0 variable contains all the arguments.
  81. the %1 variable contains the 1st argument
  82. ....
  83. the %9 variable contains the 9th argument
  84. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #alias greet say Greetings, most honorable %1
  85. If you want an alias to execute more commands, you must use braces.
  86. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #alias ws </span><span style='color:#FFF'>{</span><span style='color:#AAA'>wake;stand</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  87. To delete an alias use the #unalias command.
  88. WARNING! TinTin++ doesn't baby sit, and hence does not check for
  89. recursive aliases! You can avoid recursion by escaping the entire
  90. line.
  91. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #alias put &bsol;put %1 in %2
  92. Or by using the send command.
  93. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #alias put #send put %1 in %2
  94. </span><span style='color:#5F5'> Action
  95. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #action </span><span style='color:#FFF'>{</span><span style='color:#AAA'>action-text</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>commands</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  96. Use this command to define an action to take place when a particular
  97. text appears on your screen. There are 99 variables you can use as
  98. wildcards in the action-text.
  99. These variables are %1, %2, %3 .... %9, %10, %11 ... %97, %98, %99.
  100. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #action </span><span style='color:#FFF'>{</span><span style='color:#AAA'>You are hungry</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>get bread bag;eat bread</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  101. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #action </span><span style='color:#FFF'>{</span><span style='color:#AAA'>%1 has arrived.</span><span style='color:#FFF'>}</span><span style='color:#AAA'> shake %1 -- shake hands with people arriving.
  102. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #action </span><span style='color:#FFF'>{</span><span style='color:#AAA'>%1 tells you '%2'</span><span style='color:#FFF'>}
  103. {</span><span style='color:#AAA'>tell bob %1 told me '%2'</span><span style='color:#FFF'>}</span><span style='color:#AAA'> -- forward tells.
  104. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #action </span><span style='color:#FFF'>{</span><span style='color:#AAA'>tells you</span><span style='color:#FFF'>}</span><span style='color:#AAA'> #bell -- beep on tell.
  105. You can have TinTin++ ignore actions if you type '#ignore actions on'.
  106. You can see what commands TinTin++ executes when an action triggers
  107. by typing '#debug actions on'.
  108. You can remove actions with the #unaction command.
  109. </span><span style='color:#5F5'>
  110. Command files
  111. </span><span style='color:#AAA'>
  112. When you order TinTin++ to read a command file, it parses all the text
  113. in the file. You can use command files to keep aliases/actions in,
  114. login to a server (name, password etc..) and basically all kinds of
  115. commands.
  116. You can make the command files with either a text editor (suggested),
  117. or use the #write command to write out a file.
  118. Commands for files:
  119. #read filename -- read and execute the file.
  120. #write filename -- write all actions/aliases/substitutes/etc known for
  121. the current session to a file.
  122. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>:
  123. #session x mymud.com 1234
  124. myname
  125. mypassword
  126. #split
  127. #action {^You are hungry.} {eat bread}
  128. If you save the above five lines to a file named 'mymud.tin' you can
  129. use 'tt++ mymud.tin' to start tintin and execute the file, connecting
  130. you to your mud, logging in, enabling split mode, and setting an action
  131. to eat a bread whenever you go hungry.
  132. </span><span style='color:#5F5'>
  133. Highlight
  134. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #highlight </span><span style='color:#FFF'>{</span><span style='color:#AAA'>text</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>color</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  135. This command works a bit like #action. The purpose of this command is
  136. to substitute text from the server with color you provide. This command
  137. is a simplified version of the #substitute command.
  138. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #high </span><span style='color:#FFF'>{</span><span style='color:#AAA'>Snowy</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>light yellow</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  139. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #high </span><span style='color:#FFF'>{</span><span style='color:#AAA'>%*Snowy%*</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>light yellow</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  140. Use #unhigh to delete highlights.
  141. </span><span style='color:#5F5'> Speedwalk
  142. </span><span style='color:#AAA'>
  143. If you type a command consisting ONLY of letters and numbers n, e, s,
  144. w, u, d - then this command can be interpreted as a serie of movement
  145. commands.
  146. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: ssw2n -- go south, south, west, north, north
  147. If you have problems with typing some commands that actually ONLY
  148. consists of these letters, then type them in CAPS. For example when
  149. checking the NEWS or when asked to enter NEW as your name.
  150. You must enable speedwalking with: #config speedwalk on.
  151. </span><span style='color:#5F5'>
  152. Ticker
  153. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #ticker </span><span style='color:#FFF'>{</span><span style='color:#AAA'>name</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>commands</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>seconds</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  154. The name can be whatever you want it to be, and is only required for
  155. the unticker command. The commands will be executed every x amount of
  156. seconds, which is specified in the interval part.
  157. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #tick </span><span style='color:#FFF'>{</span><span style='color:#AAA'>tick</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>#delay 50 #show 10 SECONDS TO TICK!;#show TICK!!!</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>60</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  158. This creates a ticker with the name </span><span style='color:#FFF'>{</span><span style='color:#AAA'>tick</span><span style='color:#FFF'>}</span><span style='color:#AAA'> which will print TICK!!!,
  159. as well as print a warning when the next tick will occure.
  160. You can remove tickers with #untick
  161. </span><span style='color:#5F5'>
  162. Repeating Commands
  163. </span><span style='color:#AAA'>
  164. You can repeat a command, the syntax is: #number command
  165. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #5 cackle -- if you just killed bob the wizard.
  166. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #10 </span><span style='color:#FFF'>{</span><span style='color:#AAA'>buy bread;put bread bag</span><span style='color:#FFF'>}</span><span style='color:#AAA'> -- repeat these 2 commands 10 times.
  167. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #100 ooc w00t w00t!!!!! -- nochannel yourself.
  168. </span><span style='color:#5F5'>
  169. History
  170. </span><span style='color:#AAA'>
  171. TinTin++ has a limited subset of the csh history features.
  172. ! -- repeat the last command
  173. !cast -- repeat the last command starting with cast
  174. ctrl-r -- enter the reverse history search mode.
  175. </span><span style='color:#5F5'>
  176. Map commands
  177. </span><span style='color:#AAA'>
  178. TinTin++ has a powerful highly configurable automapper. Whenever
  179. you type n/ne/e/se/s/sw/w/nw/n/u/d tt++ tries to keep track of your
  180. movement.
  181. Commands for map:
  182. #map create -- create a map.
  183. #map goto 1 -- go to the first room in the map, created by default.
  184. #map map -- display the map.
  185. #map undo -- undo your last map alteration.
  186. #map write &lt;filename&gt; -- save the map to file.
  187. #map read &lt;filename&gt; -- load a map from file.
  188. There are many other map options and it's beyond the scope of this
  189. help section to explain everything there is to know, but I'll give
  190. a set of commands that will get most people started.
  191. #map create
  192. #split 12 1
  193. #map flag unicode on
  194. #map flag vt on
  195. #map goto 1
  196. These commands will create a 12 row vt100 split section at the top of
  197. your screen where a map drawn using unicode characters is displayed.
  198. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #action </span><span style='color:#FFF'>{</span><span style='color:#AAA'>There is no exit in that direction.</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>#map undo</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  199. The map will be automatically created as you move around.
  200. </span><span style='color:#5F5'>
  201. Help
  202. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #help </span><span style='color:#FFF'>{</span><span style='color:#AAA'>subject</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  203. The help command is your friend and contains the same helpfiles
  204. inside TinTin++ as are available on the website. If you type #help
  205. without an argument you will see the various available help subjects
  206. which try to explain the TinTin++ commands and features in greater
  207. detail. Entries in cyan describe commands, while entries in white
  208. describe various features, often in greater detail.
  209. </span><span style='color:#5F5'>
  210. That's all for the introduction, enjoy</span><span style='color:#AAA'>
  211. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CHARACTERS'>characters</a>, <a href='#COLORS'>colors</a>, <a href='#COORDINATES'>coordinates</a>, <a href='#EDITING'>editing</a>, <a href='#ESCAPE_CODES'>escape_codes</a>, <a href='#GREETING'>greeting</a>, <a href='#KEYPAD'>keypad</a>, <a href='#LISTS'>lists</a>, <a href='#MAPPING'>mapping</a>, <a href='#MATHEMATICS'>mathematics</a>, <a href='#SCREEN_READER'>screen_reader</a>, <a href='#SESSIONNAME'>sessionname</a>, <a href='#SPEEDWALK'>speedwalk</a>, <a href='#STATEMENTS'>statements</a>, <a href='#SUSPEND'>suspend</a> and <a href='#TIME'>time</a>.
  212. <a name='CHARACTERS'></a>
  213. </span><span style='color:#5F5'> CHARACTERS
  214. </span><span style='color:#AAA'>
  215. The following special characters are defined:
  216. # The hashtag is the default character for starting a command and is
  217. subsequently known as the command character or tintin character.
  218. When loading a command file the command character is set to the
  219. first character in the file. The character can also be redefined
  220. using #config.
  221. ; The semi-colon is used as the command separator and can be used to
  222. separate two commands. Multiple commands can be strung together as
  223. well. Trailing semi-colons are ignored when reading a script file
  224. as this is a common error.
  225. { } Curly brackets aka braces are used for separating multi word command
  226. arguments, nesting commands, and nesting variables. Braces cannot
  227. easily be escaped and must always be used in pairs.
  228. &quot; &quot; Quote characters are used for strings in the #math, #if, #switch,
  229. and #case commands. It is however suggested to use a set of braces
  230. { } to define strings instead, particularly when checking strings
  231. that may contain quotes.
  232. ! The exclamation sign is used to repeat commands, see #help history.
  233. The character can be redefined using #config.
  234. &bsol; An input line starting with a backslash is sent verbatim if you are
  235. connected to a server. This character can be configured with
  236. #config, and is itself send verbatim when the verbatim config mode
  237. is enabled.
  238. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#COLORS'>colors</a>, <a href='#ESCAPE'>escape</a>, <a href='#FUNCTION'>function</a>, <a href='#MATHEMATICS'>mathematics</a>, <a href='#PCRE'>pcre</a> and <a href='#VARIABLE'>variable</a>.
  239. <a name='COLORS'></a>
  240. </span><span style='color:#5F5'> COLORS
  241. </span><span style='color:#FFF'>Syntax</span><span style='color:#AAA'>: &lt;xyz&gt; with x, y, z being parameters
  242. Parameter 'x': VT100 code
  243. 0 - Reset all colors and codes to default
  244. 1 - Bold
  245. 2 - Dim
  246. 3 - Italic
  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 style='color:#FFF'>Example</span><span style='color:#AAA'>: #show &lt;acf&gt;Azure &lt;afc&gt;Jade &lt;caf&gt;Violet
  267. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #show &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 &lt;F000000&gt; to &lt;FFFFFFF&gt; for foreground
  271. colors and &lt;B000000&gt; to &lt;BFFFFFF&gt; for background colors.
  272. If the color code exceeds your configured color mode it will be
  273. downgraded to the closest match.
  274. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CHARACTERS'>characters</a>, <a href='#COORDINATES'>coordinates</a>, <a href='#ESCAPE'>escape</a>, <a href='#MATHEMATICS'>mathematics</a> and <a href='#PCRE'>pcre</a>.
  275. <a name='COORDINATES'></a>
  276. </span><span style='color:#5F5'> COORDINATES
  277. </span><span style='color:#AAA'>
  278. When the 0,0 coordinate is in the upper left corner TinTin++ uses
  279. a y,x / row,col notation, starting at 1,1. Subsequently -1,-1
  280. will indicate the bottom right corner. This type of argument is
  281. used by the #showme command.
  282. When the 0,0 coordinate is in the bottom left corner tintin uses
  283. a standard x,y notation. This type of argument is used by the
  284. #map jump command.
  285. The vast majority of tintin commands use y,x / row,col notation,
  286. primarily because that is the notation used by the VT100 standard
  287. used for terminal emulation.
  288. </span><span style='color:#5F5'>Squares
  289. </span><span style='color:#AAA'>
  290. A square argument takes 2 coordinates. The first coordinate defines
  291. the upper left corner, the last coordinate defines the bottom
  292. right corner. The upper left corner of the terminal is defined as
  293. 1,1 and the bottom right corner as -1,-1. This type of argument is
  294. used by #draw, #button and #map offset.
  295. </span><span style='color:#5F5'>Panes
  296. </span><span style='color:#AAA'>
  297. A pane argument takes 4 size values, which are: top pane, bottom
  298. pane, left pane, right pane. When a negative value is provided the
  299. size is the maximum size, minus the value. This type of argument
  300. is used by the #split command.
  301. </span><span style='color:#5F5'>Ranges
  302. </span><span style='color:#AAA'>
  303. A range argument takes 2 values known as the upper bound and lower
  304. bound. The upper bound (first value) defines the start of the
  305. range, the lower bound (second value) the end. The first index of
  306. a range is defined as 1. When a negative value is provides the last
  307. index is defined as -1. This type of argument is used by #buffer
  308. and #variable.
  309. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CHARACTERS'>characters</a>, <a href='#COLORS'>colors</a>, <a href='#ESCAPE'>escape</a>, <a href='#MATHEMATICS'>mathematics</a> and <a href='#PCRE'>pcre</a>.
  310. <a name='EDITING'></a>
  311. </span><span style='color:#5F5'> EDITING
  312. </span><span style='color:#AAA'>
  313. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  314. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>alt b </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor backward word </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  315. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  316. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>alt f </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor forward word </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  317. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  318. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  319. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl a </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor home </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  320. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  321. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl b </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor backward </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  322. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  323. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl c </span><span style='color:#0AA'>││</span><span style='color:#FFF'>clear line </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  324. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  325. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl d </span><span style='color:#0AA'>││</span><span style='color:#FFF'>delete or exit </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  326. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  327. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl e </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor end </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  328. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  329. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl f </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor forward </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  330. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  331. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl g </span><span style='color:#0AA'>││</span><span style='color:#FFF'> </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  332. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  333. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl h </span><span style='color:#0AA'>││</span><span style='color:#FFF'>backspace </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  334. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  335. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl i </span><span style='color:#0AA'>││</span><span style='color:#FFF'>tab </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  336. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  337. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl j </span><span style='color:#0AA'>││</span><span style='color:#FFF'>enter </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  338. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  339. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl k </span><span style='color:#0AA'>││</span><span style='color:#FFF'>clear line right </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  340. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  341. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl l </span><span style='color:#0AA'>││</span><span style='color:#FFF'>redraw input </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  342. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  343. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl m </span><span style='color:#0AA'>││</span><span style='color:#FFF'>enter </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  344. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  345. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl n </span><span style='color:#0AA'>││</span><span style='color:#FFF'>input history next </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  346. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  347. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl o </span><span style='color:#0AA'>││</span><span style='color:#FFF'> </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  348. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  349. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl p </span><span style='color:#0AA'>││</span><span style='color:#FFF'>input history prev </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  350. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  351. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl q </span><span style='color:#0AA'>││</span><span style='color:#FFF'> </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  352. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  353. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl r </span><span style='color:#0AA'>││</span><span style='color:#FFF'>input history search </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  354. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  355. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl s </span><span style='color:#0AA'>││</span><span style='color:#FFF'> </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  356. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  357. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl t </span><span style='color:#0AA'>││</span><span style='color:#FFF'>scroll buffer lock </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  358. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  359. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl u </span><span style='color:#0AA'>││</span><span style='color:#FFF'>clear line left </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  360. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  361. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl v </span><span style='color:#0AA'>││</span><span style='color:#FFF'>convert meta characters </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  362. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  363. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl w </span><span style='color:#0AA'>││</span><span style='color:#FFF'>delete word left </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  364. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  365. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl x </span><span style='color:#0AA'>││</span><span style='color:#FFF'> </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  366. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  367. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl y </span><span style='color:#0AA'>││</span><span style='color:#FFF'>paste </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  368. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  369. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl z </span><span style='color:#0AA'>││</span><span style='color:#FFF'>suspend </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  370. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  371. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  372. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>arrow left </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor left </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  373. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  374. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>arrow right </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor right </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  375. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  376. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>arrow up </span><span style='color:#0AA'>││</span><span style='color:#FFF'>previous input line </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  377. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  378. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>arrow down </span><span style='color:#0AA'>││</span><span style='color:#FFF'>next input line </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  379. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  380. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  381. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl arrow left </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor left word </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  382. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  383. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl arrow right </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor right word </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  384. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  385. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  386. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>backspace </span><span style='color:#0AA'>││</span><span style='color:#FFF'>backspace </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  387. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  388. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>alt backspace </span><span style='color:#0AA'>││</span><span style='color:#FFF'>clear line left </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  389. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  390. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl backspace </span><span style='color:#0AA'>││</span><span style='color:#FFF'>clear line </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  391. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  392. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  393. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>delete </span><span style='color:#0AA'>││</span><span style='color:#FFF'>delete </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  394. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  395. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl delete </span><span style='color:#0AA'>││</span><span style='color:#FFF'>delete word right </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  396. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  397. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  398. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>end </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor end </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  399. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  400. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl end </span><span style='color:#0AA'>││</span><span style='color:#FFF'>scroll buffer end </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  401. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  402. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  403. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>enter </span><span style='color:#0AA'>││</span><span style='color:#FFF'>enter </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  404. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  405. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>shift-enter </span><span style='color:#0AA'>││</span><span style='color:#FFF'>soft enter </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  406. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  407. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  408. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>home </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor home </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  409. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  410. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl home </span><span style='color:#0AA'>││</span><span style='color:#FFF'>scroll buffer home </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  411. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  412. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  413. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>page up </span><span style='color:#0AA'>││</span><span style='color:#FFF'>scroll buffer up </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  414. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  415. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>page down </span><span style='color:#0AA'>││</span><span style='color:#FFF'>scroll buffer down </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  416. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  417. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  418. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>tab </span><span style='color:#0AA'>││</span><span style='color:#FFF'>complete word forward </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  419. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  420. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>shift-tab </span><span style='color:#0AA'>││</span><span style='color:#FFF'>complete word backward </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  421. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  422. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CURSOR'>cursor</a>, <a href='#EDIT'>edit</a> and <a href='#MACRO'>macro</a>.
  423. <a name='ESCAPE CODES'></a>
  424. </span><span style='color:#5F5'> ESCAPE CODES
  425. </span><span style='color:#AAA'> You may use the escape character &bsol; for various special characters.
  426. &bsol;a beep the terminal.
  427. &bsol;c send a control character, &bsol;ca for ctrl-a.
  428. &bsol;e start an escape sequence.
  429. &bsol;f send a form feed.
  430. &bsol;n send a line feed.
  431. &bsol;r send a carriage return.
  432. &bsol;t send a horizontal tab.
  433. &bsol;x print an 8 bit character using hexadecimal, &bsol;xFF for example.
  434. &bsol;x7B send the '{' character.
  435. &bsol;x7D send the '}' character.
  436. &bsol;u print a 16 bit unicode character, &bsol;uFFFD for example.
  437. &bsol;u{} print a 8-21 bit unicode character, &bsol;u{2AF21} for example.
  438. &bsol;U print a 21 bit unicode character, &bsol;U02AF21 for example.
  439. &bsol;v send a vertical tab
  440. Ending a line with &bsol; will stop tintin from appending a line feed.
  441. To escape arguments in an alias or action use %%0 %%1 %%2 etc.
  442. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CHARACTERS'>characters</a>, <a href='#COLORS'>colors</a>, <a href='#COORDINATES'>coordinates</a>, <a href='#MATHEMATICS'>mathematics</a> and <a href='#PCRE'>pcre</a>.
  443. <a name='GREETING'></a>
  444. </span><span style='color:#5F5'> GREETING
  445. </span><span style='color:#0AA'> ####################################################################
  446. #</span><span style='color:#AAA'> </span><span style='color:#0AA'>#
  447. #</span><span style='color:#AAA'> T I N T I N + + 2.02.21b </span><span style='color:#0AA'>#
  448. #</span><span style='color:#AAA'> </span><span style='color:#0AA'>#
  449. #</span><span style='color:#AAA'> Code by Peter Unold, Bill Reis, and Igor van den Hoven </span><span style='color:#0AA'>#
  450. #</span><span style='color:#AAA'> </span><span style='color:#0AA'>#
  451. ####################################################################
  452. <a name='KEYPAD'></a>
  453. </span><span style='color:#5F5'> KEYPAD
  454. </span><span style='color:#AAA'> When TinTin++ starts up it sends &bsol;e= to the terminal to enable the
  455. terminal's application keypad mode, which can be disabled using #show {&bsol;e&gt;}
  456. </span><span style='color:#FFF'> Configuration A Configuration B Configuration C</span><span style='color:#0AA'>
  457. ╭─────┬─────┬─────┬─────╮ ╭─────┬─────┬─────┬─────╮ ╭─────┬─────┬─────┬─────╮
  458. │</span><span style='color:#FFF'>num</span><span style='color:#0AA'> │</span><span style='color:#FFF'>/</span><span style='color:#0AA'> │</span><span style='color:#FFF'>*</span><span style='color:#0AA'> │</span><span style='color:#FFF'>-</span><span style='color:#0AA'> │ │</span><span style='color:#FFF'>num</span><span style='color:#0AA'> │</span><span style='color:#FFF'>/</span><span style='color:#0AA'> │</span><span style='color:#FFF'>*</span><span style='color:#0AA'> │</span><span style='color:#FFF'>-</span><span style='color:#0AA'> │ │</span><span style='color:#FFF'>Num</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp/</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp*</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp-</span><span style='color:#0AA'> │
  459. ├─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┤
  460. │</span><span style='color:#FFF'>7</span><span style='color:#0AA'> │</span><span style='color:#FFF'>8</span><span style='color:#0AA'> │</span><span style='color:#FFF'>9</span><span style='color:#0AA'> │</span><span style='color:#FFF'>+</span><span style='color:#0AA'> │ │</span><span style='color:#FFF'>Home</span><span style='color:#0AA'> │</span><span style='color:#FFF'>Up</span><span style='color:#0AA'> │</span><span style='color:#FFF'>PgUp</span><span style='color:#0AA'> │</span><span style='color:#FFF'>+</span><span style='color:#0AA'> │ │</span><span style='color:#FFF'>nkp7</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp8</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp9</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp+</span><span style='color:#0AA'> │
  461. ├─────┼─────┼─────┤ │ ├─────┼─────┼─────┤ │ ├─────┼─────┼─────┤ │
  462. │</span><span style='color:#FFF'>4</span><span style='color:#0AA'> │</span><span style='color:#FFF'>5</span><span style='color:#0AA'> │</span><span style='color:#FFF'>6</span><span style='color:#0AA'> │ │ │</span><span style='color:#FFF'>Left</span><span style='color:#0AA'> │</span><span style='color:#FFF'>Cntr</span><span style='color:#0AA'> │</span><span style='color:#FFF'>Right</span><span style='color:#0AA'>│ │ │</span><span style='color:#FFF'>nkp4</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp5</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp6</span><span style='color:#0AA'> │ │
  463. ├─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┤
  464. │</span><span style='color:#FFF'>1</span><span style='color:#0AA'> │</span><span style='color:#FFF'>2</span><span style='color:#0AA'> │</span><span style='color:#FFF'>3</span><span style='color:#0AA'> │</span><span style='color:#FFF'>Enter</span><span style='color:#0AA'>│ │</span><span style='color:#FFF'>End</span><span style='color:#0AA'> │</span><span style='color:#FFF'>Down</span><span style='color:#0AA'> │</span><span style='color:#FFF'>PgDn</span><span style='color:#0AA'> │</span><span style='color:#FFF'>Enter</span><span style='color:#0AA'>│ │</span><span style='color:#FFF'>nkp1</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp2</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp3</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkpEn</span><span style='color:#0AA'>│
  465. ├─────┴─────┼─────┤ │ ├─────┴─────┼─────┤ │ ├─────┴─────┼─────┤ │
  466. │</span><span style='color:#FFF'>0</span><span style='color:#0AA'> │</span><span style='color:#FFF'>.</span><span style='color:#0AA'> │ │ │</span><span style='color:#FFF'>Ins</span><span style='color:#0AA'> │</span><span style='color:#FFF'>Del</span><span style='color:#0AA'> │ │ │</span><span style='color:#FFF'>nkp0</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp.</span><span style='color:#0AA'> │ │
  467. ╰───────────┴─────┴─────╯ ╰───────────┴─────┴─────╯ ╰───────────┴─────┴─────╯
  468. </span><span style='color:#AAA'>
  469. With keypad mode disabled numlock on will give you configuration A,
  470. and numlock off will give you configuration B. With keypad mode
  471. enabled you'll get configuration C.
  472. </span><span style='color:#FFF'> Terminals that support keypad mode
  473. </span><span style='color:#AAA'> Linux Console, PuTTY, MinTTY, Eterm, aterm.
  474. </span><span style='color:#FFF'> Terminals that do not support keypad mode
  475. </span><span style='color:#AAA'> RXVT on Cygwin, Windows Console, Gnome Terminal, Konsole.
  476. </span><span style='color:#FFF'> Peculiar Terminals
  477. </span><span style='color:#AAA'> RXVT requires turning off numlock to enable configuration C.
  478. Xterm may require disabling Alt/NumLock Modifiers (num-lock) in the
  479. ctrl left-click menu. Or edit ~/.Xresources and add
  480. XTerm*VT100.numLock:false
  481. Mac OS X Terminal requires enabling 'strict vt100 keypad behavior' in
  482. Terminal -&gt; Window Settings -&gt; Emulation.
  483. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#COLORS'>colors</a>, <a href='#COORDINATES'>coordinates</a>, <a href='#ESCAPE'>escape</a>, <a href='#MATHEMATICS'>mathematics</a> and <a href='#PCRE'>pcre</a>.
  484. <a name='LISTS'></a>
  485. </span><span style='color:#5F5'> LISTS
  486. </span><span style='color:#AAA'> There are several different types of lists in tintin which behave in a
  487. fairly universal manner. To properly explain lists it's easiest to
  488. explain the most basic variable type first before discussing more
  489. complex types.
  490. - Basic variable: The standard key = value variable.
  491. - Simple list: A string that contains semicolon delimited fields.
  492. {a;b;c}. Can be saved as a variable.
  493. - Brace list: A string in which fields are delimited with braces.
  494. {a}{b}{c}. Brace lists cannot be stored as a variable because tables
  495. use braces as well, they must be stored as a simple list instead.
  496. - Table: Think of this as variables nested within another variable. Or
  497. as variables contained within another variable.
  498. - List: A table that uses integers for its indexes. Also known as an
  499. array. The #list command is a utility command for using tables as
  500. arrays.
  501. </span><span style='color:#5F5'> Simple Variables
  502. </span><span style='color:#AAA'>
  503. </span><span style='color:#FFF'>Example:
  504. </span><span style='color:#AAA'> #variable {simple} {Hello World!}
  505. #show &dollar;simple
  506. To see if the 'simple' variable exists you can use &amp;{simple} which
  507. will display 0 if the variable does not exist, or the variable's index
  508. if it exists.
  509. If you have multiple variables they are sorted alphabetically and
  510. numerically. While it's not all that relevant for simple variables,
  511. the first variable has index 1, the second variable index 2, and so
  512. on.
  513. Variable names need to start with a letter and only exist of letters,
  514. numbers, and underscores. If you need to use a non standard variable
  515. name this is possible using braces.
  516. </span><span style='color:#FFF'>Example: </span><span style='color:#AAA'>#variable {:)} {Happy Happy!};#show &dollar;{:)}
  517. Variables can be accessed using their index. While primarily useful
  518. for tables it is possible to do this for simple variables. Use +1 for
  519. the first variable, +2 for the second variable, etc. Use -1 for the
  520. last variable, -2 for the second last variable, etc.
  521. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #show The first variable is: *{+1} with value: &dollar;{+1}
  522. </span><span style='color:#5F5'> Removing Variables
  523. </span><span style='color:#AAA'>
  524. To remove a variable, use #unvariable or #unvar (every command can be
  525. abbreviated). It's possible to remove multiple variables at once
  526. using #unvar {var 1} {var 2} {etc}
  527. Variables are unique to each session, so if you have multiple
  528. sessions, removing a variable from one session won't remove it from
  529. other sessions.
  530. If you remove a table variable, all variables contained within that
  531. table variable are removed as well.
  532. </span><span style='color:#5F5'> Simple Lists
  533. </span><span style='color:#AAA'>
  534. A simple list is a string that contains semicolon delimited fields.
  535. Commands can be entered as simple lists, for example:
  536. #show {a};#show {b} will execute a single line as two commands.
  537. Several commands take a simple list as their input, these are:
  538. #foreach, #line substitute, #path load, #list create, and #highlight.
  539. </span><span style='color:#5F5'> Brace Lists
  540. </span><span style='color:#AAA'>
  541. A brace list is a string in which fields are delimited with braces.
  542. Most commands take a brace list for their arguments, for example:
  543. #session {x} {mud.com} {1234} {mud.tin}. The session command takes
  544. 4 arguments, the 4th argument (command file) is optional.
  545. Commands that take a simple list as their input will also accept a
  546. brace list, keep in mind you'll have to embed the brace list in an
  547. extra set of braces, for example: #path load {{n}{s}{w}{w}}, which is
  548. identical to: #path load {n;s;w;w}.
  549. Brace lists cannot be stored as variables because TinTin++ will
  550. confuse them with tables. You can convert a brace list to a table
  551. variable using: #list {bracelist} {create} {{a}{b}{c}} this will look
  552. internally as: {{1}{a}{2}{b}{3}{c}}. You can then convert this table
  553. back to a simple list using: #list {bracelist} {simplify} which will
  554. change it to {a;b;c}.
  555. Braces cannot easily be escaped in TinTin++. Using &bsol;{ or &bsol;} will not
  556. work. The reason for this is due to several factors, but primarily
  557. backward compatibility. To escape braces you must define them using
  558. hexadecimal notation using &bsol;x7B and &bsol;x7D. See #help escape for a list
  559. of escape options, and the help file will also remind you of how to
  560. escape braces.
  561. </span><span style='color:#5F5'> Tables
  562. </span><span style='color:#AAA'>
  563. Tables are key/value pairs stored within a variable. Tables are also
  564. known as associative arrays, dictionaries, maps, nested variables,
  565. structures, and probably a couple of other names. There are several
  566. ways to create and access tables.
  567. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #variable {friendlist} {{bob}{bob@mail.com} {bubba}{sunset@gmail.com}}
  568. This will create a friendlist with two entries, the key is the name of
  569. the friend, the value is the email address of the friend. You can see
  570. the email address of bob using: #show {&dollar;friendlist[bob]}. You can
  571. also define this table as following:
  572. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'>
  573. #variable {friendlist[bob]} {bob@mail.com}
  574. #variable {friendlist[bubba]} {sunset@gmail.com}
  575. This would create the exact same table as the single line declaration
  576. used previously. To see the first key in the table use:
  577. *friendlist[+1], to see the first value in the table use:
  578. &dollar;friendlist[+1]. To see the size of the table use &amp;friendlist[]. To
  579. print a bracelist of all friends use *friendlist[], to print a
  580. bracelist of all friends whose name starts with the letter 'a' you
  581. would use: *friendlist[a%*]. Similarly to see the number of friends
  582. you have whose name ends with the letter 'b' you would use:
  583. &amp;friendlist[%*b].
  584. See #help regexp for a brief overview of regular expression options.
  585. While TinTin++ supports PCRE (perl-compatible regular expressions), it
  586. embeds them within its own regular expression syntax that is simpler
  587. and less invasive, while still allowing the full power of PCRE for
  588. those who need it.
  589. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #unvariable {friendlist[bubba]}
  590. This would remove {bubba} from the friendlist. To remove the entire
  591. friendlist you would use: #unvariable {friendlist}.
  592. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #variable {friendlist} {{bob} {{email}{bob@ma.il} {phone}{123456789}}}
  593. There is no limit to the number of nests, simply add more braces. To
  594. see Bob's email in this example you would use:
  595. #show {&dollar;friendlist[bob][email]}.
  596. To merge two tables the #cat command can be used.
  597. </span><span style='color:#FFF'>Example:
  598. </span><span style='color:#AAA'> #variable {bli} {{a}{1}{b}{2}}
  599. #variable {blo} {{c}{3}{d}{4}}
  600. #cat {blo} {&dollar;bli}
  601. </span><span style='color:#5F5'> Lists
  602. </span><span style='color:#AAA'> Tables are sorted alphabetically with the exception of numbers which
  603. are sorted numerically. If you want to determine the sorting order
  604. yourself you can use use the #list command which helps you to use
  605. tables as arrays.
  606. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #action {%1 chats %2} {#list chats add {%0}}
  607. Each time a chat is received it's added to the end of the 'chats' list
  608. variable. If you type #variable chats this might look like:
  609. </span><span style='color:#FF5'>#</span><span style='color:#5FF'>VARIABLE </span><span style='color:#A0A'>{</span><span style='color:#FFF'>chats</span><span style='color:#A0A'>}
  610. {
  611. {</span><span style='color:#FFF'>1</span><span style='color:#A0A'>} {</span><span style='color:#FFF'>Bubba chats Hi</span><span style='color:#A0A'>}
  612. {</span><span style='color:#FFF'>2</span><span style='color:#A0A'>} {</span><span style='color:#FFF'>Bob chats Hi bub</span><span style='color:#A0A'>}
  613. {</span><span style='color:#FFF'>3</span><span style='color:#A0A'>} {</span><span style='color:#FFF'>Bubba chats Bye</span><span style='color:#A0A'>}
  614. {</span><span style='color:#FFF'>4</span><span style='color:#A0A'>} {</span><span style='color:#FFF'>Bob chats bub bye</span><span style='color:#A0A'>}
  615. }
  616. </span><span style='color:#5F5'> Parsing
  617. </span><span style='color:#AAA'>
  618. There are various ways to parse lists and tables, using either #loop,
  619. #foreach, #while, or #&lt;number&gt;.
  620. #loop takes two numeric arguments, incrementing or decrementing the
  621. first number until it matches the second number. The value of the loop
  622. counter is stored in the provided variable.
  623. #foreach takes either a simple list or a brace list as its first
  624. argument. Foreach will go through each item in the list and store the
  625. value in the provided variable.
  626. #while will perform an if check on the first argument, if the result
  627. is true it will execute the commands in the second argument. Then it
  628. performs an if check on the first argument again. It will continue to
  629. repeat until the if check returns 0 or the loop is interrupted with a
  630. control flow command. It takes special care to avoid infinite loops.
  631. #&lt;number&gt; will execute the provided argument 'number' times. For
  632. example: #4 {#show beep! &bsol;a}
  633. Here are some examples.
  634. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #list friends create {bob;bubba;zorro}
  635. Internally this looks like {{1}{bob}{2}{bubba}{3}{zorro}} and the
  636. list can be parsed in various ways.
  637. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #foreach {&dollar;friends[%*]} {name} {#show &dollar;name}
  638. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #foreach {*friends[%*]} {i} {#show &dollar;friends[&dollar;i]}
  639. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #loop {1} {&amp;friends[]} {i} {#show &dollar;friends[+&dollar;i]}
  640. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #math i 1;#while {&amp;friends[+&dollar;i]} {#show &dollar;friends[+&dollar;i];
  641. #math i &dollar;i + 1}
  642. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #math i 1;#&amp;friends[] {#show &dollar;friends[+&dollar;i];#math i &dollar;i + 1}
  643. Each of the five examples above performs the same task; printing the
  644. three names in the friends list.
  645. If you want to get a better look at what goes on behind the scenes
  646. while executing scripts you can use '#debug all on'. To stop seeing
  647. debug information use '#debug all off'.
  648. </span><span style='color:#5F5'> List Tables
  649. </span><span style='color:#AAA'> List tables are also known as databases and the #list command has
  650. several options to manipulate them.
  651. For these options to work properly all tables need to have identical
  652. keys. Here is an example list table.
  653. #var {friendlist}
  654. {
  655. {1}{{name}{bob} {age}{54}}
  656. {2}{{name}{bubba} {age}{21}}
  657. {3}{{name}{pamela} {age}{36}}
  658. }
  659. To sort the list table by age you would use:
  660. #list friendlist indexate age
  661. #list friendlist order
  662. To remove everyone whose name starts with a 'b' you would use:
  663. #list friendlist indexate name
  664. #list friendlist filter {} {b%*}
  665. The filter option only supports regular expressions. To filter
  666. using mathematics you would loop through the list backwards:
  667. #loop &amp;friendlist[] 1 index
  668. {
  669. #if {&dollar;friendlist[+&dollar;index][age] &lt; 30}
  670. {
  671. #list friendlist delete &dollar;index
  672. }
  673. }
  674. Alternatively you can use the refine option.
  675. #list friendlist indexate age
  676. #list friendlist refine {&amp;0 &gt;= 30}
  677. To add an item to a list table there are two options:
  678. #list friendlist add {{{name}{hobo} {age}{42}}}
  679. #list friendlist insert -1 {{name}{hobo} {age}{42}}
  680. </span><span style='color:#5F5'> Optimization
  681. </span><span style='color:#AAA'>
  682. TinTin++ tables are exceptionally fast while they remain under 100
  683. items. Once a table grows beyond 10000 items there can be performance
  684. issues when inserting and removing items in the beginning or middle of
  685. the table.
  686. The plan is to eventually implement an indexable and flexible data
  687. structure for large tables.
  688. If you load a large table from file it's important to make sure it's
  689. sorted, when using #write to save a table it's automatically sorted.
  690. If you notice performance issues on large tables it's relatively easy
  691. to create a hash table.
  692. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'>
  693. #alias {sethash}
  694. {
  695. #format hash %H %1;
  696. #math hash1 &dollar;hash % 100;
  697. #math hash2 &dollar;hash / 100 % 100;
  698. #var hashtable[&dollar;hash1][&dollar;hash2][%1] %2
  699. }
  700. #function {gethash}
  701. {
  702. #format hash %H %1;
  703. #math hash1 &dollar;hash % 100;
  704. #math hash2 &dollar;hash / 100 % 100;
  705. #return &dollar;hashtable[&dollar;hash1][&dollar;hash2][%1]
  706. }
  707. #alias {test}
  708. {
  709. sethash bli hey;
  710. sethash bla hi;
  711. sethash blo hello;
  712. #show The value of bla is: @gethash{bla}
  713. }
  714. The above script will rapidly store and retrieve over 1 million items.
  715. Looping through a hash table is relatively easy as well.
  716. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'>
  717. #alias {showhash}
  718. {
  719. #foreach {*hashtable[%*]} {hash1}
  720. {
  721. #foreach {*hashtable[&dollar;hash1][%*]} {hash2}
  722. {
  723. #echo {%-20s = %s}
  724. {hashtable[&dollar;hash1][&dollar;hash2]}
  725. {&dollar;hashtable[&dollar;hash1][&dollar;hash2]}
  726. }
  727. }
  728. }
  729. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#BREAK'>break</a>, <a href='#CONTINUE'>continue</a>, <a href='#FOREACH'>foreach</a>, <a href='#LOOP'>loop</a>, <a href='#PARSE'>parse</a>, <a href='#REPEAT'>repeat</a>, <a href='#RETURN'>return</a> and <a href='#WHILE'>while</a>.
  730. <a name='MAPPING'></a>
  731. </span><span style='color:#5F5'> MAPPING
  732. </span><span style='color:#AAA'>
  733. TinTin++ has a powerful automapper that uses a room system similar to
  734. Diku MUDs which means that odd map layouts and weird exit
  735. configurations aren't a problem. The mapper provides tools to improve
  736. the visual map display. For basic path tracking see #help PATH.
  737. </span><span style='color:#FFF'> #map create [size]
  738. </span><span style='color:#AAA'>
  739. This command creates the initial map. The size is 50,000 by default
  740. and can be changed at any time with the #map resize command. If you
  741. play a MUD that uses MSDP or GMCP to provide room numbers you'll have
  742. to increase it to the highest reported room number. Increasing the
  743. size of the map doesn't decrease performance.
  744. </span><span style='color:#FFF'> #map goto &lt;location&gt;
  745. </span><span style='color:#AAA'>
  746. When you create the map you are not automatically inside the map. By
  747. default room number (vnum) 1 is created, so you can go to it using
  748. #map goto 1. Once you are inside the map new rooms are automatically
  749. created as you move around. Movement commands are defined with the
  750. pathdir command. By default n, ne, e, se, s, sw, w, nw, u, d are
  751. defined.
  752. </span><span style='color:#FFF'>
  753. #map map &lt;rows&gt; &lt;cols&gt; &lt;append|overwrite|list|variable&gt; &lt;name&gt;
  754. </span><span style='color:#AAA'>
  755. To see the map you can use #map map. It's annoying to have to
  756. constantly type #map map however. Instead it's possible to use #split
  757. to display a vt100 map. To do so execute:
  758. </span><span style='color:#FFF'>#split 16 1
  759. #map flag vtmap on</span><span style='color:#AAA'>
  760. The first command sets the top split lines to 16 and the bottom split
  761. line to 1. If you want a smaller or larger map display you can use a
  762. different value than 16.
  763. If you don't need to display diagonal exits and prefer a more compact
  764. look you can use #map flag AsciiGraphics off. This will enable the
  765. standard display which uses UTF-8 box drawing characters, results may
  766. vary depending on the font used.
  767. If your terminal supports UTF-8 you can also give #map flag unicode on
  768. a try.
  769. If you want to display the map in a different location of the screen
  770. use something like:
  771. </span><span style='color:#FFF'>#split 0 1 0 -80
  772. #map offset 1 81 -4 -1</span><span style='color:#AAA'>
  773. This will display the map on the right side of the screen, if the
  774. width of the screen is wide enough.
  775. </span><span style='color:#FFF'>
  776. #map undo
  777. </span><span style='color:#AAA'>
  778. If you accidentally walk into the wall on your MUD the mapper will
  779. still create a new room. You can easily fix this mistake by using
  780. #map undo. If you want to move around on the map without moving around
  781. on the MUD you can use: #map move {direction}. To delete a room
  782. manually you can use: #map delete {direction}. To create a room
  783. manually you can use: #map dig {direction}.
  784. </span><span style='color:#FFF'>
  785. #map write &lt;filename&gt;
  786. </span><span style='color:#AAA'>
  787. You can save your map using #map write, to load a map you can use
  788. #map read &lt;filename&gt;.
  789. </span><span style='color:#FFF'>
  790. #map set &lt;option&gt; &lt;value&gt;
  791. </span><span style='color:#AAA'>
  792. You can set the room name using #map set roomname &lt;name&gt;. You either
  793. have to do this manually or create triggers to set the room name
  794. automatically. Once the room name is set you can use #map goto with
  795. the room name to visit it. If there are two rooms with the same name
  796. #map goto will go to the most nearby room. If you want to always go
  797. to the same room you should memorize the room number or create a
  798. landmark.
  799. </span><span style='color:#FFF'>
  800. #map landmark firstroom 1
  801. </span><span style='color:#AAA'>
  802. You can further narrow down the matches by providing additional
  803. arguments, for example:
  804. </span><span style='color:#FFF'>
  805. #map goto {dark alley} {roomexits} {n;e} {roomarea} {Haddock Ville}
  806. </span><span style='color:#AAA'>
  807. You can set the room weight using #map set roomweight {value}. The
  808. weight by default is set to 1.0 and it represents the difficulty of
  809. traversing the room. If you have a lake as an alternative route, and
  810. traversing water rooms is 4 times slower than regular rooms, then you
  811. could set the weight of the lake rooms to 4.0. If the lake is 3 rooms
  812. wide the total weight is 12. If walking around the lake has a weight
  813. less than 12 the mapper will go around the lake, if the weight is
  814. greater than 12 the mapper will take a route through the lake.
  815. You can set the room symbol using #map set roomsymbol {value}. The
  816. symbol should be one, two, or three characters, which can be
  817. colorized. You can for example mark shops with an 'S' and colorize the
  818. 'S' depending on what type of shop it is.
  819. </span><span style='color:#FFF'>
  820. #map run &lt;location&gt; &lt;delay&gt;
  821. </span><span style='color:#AAA'>
  822. The run command will have tintin find the shortest path to the given
  823. location and execute the movement commands to get there. You can
  824. provide a delay in seconds with floating point precision, for example:
  825. </span><span style='color:#FFF'>
  826. #map run {dark alley} {0.5}
  827. </span><span style='color:#AAA'>
  828. This will make you walk towards the nearest dark alley with 0.5 second
  829. intervals. Typical MUDs accept commands at 0.25 second intervals.
  830. </span><span style='color:#FFF'>
  831. #map insert {direction} {flag}
  832. </span><span style='color:#AAA'>
  833. The insert command is useful for adding spacer rooms called void rooms.
  834. Often rooms overlap, and by adding void rooms you can stretch out
  835. exits. For example: #map insert north void. You cannot enter void rooms
  836. once they've been created, so you'll have to use #map info in an
  837. adjacent room to find the room vnum, then use #map goto {vnum} to
  838. visit.
  839. It's also possible to align rooms using void rooms. This is easily
  840. done using #map insert north void.
  841. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#MAP'>map</a>, <a href='#PATH'>path</a> and <a href='#PATHDIR'>pathdir</a>.
  842. <a name='MATHEMATICS'></a>
  843. </span><span style='color:#5F5'> MATHEMATICS
  844. </span><span style='color:#FFF'>Number operations
  845. </span><span style='color:#AAA'> Operators Priority Function
  846. ------------------------------------------------
  847. ! 0 logical not
  848. ~ 0 bitwise not
  849. * 1 integer multiply
  850. ** 1 integer power
  851. / 1 integer divide
  852. // 1 integer sqrt // 2 or cbrt // 3
  853. % 1 integer modulo
  854. d 1 integer random dice roll
  855. + 2 integer addition
  856. - 2 integer subtraction
  857. &lt;&lt; 3 bitwise shift
  858. &gt;&gt; 3 bitwise shift
  859. &gt; 4 logical greater than
  860. &gt;= 4 logical greater than or equal
  861. &lt; 4 logical less than
  862. &lt;= 4 logical less than or equal
  863. == 5 logical equal
  864. != 5 logical not equal
  865. &amp; 6 bitwise and
  866. ^ 7 bitwise xor
  867. | 8 bitwise or
  868. &amp;&amp; 9 logical and
  869. ^^ 10 logical xor
  870. || 11 logical or
  871. Operator priority can be ignored by using parentheses, for example (1 + 1) * 2
  872. equals 4, while 1 + 1 * 2 equals 3.
  873. </span><span style='color:#FFF'>String operations</span><span style='color:#AAA'>
  874. Operators Priority Function
  875. ------------------------------------------------
  876. &gt; 4 alphabetical greater than
  877. &gt;= 4 alphabetical greater than or equal
  878. &lt; 4 alphabetical less than
  879. &lt;= 4 alphabetical less than or equal
  880. == 5 alphabetical equal using regex
  881. != 5 alphabetical not equal using regex
  882. === 5 alphabetical equal
  883. !== 5 alphabetical not equal
  884. Strings must be encased in double quotes or braces. The &gt; &gt;= &lt; &lt;= operators
  885. perform basic string comparisons. The == != operators perform regular
  886. expressions, with the argument on the left being the string, and the argument
  887. on the right being the regex. For example {bla} == {%*a} would evaluate as 1.
  888. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#MATH'>math</a> and <a href='#REGEXP'>regexp</a>.
  889. <a name='METRIC SYSTEM'></a>
  890. </span><span style='color:#5F5'> METRIC SYSTEM
  891. </span><span style='color:#AAA'>
  892. Name Symbol Factor
  893. --------------------------------------------------
  894. Mega M 1 000 000
  895. Kilo K 1 000
  896. milli m 0.001
  897. micro u 0.000 001
  898. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#ECHO'>echo</a>, <a href='#FORMAT'>format</a> and <a href='#MATH'>math</a>.
  899. <a name='MOUSE'></a>
  900. </span><span style='color:#5F5'> MOUSE
  901. </span><span style='color:#AAA'>
  902. To enable xterm mouse tracking use #CONFIG MOUSE ON.
  903. To see mouse events as they happen use #CONFIG MOUSE INFO. This
  904. information can then be used to create mouse events with the #event
  905. command and buttons with the #button command.
  906. Visual buttons and pop-ups can be drawn on the screen with the #draw
  907. command.
  908. The input field can be changed and renamed using #screen inputregion,
  909. which allows creating named events for enter handling.
  910. Links can be created using the MSLP protocol which will generate link
  911. specific events when clicked.
  912. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#BUTTON'>button</a>, <a href='#DRAW'>draw</a>, <a href='#EVENT'>event</a> and <a href='#MSLP'>MSLP</a>.
  913. <a name='MSDP'></a>
  914. </span><span style='color:#5F5'> MSDP
  915. </span><span style='color:#AAA'>
  916. MSDP (Mud Server Data Protocol) is part of the #port functionality.
  917. See #help event for additional documentation as all MSDP events are
  918. available as regular events.
  919. Available MSDP events can be queried using the MSDP protocol
  920. as described in the specification.
  921. </span><span style='color:#FFF'>
  922. https://tintin.sourceforge.io/protocols/msdp
  923. Related</span><span style='color:#AAA'>: <a href='#EVENT'>event</a> and <a href='#PORT'>port</a>.
  924. <a name='MSLP'></a>
  925. </span><span style='color:#5F5'> MSLP
  926. </span><span style='color:#AAA'>
  927. MSLP (Mud Server Link Protocol) requires enabling #config mouse on,
  928. and creating the appropriate LINK events.
  929. The simplest link can be created by surrounding a keyword with the
  930. &bsol;e[4m and &bsol;e[24m tags.
  931. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #substitute {&bsol;b{n|e|s|w|u|d}&bsol;b} {&bsol;e[4m%1&bsol;e[24m}
  932. This would display 'Exits: n, e, w.' as 'Exits: n, e, w.'.
  933. When clicked this would trigger the PRESSED LINK MOUSE BUTTON ONE
  934. event of which %4 will hold the link command and %6 holds the
  935. link name, which in the case of a simple link will be empty.
  936. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #event {PRESSED LINK MOUSE BUTTON ONE} {#send {%4}}
  937. Keep in mind that if you change PRESSED to DOUBLE-CLICKED the link
  938. will only work if the text does not scroll in between clicks.
  939. If you want to create a complex link use an OSC code.
  940. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #sub {&bsol;bsmurf&bsol;b} {&bsol;e]68;1;;say I hate smurfs!&bsol;a&bsol;e[4m%0&bsol;e[24m}
  941. If you have the LINK event of the previous example set, the %4
  942. argument will contain 'say I hate smurfs!'.
  943. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #sub {&bsol;bgoblin&bsol;b} {&bsol;e]68;1;SEND;kill goblin&bsol;a&bsol;e[4m%0&bsol;e[24m}
  944. Notice the previous instance of ;; has been replaced with ;SEND;
  945. which will name the link. This will generate a named event.
  946. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #event {PRESSED LINK SEND MOUSE BUTTON ONE} {#send {%4}}
  947. By naming links you can organize things a little bit better instead
  948. of tunneling everything through the same event.
  949. Keep in mind that the server is allowed to use &bsol;e]68;1;&bsol;a as well,
  950. subsequently various security measures are in place.
  951. To create secure links, which are filtered out when send by a server,
  952. you need to use &bsol;e]68;2;&bsol;a, and they instead trigger the SECURE LINK
  953. event.
  954. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #sub {%* tells %*} {&bsol;e]68;2;EXEC;#cursor set tell %1 &bsol;a&bsol;e[4m%0&bsol;e[24m}
  955. </span><span style='color:#FFF'> </span><span style='color:#AAA'> #event {PRESSED SECURE LINK EXEC MOUSE BUTTON ONE} {%4}
  956. This would make you start a reply when clicking on a tell.
  957. </span><span style='color:#FFF'>Website</span><span style='color:#AAA'>: https://tintin.mudhalla.net/protocols/mslp
  958. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#EVENT'>event</a> and <a href='#PORT'>port</a>.
  959. <a name='PCRE'></a>
  960. </span><span style='color:#5F5'> PCRE
  961. </span><span style='color:#AAA'>
  962. A regular expression, regex or regexp is a sequence of characters that
  963. defines a search pattern. Since the 1980s, different syntaxes for
  964. writing regular expressions exist, the two most widely used ones being
  965. the POSIX syntax and the similar but more advanced Perl standard.
  966. TinTin++ supports the Perl standard known as PCRE (Perl Compatible
  967. Regular Expressions).
  968. Regular expressions are an integral part of TinTin++, but keep in mind
  969. that tintin doesn't allow you to use regular expressions directly,
  970. instead it uses a simpler intermediate syntax that still allows more
  971. complex expressions when needed.
  972. Commands that utilize regular expressions are: action, alias, elseif,
  973. gag, grep, highlight, if, kill, local, math, prompt, regexp, replace,
  974. substitute, switch, variable and while. Several other commands use
  975. regular expressions in minor ways. Fortunately the basics are very
  976. easy to learn.
  977. </span><span style='color:#FFF'> TinTin++ Regular Expression</span><span style='color:#AAA'>
  978. The following support is available for regular expressions.
  979. ^ match start of line.
  980. &dollar; match of end of line.
  981. &bsol; escape one character.
  982. %1-%99 match of any text, stored in the corresponding index.
  983. %0 should be avoided in the regex, contains all matched text.
  984. { } embed a perl compatible regular expression, matches are stored.
  985. %!{ } embed a perl compatible regular expression, matches are not stored.
  986. [ ] . + | ( ) ? * are treated as normal text unless used within braces. Keep in
  987. mind that { } is replaced with ( ) automatically unless %!{ } is used.
  988. </span><span style='color:#FFF'>
  989. TinTin++ Description POSIX</span><span style='color:#AAA'>
  990. %d Match zero to any number of digits ([0-9]*?)
  991. %D Match zero to any number of non-digits ([^0-9]*?)
  992. %i Matches become case insensitive (?i)
  993. %I Matches become case sensitive (default) (?-i)
  994. %s Match zero to any number of spaces ([&bsol;r&bsol;n&bsol;t ]*?)
  995. %w Match zero to any number of word characters ([A-Za-z0-9_]*?)
  996. %W Match zero to any number of non-word characters ([^A-Za-z0-9_]*?)
  997. %? Match zero or one character (.??)
  998. %. Match one character (.)
  999. %+ Match one to any number of characters (.+?)
  1000. %* Match zero to any number of characters (.*?)
  1001. </span><span style='color:#FFF'>
  1002. Variables</span><span style='color:#AAA'>
  1003. If you use %1 in an action to perform a match the matched string is
  1004. stored in the %1 variable which can be used in the action body.
  1005. Example: #act {%1 says 'Tickle me'} {tickle %1}
  1006. If you use %2 the match is stored in %2, etc. If you use an unnumbered
  1007. match like %* or %S the match is stored at the last used index
  1008. incremented by one.
  1009. Example: #act {%3 says '%*'} {#if {&quot;%4&quot; == &quot;Tickle me&quot;} {tickle %3}}
  1010. The maximum variable index is 99. If you begin an action with %* the
  1011. match is stored in %1. You should never use %0 in the trigger part of
  1012. an action, when used in the body of an action %0 contains all the parts
  1013. of the string that were matched.
  1014. To prevent a match from being stored use %!*, %!w, etc.
  1015. </span><span style='color:#FFF'>
  1016. Perl Compatible Regular Expressions</span><span style='color:#AAA'>
  1017. You can embed a PCRE (Perl Compatible Regular Expression) using curley
  1018. braces { }, these braces are replaced with parentheses ( ) unless you
  1019. use %!{ }.
  1020. </span><span style='color:#FFF'>
  1021. Or</span><span style='color:#AAA'>
  1022. You can separate alternatives within a PCRE using the | character.
  1023. Example: #act {%* raises {his|her|its} eyebrows.} {say 42..}
  1024. </span><span style='color:#FFF'>
  1025. Brackets</span><span style='color:#AAA'>
  1026. You can group alternatives and ranges within a PCRE using brackets.
  1027. Example: #act {%* says 'Who is number {[1-9]}?} {say &dollar;number[%2] is number %2}
  1028. The example only triggers if someone provides a number between 1 and
  1029. 9. Any other character will cause the action to not trigger.
  1030. Example: #act {%* says 'Set password to {[^0-9]*}&dollar;} {say The password must
  1031. contain at least one number, not for security reasons, but just to
  1032. annoy you.} {4}
  1033. When the ^ character is used within brackets it creates an inverse
  1034. search, [^0-9] matches every character except for a number between 0
  1035. and 9.
  1036. </span><span style='color:#FFF'>
  1037. Quantification</span><span style='color:#AAA'>
  1038. A quantifier placed after a match specifies how often the match is
  1039. allowed to occur.
  1040. ? repeat zero or one time.
  1041. * repeat zero or multiple times.
  1042. + repeat once or multiple times.
  1043. {n} repeat exactly n times, n must be a number.
  1044. {n,} repeat at least n times, n must be a number.
  1045. {n,o} repeat between n and o times, n and o must be a number.
  1046. Example: #act {%* says 'Who is number {[1-9][0-9]{0,2}}?} {Say &dollar;number[%2] is
  1047. number %2}
  1048. The example only triggers if someone provides a number between 1 and
  1049. 999.
  1050. </span><span style='color:#FFF'>Parantheses</span><span style='color:#AAA'>
  1051. TinTin Regular Expressions automatically add parenthesis, for example
  1052. %* translates to (.*?) in PCRE unless the %* is found at the start or
  1053. end of the line, in which cases it translates to (.*). Paranthesis in
  1054. PCRE causes a change in execution priority similar to mathematical
  1055. expressions, but parentheses also causes the match to be stored to a
  1056. variable.
  1057. When nesting multiple sets of parentheses each nest is assigned its
  1058. numerical variable in order of appearance.
  1059. Example: #act {%* chats '{Mu(ha)+}'} {chat %2ha!}
  1060. If someone chats Muha you will chat Muhaha! If someone chats Muhaha
  1061. you will chat Muhahaha!
  1062. </span><span style='color:#FFF'>Lazy vs Greedy</span><span style='color:#AAA'>
  1063. By default regex matches are greedy, meaning {.*} will capture as much
  1064. text as possible.
  1065. Example: #regex {bli bla blo} {^{.*} {.*}&dollar;} {#show Arg1=(&amp;1) Arg2=(&amp;2)}
  1066. This will display: Arg1=(bli bla) Arg2=(blo)
  1067. By appending a ? behind a regex it becomes lazy, meaning {.*?} will
  1068. capture as little text as possible.
  1069. Example: #regex {bli bla blo} {^{.*?} {.*?}&dollar;} {#show Arg1=(&amp;1) Arg2=(&amp;2)}
  1070. This will display: Arg1=(bli) Arg2=(bla blo).
  1071. </span><span style='color:#FFF'>Escape Codes</span><span style='color:#AAA'>
  1072. PCRE support the following escape codes.
  1073. </span><span style='color:#FFF'>
  1074. PCRE Description POSIX</span><span style='color:#AAA'>
  1075. &bsol;A Match start of string ^
  1076. &bsol;b Match word boundaries (^|&bsol;r|&bsol;n|&bsol;t| |&dollar;)
  1077. &bsol;B Match non-word boundaries [^&bsol;r&bsol;n&bsol;t ]
  1078. &bsol;c Insert control character &bsol;c
  1079. &bsol;d Match digits [0-9]
  1080. &bsol;D Match non-digits [^0-9]
  1081. &bsol;e Insert escape character &bsol;e
  1082. &bsol;f Insert form feed character &bsol;f
  1083. &bsol;n Insert line feed character &bsol;n
  1084. &bsol;r Insert carriage return character &bsol;r
  1085. &bsol;s Match spaces [&bsol;r&bsol;n&bsol;t ]
  1086. &bsol;S Match non-spaces [^&bsol;r&bsol;n&bsol;t ]
  1087. &bsol;t Insert tab character &bsol;t
  1088. &bsol;w Match letters, numbers, and underscores [A-Za-z0-9_]
  1089. &bsol;W Match non-letters, numbers, and underscores [^A-Za-z0-9_]
  1090. &bsol;x Insert hex character &bsol;x
  1091. &bsol;Z Match end of string &dollar;
  1092. &bsol;s matches one space, &bsol;s+ matches one or multiple spaces.
  1093. </span><span style='color:#FFF'>Color triggers</span><span style='color:#AAA'>
  1094. To make matching easier text triggers (Actions, Gags, Highlights,
  1095. Prompts, and Substitutes) have their color codes stripped. If you
  1096. want to create a color trigger you must start the triggers with a ~
  1097. (tilde). To make escape codes visible use #config {convert meta} on.
  1098. Example: #action {~&bsol;e[1;37m%1} {#var roomname %1}
  1099. If the room name is the only line on the server in bright white
  1100. white color trigger will save the roomname.
  1101. This covers the basics. PCRE has more options, most of which are
  1102. somewhat obscure, so you'll have to read a PCRE manual for additional
  1103. information.
  1104. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#MAP'>map</a> and <a href='#PATH'>path</a>.
  1105. <a name='REPEAT'></a>
  1106. </span><span style='color:#5F5'> REPEAT
  1107. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #</span><span style='color:#FFF'>[</span><span style='color:#AAA'>number</span><span style='color:#FFF'>] {</span><span style='color:#AAA'>commands</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1108. Sometimes you want to repeat the same command multiple times. This is the
  1109. easiest way to accomplish that.
  1110. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #10 {buy bread}
  1111. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#BREAK'>break</a>, <a href='#CONTINUE'>continue</a>, <a href='#FOREACH'>foreach</a>, <a href='#LIST'>list</a>, <a href='#LOOP'>loop</a>, <a href='#PARSE'>parse</a>, <a href='#RETURN'>return</a> and <a href='#WHILE'>while</a>.
  1112. <a name='SCREEN READER'></a>
  1113. </span><span style='color:#5F5'> SCREEN READER
  1114. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #config </span><span style='color:#FFF'>{</span><span style='color:#AAA'>SCREEN READER</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>ON|OFF</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1115. Screen reader mode is enabled by using #config screen on. The main
  1116. purpose of the screen reader mode is to report to servers that a
  1117. screen reader is being used by utilizing the MTTS standard. The MTTS
  1118. specification is available at:
  1119. http://tintin.sourceforge.net/protocols/mtts
  1120. With the screen reader mode enabled TinTin++ will try to remove visual
  1121. elements where possible.
  1122. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CONFIG'>config</a>
  1123. <a name='SESSIONNAME'></a>
  1124. </span><span style='color:#5F5'> SESSIONNAME
  1125. </span><span style='color:#FFF'>Syntax</span><span style='color:#AAA'>: #[sessionname] </span><span style='color:#FFF'>{</span><span style='color:#AAA'>commands</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1126. You can create multiple sessions with the #session command. By default
  1127. only one session is active, meaning commands you input are executed in
  1128. the active session. While all sessions receive output, only output sent
  1129. to the active session is displayed.
  1130. When you create a session with the #session command you must specify a
  1131. session name, the session name, prepended with a hashtag, can be used
  1132. to activate the session when used without an argument. If an argument
  1133. is given it will be executed by that session as a command, the session
  1134. will not be activated.
  1135. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #ses one tintin.net 23;#ses two tintin.net 23;#one;#two grin
  1136. This will create two sessions, the session that was created last (two
  1137. in this case) will be automatically activated upon creation. Using
  1138. #one, session one is activated. Using #two grin, the grin social will
  1139. be executed by session two, session one will remain the active session.
  1140. If you send a variable to another session it will be substituted before
  1141. being passed. If you want the variable value of the receiving session
  1142. to be used you need to use '&dollar;&dollar;{variable}' to properly escape it.
  1143. </span><span style='color:#FFF'>Syntax</span><span style='color:#AAA'>: @[sessionname]</span><span style='color:#FFF'>{</span><span style='color:#AAA'>substitution</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1144. If you want to pull the value of a variable from another session you
  1145. can do so in a similar way as you would use a #function call. Using
  1146. #showme {@two{&dollar;test}} in session one would print the value of &dollar;test,
  1147. as defined by session two.
  1148. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#SUSPEND'>suspend</a>
  1149. <a name='SPEEDWALK'></a>
  1150. </span><span style='color:#5F5'> SPEEDWALK
  1151. SPEEDWALK V1
  1152. </span><span style='color:#AAA'>
  1153. Speedwalking allows you to enter multiple directions without using
  1154. semicolons. Directions should be prefixed with a number and will be
  1155. executed the given number of times.
  1156. You can enable speedwalking with #CONFIG {SPEEDWALK} {ON}.
  1157. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: Without speedwalk, you have to type:
  1158. </span><span style='color:#FFF'>s;s;w;w;w;w;w;s;s;s;w;w;w;n;n;w
  1159. </span><span style='color:#AAA'>With speedwalk, you only have to type:
  1160. </span><span style='color:#FFF'>2s5w3s3w2nw
  1161. </span><span style='color:#5F5'>SPEEDWALK V2
  1162. </span><span style='color:#AAA'>
  1163. Modern MUDs have increasingly adopted the use of diagonal exits, like
  1164. ne, nw, sw, and se. To make accomodations for this the #map and #path
  1165. command no longer interpret nesw as a speedwalk and require this to
  1166. be written as 1n1e1s1w, which then allows 2ne2e to execute ne;ne;e;e.
  1167. Speedwalks entered on the input line continue to use the v1 system.
  1168. The #path load command is backward compatible with v1 speedwalks and
  1169. to load v2 speedwalks the #path unzip command needs to be used, unless
  1170. the speedwalk was saved using #path save in which case a v2 compatible
  1171. format is used that can also contain timing data.
  1172. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #path unzip 3n1e2nw
  1173. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #map move 3ne1d
  1174. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#ALIAS'>alias</a>, <a href='#CURSOR'>cursor</a>, <a href='#HISTORY'>history</a>, <a href='#KEYPAD'>keypad</a>, <a href='#MACRO'>macro</a> and <a href='#TAB'>tab</a>.
  1175. <a name='STATEMENTS'></a>
  1176. </span><span style='color:#5F5'> STATEMENTS
  1177. </span><span style='color:#AAA'>
  1178. TinTin++ knows the following statements.
  1179. #break
  1180. #case {value} {true}
  1181. #continue
  1182. #default {commands}
  1183. #else {commands}
  1184. #elseif {expression} {true}
  1185. #foreach {list} {variable} {commands}
  1186. #if {expression} {true}
  1187. #loop {min} {max} {variable} {commands}
  1188. #parse {string} {variable} {commands}
  1189. #return {value}
  1190. #switch {expression} {commands}
  1191. #while {expression} {commands}
  1192. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#COMMANDS'>commands</a>, <a href='#HELP'>help</a> and <a href='#INFO'>info</a>.
  1193. <a name='SUBSTITUTIONS'></a>
  1194. </span><span style='color:#5F5'> SUBSTITUTIONS
  1195. </span><span style='color:#AAA'> TinTin++ will perform various types of substitions as detailed below.
  1196. </span><span style='color:#5F5'> Variables
  1197. </span><span style='color:#FFF'>&dollar; &amp; * @</span><span style='color:#AAA'> All variable and function names must begin with an alphabetic
  1198. character, followed by any combination of alphanumeric characters and
  1199. underscores.
  1200. </span><span style='color:#FFF'>&dollar;</span><span style='color:#AAA'> The dollar sign is used to retrieve the value of a variable.
  1201. </span><span style='color:#FFF'>&amp;</span><span style='color:#AAA'> The ampersand sign is used to retrieve the index of a variable.
  1202. </span><span style='color:#FFF'>*</span><span style='color:#AAA'> The astrix sign is used to retrieve the name of a variable.
  1203. </span><span style='color:#FFF'>@</span><span style='color:#AAA'> The at sign is used for functions.
  1204. </span><span style='color:#FFF'>[ ]</span><span style='color:#AAA'> Brackets are used for nested variables which function as an
  1205. associative array. Associative arrays are also known as tables and
  1206. maps. Regex can be used within brackets to match multiple variables.
  1207. </span><span style='color:#FFF'>+ -</span><span style='color:#AAA'> The plus and minus signs are used to access variables by their index,
  1208. with the first variable having index +1, and the last variable
  1209. having index -1. Variables are ordered alphanumerically.
  1210. All variables and functions can be escaped by doubling the sign,
  1211. like &dollar;&dollar;variable_name or @@function_name. To escape a variable
  1212. twice use &dollar;&dollar;&dollar;var_name. One escape is removed each time tintin
  1213. needs to substitute a variable or function.
  1214. </span><span style='color:#5F5'> Arguments
  1215. </span><span style='color:#FFF'>%0 - %99</span><span style='color:#AAA'> The percent sign followed by a number is used for arguments by the
  1216. following triggers:
  1217. alias, action, button, event, function, prompt, and substitute.
  1218. </span><span style='color:#FFF'>&amp;0 - &amp;99</span><span style='color:#AAA'> The ampersand sign followed by a number is used for arguments in the
  1219. regex and replace commands.
  1220. All trigger and command arguments can be escaped by doubling the
  1221. sign like %%1 or &amp;&amp;1. One escape is removed each time tintin
  1222. substitutes trigger or command arguments. To escape three times
  1223. triple the sign like %%%1, etc.
  1224. </span><span style='color:#5F5'> Colors
  1225. </span><span style='color:#FFF'>&lt;000&gt;</span><span style='color:#AAA'> Three alphanumeric characters encapsulated by the less- and greater-
  1226. than signs are used for 4 and 8 bit color codes.
  1227. </span><span style='color:#FFF'>&lt;0000&gt;</span><span style='color:#AAA'> Either a B (background) or F (foreground) followed by three
  1228. hexadecimal characters encapsulated by &lt; &gt; signs are used for 12
  1229. bit color codes. Requires truecolor capable terminal.
  1230. </span><span style='color:#FFF'>&lt;0000000&gt;</span><span style='color:#AAA'> Either a B (background) or F (foreground) followed by six
  1231. hexadecimal characters encapsulated by &lt; &gt; signs are used for 24
  1232. bit color codes. Requires truecolor capable terminal.
  1233. More information is available at #help color.
  1234. </span><span style='color:#5F5'> Escapes
  1235. </span><span style='color:#FFF'>&bsol; </span><span style='color:#AAA'> The back slash is used to escape a character. All available options
  1236. are listed at #help escape. Escapes are typically escaped when text
  1237. leaves the client, by being send to a server, the shell, being
  1238. displayed on the screen, or being processed as part of a regex.
  1239. Escapes try to mimic escapes in PCRE when possible.
  1240. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CHARACTERS'>characters</a>, <a href='#COLORS'>colors</a>, <a href='#ESCAPES'>escapes</a>, <a href='#INFO'>info</a> and <a href='#PCRE'>pcre</a>.
  1241. <a name='SUSPEND'></a>
  1242. </span><span style='color:#5F5'> SUSPEND
  1243. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #cursor suspend
  1244. Temporarily suspends tintin and returns you to your shell. To
  1245. return to tintin, type 'fg' at the shell prompt.
  1246. While suspended your tintin sessions will freeze. To keep a
  1247. suspended session running use the #daemon command.
  1248. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#SESSIONNAME'>sessionname</a>
  1249. <a name='TIME'></a>
  1250. </span><span style='color:#5F5'> TIME
  1251. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #format </span><span style='color:#FFF'>{</span><span style='color:#AAA'>variable</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>%t</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>argument</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1252. The %t format specifier of the #format command allows printing dates
  1253. using the strftime() format specifiers. By default the time stamp used
  1254. is the current time, if you want to print a past or future date use:
  1255. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #format </span><span style='color:#FFF'>{</span><span style='color:#AAA'>variable</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>%t</span><span style='color:#FFF'>} {{</span><span style='color:#AAA'>argument</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>epoch time</span><span style='color:#FFF'>}}</span><span style='color:#AAA'>
  1256. The current epoch time value is obtained using #format {time} {%T}.
  1257. When using %t the argument should contain strftime format specifiers.
  1258. The output may differ depending on your locale. See man strftime.
  1259. %a Abbreviated name of the day of the week (mon ... sun).
  1260. %A Full name of the day of the week. (Monday ... Sunday)
  1261. %b Abbreviated name of the month (Jan ... Dec)
  1262. %B Full name of the month. (January ... December)
  1263. %C 2 digit numeric century. (19 ... 20)
  1264. %d 2 digit numeric day of the month (01 ... 31)
  1265. %H 2 digit numeric 24-hour clock hour. (00 ... 23)
  1266. %I 2 digit numeric 12-hour clock hour. (01 ... 12)
  1267. %j 3 digit numeric day of the year (001 ... 366)
  1268. %m 2 digit numeric month of the year (01 ... 12)
  1269. %M 2 digit numeric minute of the hour (00 ... 59)
  1270. %p Abbreviated 12 hour clock period (AM ... PM)
  1271. %P Abbreviated 12 hour clock period (am ... pm)
  1272. %S 2 digit numeric second of the minute (00 ...59
  1273. %u 1 digit numeric day of the week (1 ... 7)
  1274. %U 2 digit numeric Sunday week of the year (00 ... 53
  1275. %w 1 digit numeric day of the week (0 ... 6)
  1276. %W 2 digit numeric Monday week of the year (00 ... 53
  1277. %y 2 digit numeric year. (70 ... 38)
  1278. %Y 4 digit numeric year. (1970 ... 2038)
  1279. %z 5 digit timezone offset. (-1200 ... +1400)
  1280. %Z Abbreviated name of the time zone.
  1281. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#ECHO'>echo</a>, <a href='#EVENT'>event</a> and <a href='#FORMAT'>format</a>.