help.html 305 KB

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