help.html 222 KB

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