TinTin++ Mud Client Scripts  
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
space
space
A bit mud specific (mrmud). Keeps track of combat data.

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

#var stats {}

#format starttime %T

#act {^You%1 for %2hp}
{
	#math {stats[hit]} {$stats[hit] + 1};
	#math {stats[dam]} {$stats[dam] + %2}
}

#act {^You%1 miss}
{
	#math {stats[mis]} {$stats[mis] + 1}
}
#act {dodges your attack}
{
	#math {stats[mis]} {$stats[mis] + 1}
}
#act {parries your attack}
{
	#math {stats[mis]} {$stats[mis] + 1}
}

#act {misses you.}
{
	#math {stats[mis_me]} {$stats[mis_me] + 1}
}
#act {^You parry}
{
	#math {stats[mis_me]} {$stats[mis_me] + 1}
}
#act {^You dodge}
{
	#math {stats[mis_me]} {$stats[mis_me] + 1}
}

#act {^You receive %1 experience}
{
	#math {stats[exp]} {$stats[exp] + %1};
	#math {stats[kill]} {$stats[kill] + 1}
}
#act {%1 you for %2hp.}
{
	#math {stats[hit_me]} {$stats[hit_me] + 1};
	#math {stats[dam_me]} {$stats[dam_me] + %2}
}
#alias {stats}
{
	#format currenttime %T;

	#echo {%c%h} {light yellow} { STATISTICS };

	#if {$stats[hit] > 0}
	{
		#echo {<078>     Average plr hit chance: %m} {100 * $stats[hit] / ($stats[hit] + $stats[mis])}
	};
	#if {$stats[hit] > 0}
	{
		#echo {<078>     Average plr hit damage: %m} {$stats[dam] / $stats[hit]}
	};
	#if {$stats[hit_me] > 0}
	{
		#echo {<078>     Average mob hit chance: %m} {100 * $stats[hit_me] / ($stats[hit_me] + $stats[mis_me])}
	};
	#if {$stats[hit_me] > 0}
	{
		#echo {<078>     Average mob hit damage: %m} {$stats[dam_me] / $stats[hit_me]}
	};
	#if {$stats[exp] > 0}
	{
		#echo {<078>           Total exp gained: %m} {$stats[exp]}
	};
	#if {$stats[kill] > 0}
	{
		#echo {<078>         Average exp gained: %m} {$stats[exp] / $stats[kill]}
	};
	#if {($currenttime - $starttime) >= 60}
	{
		#echo {<078>             Exp per minute: %m} {$stats[exp] * 60 / ($currenttime - $starttime)}
	};

	#echo {%c%h} {light yellow} { STATISTICS }
}