TinTin++ Mud Client Scripts  
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
space
space
The following script creates a prompt bar from a prompt line, and does some color manipulations while at it. The ticker is added to update the prompt every 15 seconds, but can be replaced if your mud provides a more accurate way to determine when a mud tick has occured. The result is pretty nifty.

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

#split

#showme Set your prompt to: <$h/$Hhp $m/$Mm $v/$Vmv>

#function {colscale}
{
	#switch {10 * %1 / %2}
	{
		#case {0} {#return <faa>};
		#case {1} {#return <fba>};
		#case {2} {#return <fca>};
		#case {3} {#return <fda>};
		#case {4} {#return <fea>};
		#case {5} {#return <ffa>};
		#case {6} {#return <efa>};
		#case {7} {#return <dfa>};
		#case {8} {#return <cfa>};
		#case {9} {#return <bfa>};
		#default  {#return <afa>}
	}
}

#act {^<%1/%2hp %3/%4m %5/%6mv>}
{
	#var hpcol @colscale{%1;%2};
	#var mncol @colscale{%3;%4};
	#var mvcol @colscale{%5;%6};

	#format time %t {%H:%M};

	#format {prompt1} {<034> H: %s%+4s<238>/<138>%-4s} {$hpcol} {%1} {%2};

	#format {prompt2} {<238>Mn:%s%-4s} {$mncol} {%3};

	#format {prompt3} {<238>Mv:%s%-4s <138>%+53s} {$mvcol} {%5} {$time};
}
{1}

#prompt {^<%1/%2hp %3/%4m %5/%6mv>} {$prompt1  $prompt2  $prompt3}