<?xml version="1.0" encoding="ISO-8859-1"?>

<plugins>
	<plugin active="1" product="vbulletin">
		<title>RPG Stats</title>
		<hookname>postbit_display_complete</hookname>
		<phpcode><![CDATA[// ## Start RPG Stats Function ## //

$ppd = '5';

$rpglvl = str_replace(array(' ', ',', '.'), '', $post[posts]);
$level = pow (log10 ($rpglvl), 3);
$ep = floor (100 * ($level - floor ($level)));
$showlevel = floor ($level + 1);
$hpmulti =round ($this->post['postsperday'] / 6, 1);
if ($hpmulti > 1.5) {
$hpmulti = 1.5;
}
if ($hpmulti < 1) {
$hpmulti = 1;
}

$maxhp = $level * 25 * $hpmulti;
$hp= $this->post['postsperday'] / $ppd;
if ($hp >= 1) {
$hp= $maxhp;
} else {
$hp= floor ($hp * $maxhp);
}
$hp= floor ($hp);
$maxhp= floor ($maxhp);
if ($maxhp <= 0) {
$zhp = 1;
} else {
$zhp = $maxhp;
}
$hpf= floor (100 * ($hp / $zhp)) - 1;

$maxmp= ($jointime * $level) / 5;
$mp= $rpglvl / 3;
if ($mp >= $maxmp) {
$mp = $maxmp;
}
$maxmp = floor ($maxmp);
$mp = floor ($mp);
if ($maxmp <= 0) {
$zmp = 1;
} else {
$zmp = $maxmp;
}
$mpf= floor (100 * ($mp / $zmp)) - 1;

// ## End RPG Stats Function ## //]]></phpcode>
	</plugin>
	<plugin active="1" product="vbulletin">
		<title>rpg_joindate</title>
		<hookname>postbit_display_start</hookname>
		<phpcode><![CDATA[$jointime = (TIMENOW - $this->post['joindate']) / 86400; // Days Joined]]></phpcode>
	</plugin>
</plugins>
