PDA

View Full Version : something about hp/mp/exp


squawell
11-23-2001, 05:27 AM
hey guys!!

i want to know how to count members stay in forum's time

and add to hp,mp or exp with functions then make this hack perfect~~~

anyone know how to do??if can~~plz tell me that code!!

Knoman
11-30-2001, 02:03 AM
i have one custom made.
http://vbulletin.org/forum/showthread.php?&threadid=31775

demo @ www.allsquare.net/forums

squawell
11-30-2001, 07:09 AM
this code is i use in functions.php


//set level
$level = pow (log10 ($post[posts]), 3);
$ep = floor (100 * ($level - floor ($level)));
$showlevel = floor ($level + 1);
$hpmulti =round ($postsperday / 5, 1);
if ($hpmulti > 1) {
$hpmulti = 1;
}
if ($hpmulti < 1) {
$hpmulti = 1;
}

$maxhp = $level * 50 * $hpmulti;
$hp= $postsperday / 5;
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) / 3;
$mp= $post[posts] / 2;
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 level

now how i to do like my first post say that way??