TinTin++ Mud Client Scripts  
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
space
space
This script will log your commands and a time stamp to a variable with 'record <variable name>.
Using the playback <variable name> command the commands are played back in the same order and with
the same time intervals as the original recording. You can abort a playback with playstop.


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

#var record_time 0

#alias {record}
{
	#if {$record_time == 0}
	{
		#if {"%0" == ""}
		{
			#showme <118>Please provide a variable name to store the record.;
		}
		#format record_name %0;
		#format record_time %U;
		#format $record_name %s;
		#format record_cnt 0;
		#alias {%%0}
		{
			#send %%0;
			#format record_curr %U;
			#math record_diff ($record_curr - $record_time) / 1000000.00;
			#list $record_name ins -1 #delay $record_diff %%0;
			#math record_cnt $record_cnt + 1;
		}
		{9};
		#showme <118>You are now recording your MUD commands.
	};
	#else
	{
		#format record_curr %U;
		#math record_diff ($record_curr - $record_time) / 1000000.00;
		#list {$record_name} {ins} {1}
		{
			#showme <118>Playing back '$record_name' having $record_cnt commands and a duration of $record_diff seconds.;
		}
		#showme <118>You have recorded $record_cnt commands during $record_diff seconds to $record_name.;
		#format record_time 0;
		#unalias %%0;
	}
}

#alias playback
{
	#if {"%0" == ""}
	{
		#showme <118>Please provide a record variable to play back.
	};
	#elseif {&{%0} == 0}
	{
		#showme <118>There is no record for $%0.
	};
	#else
	{
		#foreach {$%0} {temp}
		{
			$temp
		}
	}
}

#alias playstop
{
	#showme <118>Stopping playback.
	#kill delays
}