Tintin++: Difference between revisions
Jump to navigation
Jump to search
(Created page with " == Tintin++ Basics == Tintin++ works best on Linux, but can be used via a terminal emulator or Wintin++ in Windows, or Mac. See https://tintin.mudhalla.net/install.php Tintin++ can be launched with "tt++" from the terminal. But typically it is used with a script file. You create a basic text file containing potentially no more than: #SESSION UntoldDawn www.untold-dawn.com 4000 From there, a great deal can be customised by editing the script file. I typically use...") |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 16: | Line 16: | ||
== Connection script for Untold Dawn == | == Connection script for Untold Dawn == | ||
<nowiki>#EVENT {SESSION CONNECTED} | |||
#EVENT {SESSION CONNECTED} | { | ||
{ | |||
#NOP Telnet commands for turning on GMCP; | #NOP Telnet commands for turning on GMCP; | ||
#variable TELNET[IAC] \xFF; | #variable TELNET[IAC] \xFF; | ||
Line 35: | Line 34: | ||
#read ud_gmcp.tin; | #read ud_gmcp.tin; | ||
#map offset 4 87 -5 -3; | #map offset 4 87 -5 -3; | ||
#delay 0.5 {login USERNAME PASSWORD}; | #delay 0.5 {login USERNAME PASSWORD}; | ||
#delay 3.5 {stand} | #delay 3.5 {stand} | ||
Line 42: | Line 41: | ||
#format {logfile} {/path/to/helpfile/%t.html} {%Y-%m-%d}; | #format {logfile} {/path/to/helpfile/%t.html} {%Y-%m-%d}; | ||
#log append $logfile; | #log append $logfile; | ||
} | } | ||
#NOP Tell UD you want GMCP data | #NOP Tell UD you want GMCP data | ||
#EVENT {IAC WILL GMCP} {#send {$TELNET[IAC]$TELNET[DO]$TELNET[GMCP]\}} | #EVENT {IAC WILL GMCP} {#send {$TELNET[IAC]$TELNET[DO]$TELNET[GMCP]\}}</nowiki> | ||
#SESSION UntoldDawn www.untold-dawn.com 4000</nowiki> | |||
==File for GMCP Automapping== | |||
<nowiki>#NOP Create a map or load it if it exists. | |||
#map create 500000 | |||
#map goto 1 | |||
#map flag vtmap | |||
#map flag static | |||
#map flag nofollow | |||
#map read ud_gmcp.map | |||
#NOP | #NOP This variable is for renaming different ways of typing directions, used elsewhere. | ||
#VARIABLE {dir_list} | |||
#VARIABLE {dir_list} | { | ||
{ | |||
{D} {d} | {D} {d} | ||
{down} {d} | {down} {d} | ||
Line 89: | Line 88: | ||
{northwest} {nw} | {northwest} {nw} | ||
{NW} {nw} | {NW} {nw} | ||
} | } | ||
#NOP This function replaces a name like 'west' with 'w' | #NOP This function replaces a name like 'west' with 'w' | ||
#FUNCTION {DIR_NAME} | #FUNCTION {DIR_NAME} | ||
{ | { | ||
#local temp $dir_list[%1]; | #local temp $dir_list[%1]; | ||
#if {"$temp" == ""} {#return %1};#else {#return $dir_list[%1]} | #if {"$temp" == ""} {#return %1};#else {#return $dir_list[%1]} | ||
} | } | ||
#EVENT {SESSION DISCONNECTED} | |||
#EVENT {SESSION DISCONNECTED} | { | ||
{ | |||
#map write ud_gmcp.map; | #map write ud_gmcp.map; | ||
} | } | ||
#NOP This is the main part of the automapper which saves GMCP data. | #NOP This is the main part of the automapper which saves GMCP data. | ||
#EVENT {IAC SB GMCP UD.Map IAC SE} | #EVENT {IAC SB GMCP UD.Map IAC SE} | ||
{ | { | ||
#NOP Save GMCP map data; | #NOP Save GMCP map data; | ||
#variable gmcp[map] {%0}; | #variable gmcp[map] {%0}; | ||
Line 114: | Line 112: | ||
{ | { | ||
#return | #return | ||
}; | }; | ||
#NOP First dig the room vnum of the current room if it doesn't exist; | #NOP First dig the room vnum of the current room if it doesn't exist; | ||
#map goto {$gmcp[map][roomId]} {dig}; | #map goto {$gmcp[map][roomId]} {dig}; | ||
Line 127: | Line 124: | ||
#map set roomcolor <178> | #map set roomcolor <178> | ||
}; | }; | ||
#NOP For each exit, check if room and exit exists and create if not. | #NOP For each exit, check if room and exit exists and create if not. | ||
#foreach {*gmcp[map][roomExits][]} {exit} { | #foreach {*gmcp[map][roomExits][]} {exit} { | ||
Line 134: | Line 130: | ||
#NOP If the direction doesn't exist, create the room; | #NOP If the direction doesn't exist, create the room; | ||
#if {&result[@DIR_NAME{$exit}] == 0} | #if {&result[@DIR_NAME{$exit}] == 0} | ||
{ | |||
#map dig {@DIR_NAME{$exit}} {$gmcp[map][roomExits][$exit]}; | |||
#map get {roomname} {result2} {$gmcp[map][roomExits][$exit]}; | |||
#NOP This colours newly created rooms red.; | |||
#if {"$result2" == ""} {#map set {roomcolor} {<118>} {$gmcp[map][roomExits][$exit]}} | |||
} | } | ||
} | } | ||
} | }</nowiki> | ||
[[Category:Guide]] | [[Category:Guide]] |
Latest revision as of 00:19, 17 December 2024
Tintin++ Basics[edit | edit source]
Tintin++ works best on Linux, but can be used via a terminal emulator or Wintin++ in Windows, or Mac. See https://tintin.mudhalla.net/install.php
Tintin++ can be launched with "tt++" from the terminal. But typically it is used with a script file. You create a basic text file containing potentially no more than:
#SESSION UntoldDawn www.untold-dawn.com 4000
From there, a great deal can be customised by editing the script file. I typically use multiple files:
- A main file for connecting to the game, which also loads other script files
- An aliases and triggers file
- A file with for mapping stuff
The reason for this is it allows you to "reload" the helper files while in game, so you can change things without having to log out and back in.
Connection script for Untold Dawn[edit | edit source]
#EVENT {SESSION CONNECTED} { #NOP Telnet commands for turning on GMCP; #variable TELNET[IAC] \xFF; #variable TELNET[DONT] \xFE; #variable TELNET[DO] \xFD; #variable TELNET[WONT] \xFC; #variable TELNET[WILL] \xFB; #variable TELNET[SB] \xFA; #variable TELNET[SE] \xF0; #variable TELNET[GMCP] \xC9; #NOP Set a split screen with an area for a map; #split 2 1 0 -85 3; # Load separate file for mapping commands #read ud_gmcp.tin; #map offset 4 87 -5 -3; #delay 0.5 {login USERNAME PASSWORD}; #delay 3.5 {stand} #NOP Logging, if you want; #format {logfile} {/path/to/helpfile/%t.html} {%Y-%m-%d}; #log append $logfile; } #NOP Tell UD you want GMCP data #EVENT {IAC WILL GMCP} {#send {$TELNET[IAC]$TELNET[DO]$TELNET[GMCP]\}} #SESSION UntoldDawn www.untold-dawn.com 4000</nowiki>
File for GMCP Automapping[edit | edit source]
#NOP Create a map or load it if it exists. #map create 500000 #map goto 1 #map flag vtmap #map flag static #map flag nofollow #map read ud_gmcp.map #NOP This variable is for renaming different ways of typing directions, used elsewhere. #VARIABLE {dir_list} { {D} {d} {down} {d} {d} {d} {E} {e} {east} {e} {e} {e} {N} {n} {north} {n} {n} {n} {S} {s} {s} {s} {south} {s} {U} {u} {u} {u} {up} {u} {W} {w} {w} {w} {west} {w} {southwest} {sw} {SW} {sw} {sw} {sw} {northeast} {ne} {NE} {ne} {southeast} {se} {SE} {se} {northwest} {nw} {NW} {nw} } #NOP This function replaces a name like 'west' with 'w' #FUNCTION {DIR_NAME} { #local temp $dir_list[%1]; #if {"$temp" == ""} {#return %1};#else {#return $dir_list[%1]} } #EVENT {SESSION DISCONNECTED} { #map write ud_gmcp.map; } #NOP This is the main part of the automapper which saves GMCP data. #EVENT {IAC SB GMCP UD.Map IAC SE} { #NOP Save GMCP map data; #variable gmcp[map] {%0}; #nop if there is no room ID do nothing; #if {$gmcp[map][roomId] == -1} { #return }; #NOP First dig the room vnum of the current room if it doesn't exist; #map goto {$gmcp[map][roomId]} {dig}; #map get roomarea {result}; #if {"$result" == ""} { #map set roomdesc $gmcp[map][roomDesc]; #map set roomname $gmcp[map][roomName]; #map set roomid $gmcp[map][roomId]; #NOP Once you've been to a room, colour it something by default (new rooms will be red); #map set roomcolor <178> }; #NOP For each exit, check if room and exit exists and create if not. #foreach {*gmcp[map][roomExits][]} {exit} { #NOP get all exits of the current room in format {w}{2}; #map get {roomexits} {result}; #NOP If the direction doesn't exist, create the room; #if {&result[@DIR_NAME{$exit}] == 0} { #map dig {@DIR_NAME{$exit}} {$gmcp[map][roomExits][$exit]}; #map get {roomname} {result2} {$gmcp[map][roomExits][$exit]}; #NOP This colours newly created rooms red.; #if {"$result2" == ""} {#map set {roomcolor} {<118>} {$gmcp[map][roomExits][$exit]}} } } }