01.01.2008, 21:58
Nabend.
Kann mir jemand erklären, wie die HP, MP und exp berechnet werden?
http://mods.mybboard.net/view/hp-mp-exp-stats
Kann mir jemand erklären, wie die HP, MP und exp berechnet werden?
PHP-Code:
{
global $mybb, $db;
$post['postnum'] = str_replace($mybb->settings['thousandssep'], '', $post['postnum']);
$daysreg = (time() - $post['regdate']) / (24*3600);
$postsperday = $post['postnum'] / $daysreg;
$postsperday = round($postsperday, 2);
if($postsperday > $post['postnum'])
{
$postsperday = $post['postnum'];
}
$rpglvl = $post['postnum'];
$level = pow (log10 ($rpglvl), 3);
$ep = floor (100 * ($level - floor ($level)));
$showlevel = floor ($level + 1);
$hpmulti = round ($postsperday / 6, 1);
if ($hpmulti > 1.5)
{
$hpmulti = 1.5;
}
if ($hpmulti < 1)
{
$hpmulti = 1;
}
$maxhp = $level * 25 * $hpmulti;
$hp = $postsperday / 1;
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 = ($daysreg * $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;
http://mods.mybboard.net/view/hp-mp-exp-stats