PDA

View Full Version : MP/EXP/Level Hack


badr511
02-06-2002, 10:45 AM
firefly look this code, iwant use this code in vbulletin board

######
1) Open thread.php
######
- Search for:
eval ("\$thread_postbit .= \"".gettemplate("thread_postbit")."\";");

- Add ABOVE it:
$reg_date = (time() - $posts[regdate]) / 86400;
if ($reg_date < 1) $postsperday = $posts[userposts];
else $postsperday = $posts[userposts] / $reg_date;

$level = pow (log10 ($posts[userposts]), 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 / 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= ($reg_date * $level) / 5;
$mp= $posts[userposts] / 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;

######
2) Open search.php
######
- Search for:
eval ("\$thread_postbit .= \"".gettemplate("thread_postbit")."\";");

- Add ABOVE it:
$reg_date = (time() - $posts[regdate]) / 86400;
if ($reg_date < 1) $postsperday = $posts[userposts];
else $postsperday = $posts[userposts] / $reg_date;

$level = pow (log10 ($posts[userposts]), 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 / 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= ($reg_date * $level) / 5;
$mp= $posts[userposts] / 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;

######
3) Open members.php
######
- Search for:
eval("dooutput(\"".gettemplate("members_profile")."\");");

- Add ABOVE it:
$reg_date = (time() - $user_info[regdate]) / 86400;
if ($reg_date < 1) $postsperday = $user_info[userposts];
else $postsperday = $user_info[userposts] / $reg_date;

$level = pow (log10 ($user_info[userposts]), 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 / 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= ($reg_date * $level) / 5;
$mp= $user_info[userposts] / 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;

######
4) Open misc.php
######
- Search for:
require("_board_jump.php");

Add UNDER it:
if($info == "level") {
eval("dooutput(\"".gettemplate("level_info")."\");");
}

=====================================
5) Open templates/thread_postbit.htm
=====================================
- Search for:
$user_on_off

- ADD UNDER it:
<br><br>
Level: $showlevel [<a href="#" onClick="openWindow('misc.php?info=level','Experience','wid th=530,height=200')"> ?</a>]<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>
</table>
<br>
================================================== ==========


=====================================
6) Open templates/members_profile.htm
=====================================

- Search for:
=================
Usertext
=================

- Replace with:
===============
Usertext/Stats
===============
-
-
-
- Search for:
================================================== ========================
<FONT face="{font}" size=2>$user_text</font>

- Add AFTER it:
<br><br><hr width="100%" color="{tablea}" noShade size=1><FONT face="{font}" size=1>
Level: $showlevel [<a href="#" onClick="openWindow('misc.php?info=level','Experience','wid th=530,height=200')"> ?</a>]<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>
</table></font>

================================================== ========================

=====================================
7) Open templates/headerinclude.htm
=====================================
At the end of the file, add:
<script language="JavaScript">
<!--
function openWindow(theURL,winName,features) {
window.open(theURL,winName,features);
}
//-->
</script>

Steve Machol
02-06-2002, 02:14 PM
badr511, please go to this (http://www.vbulletin.com/members/vbulletin.org.php) page and enter your username, to show you are licensed. (you will need to use your customer number and password to access that page)
Thank you.