vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   MP/EXP/Level Hack (https://vborg.vbsupport.ru/showthread.php?t=34836)

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','Experie nce','width=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','Experie nce','width=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 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.


All times are GMT. The time now is 06:21 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01455 seconds
  • Memory Usage 1,732KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete