TinTin++ Mud Client Scripts  
space
space
This script includes parts of the Window Bar script but it will also display the automapper map to the right of the information window. If a mud is wrapped at 80 characters you can set MAP[OVERLAP] to 1 to draw on the right side of the screen if there is enough available space.

This script is written for v2.01.90 and higher

space
#EVENT {PROGRAM START}
{
	#config {MOUSE TRACKING} {ON};
	#variable MAP[READY] 0;
	#nop change this to 1 for overlap mode;
	#variable MAP[OVERLAP] 0;
	#variable SPLIT_TOP 9;
	#screen raise SCREEN RESIZE
}


#EVENT {SCREEN RESIZE}
{
	#variable SCREEN[ROWS] %0;
	#variable SCREEN[COLS] %1;
	#if {$SCREEN[COLS] >= 160}
	{
		#math MAP[COLS] 80;
		#math MAP[TOPC] 81;
		#math MAP[BOTC] 161
	};
	#elseif {$SCREEN[COLS] < 120}
	{
		#math MAP[COLS] $SCREEN[COLS] - 40;
		#math MAP[TOPC] 41;
		#math MAP[BOTC] $SCREEN[COLS] + 1
	};
	#else
	{
		#math MAP[COLS] #SCREEN[COLS] - 80;
		#math MAP[TOPC] 81;
		#math MAP[BOTC] $SCREEN[COLS] + 1
	};
	#math MAP[ROWS] $SPLIT_TOP - 1;
	#if {$SCREEN[ROWS] > 20 && $SCREEN[COLS] >= 120 && $MAP[OVERLAP] == 1}
	{
		#math MAP[ROWS] $SCREEN[ROWS] - 6
	};
	#map offset 1 $MAP[TOPC] $MAP[ROWS] $MAP[BOTC]
}


#EVENT {VT100 SCROLL REGION}
{
	#variable SPLIT_TOP {%0}
}


#EVENT {RECEIVED LINE}
{
	#if {$MAP[READY] && $MAP[OVERLAP]}
	{
		#map update
	}
}


#EVENT {RECEIVED INPUT}
{
	#if {$MAP[READY] && $MAP[OVERLAP]}
	{
		#map update
	}
}


#EVENT {MAP ENTER MAP}
{
	#variable MAP[READY] 1;
	#screen raise SCREEN RESIZE
}


#EVENT {MAP EXIT MAP}
{
	#variable MAP[READY] 0
}


#EVENT {SESSION CONNECTED}
{
	#map read mymap.map;
	#split $SPLIT_TOP 1
}


#EVENT {SESSION DISCONNECTED}
{
	#map write mymap.map
}


#EVENT {MAP SHORT-CLICKED MOUSE BUTTON ONE}
{
	#map run %0
}


#VARIABLE {window}
{
	{1} { }
	{2} { }
	{3} { }
	{4} { }
	{5} { }
	{6} { }
}

#ACTION {~%1 tells you '%2}
{
	showtowin %1 tells you '%2
}
{5}


#ACTION {~%1 chats '%2}
{
	showtowin %1 chats '%2
}
{5}


#ALIAS {showtowin}
{
	#format temp {%w} {{%0}{$MAP[TOPC] - 1}};
	#while {&window[] < $SPLIT_TOP - 2}
	{
		#list window ins -1 { }
	};
	#loop {1} {&temp[]} {cnt}
	{
		#list window ins -1 {$temp[$cnt]}
	};
	#loop {&window[] - ($SPLIT_TOP - 3)} {&window[]} {cnt}
	{
		#format {temp} {%-80s} {$window[$cnt]};
		#line ignore #showme {$temp} {$cnt - (&window[] - $SPLIT_TOP + 2)} {1}
	}
}
{5}


#ALIAS {test}
{
	#showme <138>Bubba tells you 'hello';
	#showme <158>Pamela chats 'bye'
}
{5}