TinTin++ Mud Client Scripts  
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
space
space
The following script allows you to run a chat server with a simple command set. Though it's rather basic it has quite the attitude.

space
#nop This script is written for v1.99.7 and higher

#config verbose on

#chat init 4051

#var banlist  {}
#var password {none}

#var wholist {}
#var newlist {}

#act {^<CHAT> Connected to %1@%2:%3}
{
	#chat emote %1 bleeps: <178>Welcome to (<168>T<178>)he k(<168>I<178>)cki(<168>N<178>) (<168>T<178>)ickin Ch(<168>I<178>)t Chat Thi(<168>N<178>)gie;

	#if {$banlist[%2]}
	{
		#chat emote %2 bleeps: <178>*LOLOL* You've been banned sucker! CIAO!!;
		#chat zap %2
	};
	#else
	{
		#chat private %1;

		#if {"$password" == "none"}
		{
			broadcast %1 has connected;
			#var wholist[%1] {1};
			#chat emote %1 bleeps: <178>Message me 'help' for a list of commands.
		};
		#else
		{
			#chat emote %1 bleeps: <178>You must tell me the magic word. Or I'll boot your ass!;
			#var newlist[%1] {1};
			#delay 20 autoboot %1
		}
	}
}

#act {^<CHAT> Closing connection to %1@%2}
{
	#if {$wholist[%1]}
	{
		broadcast %1 has disconnected;
		#unvar wholist[%1]
	};
	#if {$newlist[%1]}
	{
		#unvar newlist[%1]
	}
}

#act {^<CHAT> Your connection with %1 is now private.} {#nop} {1}

#act {^<CHAT> %1 is now %2.$}
{
	#if {$wholist[%1]}
	{
		broadcast %1 steps into a telephone booth and steps out as %2!;
		#unvar wholist[%1];
		#var wholist[%2] 1
	};
	#if {$newlist[%1]}
	{
		#var newlist[%2] 1;
		#unvar newlist[%1]
	}

}

#act {^<CHAT> %1 chats to you, 'about'}
{
	#chat emote %1 bleeps:<178> I'm the retarded little brother you never wanted.
}
{4}

#act {^<CHAT> %1 chats to you, 'help'}
{
	#chat emote %1 bleeps:<128>   about <178>- <138>everything about thingie.;
	#chat emote %1 bleeps:<128>    help <178>- <138>gives this totally sweet message.;
	#chat emote %1 bleeps:<128>  public <178>- <138>makes your connection public.;
	#chat emote %1 bleeps:<128> private <178>- <138>makes your connection private.;
	#chat emote %1 bleeps:<128>    tell <178>- <138>send a private message to someone;
	#chat emote %1 bleeps:<128>     who <178>- <138>gives a list of who is online.;
	#chat emote %1 bleeps:<128>         <178>- <138>everything else is broadcasted.	
}
{4}

#act {^<CHAT> %1 chats to you, 'private'}
{
	#chat emote %1 waves it's yellow wand and chants 'You fade fom faxfistance!!';
	#chat private %1
}
{4}

#act {^<CHAT> %1 chats to you, 'public'}
{
	#chat emote %1 puts on his purple hat and chants 'You feel felly fisable!!';
	#chat public %1
}
{4}

#act {^<CHAT> %1 chats to you, 'tell %2 %3'$}
{
	#if {$wholist[%1]}
	{
		#chat emote %2 <178>:<128>%1 bleeps to you<178>: <138>%3
	}
}
{4}

#act {^<CHAT> %1 chats to you, 'who'}
{
	#if {$wholist[%1]}
	{
		#var tmp {};

		#foreach {$wholist[]} {name}
		{
			#if {"$tmp" == ""}
			{
				#var tmp bleeps: <118>I'm connected to: <178>$name
			}
			{
				#var tmp $tmp<118>, <178>$name
			}
		};
		#chat emote %1 $tmp
	}
}
{4}

#act {^<CHAT> %1 chats to you, '$password'}
{
	#if {$newlist[%1]}
	{
		#chat emote %1 bleeps: <178>wowie you remembered the secret word!;

		broadcast %1 has connected;

		#unvar newlist[%1];
		#var wholist[%1] {1}
	};
	#else
	{
		#chat emote %1 bleeps: <178>lolol you already gave the password silly loller
	}
}
{4}

#act {^<CHAT> %1 chats to you, '%2'}
{
	#if {$wholist[%1]}
	{
		#foreach {$wholist[]} {name}
		{
			#chat emote $name <178>:<128>%1 bleeps<178>: <138>%2<128>
		}
	}
}

#alias broadcast
{
	#foreach {$wholist[]} {name}
	{
		#chat emote $name bleeps: <138>%0<178>
	}
}

#alias {autoboot}
{
	#if {$newlist[%0]}
	{
		#chat emote %0 bleeps: <178>omglol you didn't know the magic word! okthxbye;
		#chat zap %0;
		#unvar newlist[%0]
	}
}