Tintin++: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 16: | Line 16: | ||
== Connection script for Untold Dawn == | == Connection script for Untold Dawn == | ||
#EVENT {SESSION CONNECTED} | <nowiki>#EVENT {SESSION CONNECTED} | ||
{ | { | ||
#NOP Telnet commands for turning on GMCP; | #NOP Telnet commands for turning on GMCP; | ||
Line 43: | Line 43: | ||
} | } | ||
#NOP Tell UD you want GMCP data | |||
#EVENT {IAC WILL GMCP} {#send {$TELNET[IAC]$TELNET[DO]$TELNET[GMCP]\}}</nowiki> | |||
#SESSION UntoldDawn www.untold-dawn.com 4000</nowiki> | |||
==File for GMCP Automapping== | ==File for GMCP Automapping== | ||
#NOP Create a map or load it if it exists. | <nowiki>#NOP Create a map or load it if it exists. | ||
#map create 500000 | #map create 500000 | ||
#map goto 1 | #map goto 1 | ||
Line 58: | Line 58: | ||
#NOP This variable is for renaming different ways of typing directions, used elsewhere. | #NOP This variable is for renaming different ways of typing directions, used elsewhere. | ||
#VARIABLE {dir_list} | #VARIABLE {dir_list} | ||
{ | { | ||
Line 130: | Line 131: | ||
#if {&result[@DIR_NAME{$exit}] == 0} | #if {&result[@DIR_NAME{$exit}] == 0} | ||
{ | { | ||
#map dig {@DIR_NAME{$exit}} {$gmcp[map][roomExits][$exit]}; | #map dig {@DIR_NAME{$exit}} {$gmcp[map][roomExits][$exit]}; | ||
#map get {roomname} {result2} {$gmcp[map][roomExits][$exit]}; | #map get {roomname} {result2} {$gmcp[map][roomExits][$exit]}; | ||
#NOP This colours newly created rooms red.; | #NOP This colours newly created rooms red.; | ||
Line 136: | Line 137: | ||
} | } | ||
} | } | ||
} | }</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]}} } } }