After my rantings in the other thread about people posting my codes, I've decided to forget everything that happen and post my version of the EXP/HP/MP hack. Most people will not need this hack because it will only apply to gaming forums; specifically RPG forums.
This hack works in such a way that:
HP drops and rises according to the members activeness.
MP determins how long a user has been with the forums, and how active they are.
EXP determins how close a user is to reaching the next level.
The files you need to edit is
showthread.php for version 2.0.2 and under
or
/admin/functions.php for version 2.0.3
Find the code
**I haven't used version 2.0.2 in quite a while... but I'm sure the code looks similar to that**
and under it, put in this code:
Now, you see where it says:
Well, for my forums, if a user fails to achieve at least 10 posts per day, the hp starts to drop. You can change that code to anything you like.
now go to www.allsquare.net/avalon/bar and download all the images there.
place them in /forums/images/bar
sorry, but i'm too lazy to zip
Now, get into the CP and open up the postbits template.
Find:
put this under it:
Now, I've played a lot with my postbit templates... so you might experience some cosmetic abnormalities... just use your html abilities to fix it.
This hack works in such a way that:
HP drops and rises according to the members activeness.
MP determins how long a user has been with the forums, and how active they are.
EXP determins how close a user is to reaching the next level.
The files you need to edit is
showthread.php for version 2.0.2 and under
or
/admin/functions.php for version 2.0.3
Find the code
PHP Code:
if ($post['receivepm'] and $enablepms==1) {
eval("\$post[pmlink] = \"".gettemplate("postbit_sendpm")."\";");
} else {
$post[pmlink] = "";
}
and under it, put in this code:
PHP Code:
$level = pow (log10 ($post[posts]), 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 / 10;
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= $post[posts] / 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;
Now, you see where it says:
PHP Code:
$hp= $postsperday / 10;
now go to www.allsquare.net/avalon/bar and download all the images there.
place them in /forums/images/bar
sorry, but i'm too lazy to zip
Now, get into the CP and open up the postbits template.
Find:
PHP Code:
$post[avatar]<p>
<smallfont>
PHP Code:
<br>
<p> <b>Level: $showlevel<br>
Member ID: $post[userid]</b><br>
HP: $hp / $maxhp
<table width="100" border="1" cellspacing="0" cellpadding="0" bordercolor="#000000">
<tr>
<td bgcolor="#9999FF"><img src="images/bar/bhg.gif" width="$hpf%" height="9"><img src="images/bar/bhb.gif" width="1" height="9"></td>
</tr>
</table>
MP: $mp / $maxmp
<table width="100" border="1" cellspacing="0" cellpadding="0" bordercolor="#000000">
<tr>
<td bgcolor="#9999FF"><img src="images/bar/bmg.gif" width="$mpf%" height="9"><img src="images/bar/bmb.gif" width="1" height="9"></td>
</tr>
</table>
Exp: $ep%
<table width="100" border="1" cellspacing="0" cellpadding="0" bordercolor="#000000">
<tr>
<td bgcolor="#9999FF"><img src="images/bar/bxg.gif" width="$ep%" height="9"><img src="images/bar/bxb.gif" width="1" height="9"></td>
</tr>
Comment