Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by Knoman Knoman is offline
Developer Last Online: Jun 2008 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 10-29-2001 Last Update: Never Installs: 237
 
No support by the author.

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.

EDIT: To prevent non-legit vb owners from installing this hack, I have removed it from this post. Instead, just scroll down to Neo's post in this thread and download the file.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 10-30-2001, 01:34 AM
UOSaint
Guest
 
Posts: n/a
Default

Nice Hack!

Thanks for sharing.
Reply With Quote
  #3  
Old 10-30-2001, 01:44 AM
UOSaint
Guest
 
Posts: n/a
Default

I don't seems to be able to see the Exp calculations included
and do I need to include the level too?

Pls help.
Reply With Quote
  #4  
Old 10-30-2001, 02:03 AM
Neo's Avatar
Neo Neo is offline
 
Join Date: Oct 2001
Location: Anywhere
Posts: 1,817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

im not worthy, im not worthy, im scum, i suck,

i own a role playing forum, thank you so much this will really help me out


thanks again for this, here is the zip file i made for it, with the images.
Reply With Quote
  #5  
Old 10-30-2001, 02:18 AM
Knoman's Avatar
Knoman Knoman is offline
 
Join Date: Oct 2001
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

UOSaint, the EXP would be calculated in the variable $EP. And yes, you need to use my levels code because all the other parts requires the $levels variable.

Edit:
but if you mean that if you should add each and every level in by hand, no you shouldn't. This code should create the levels automatically.

PHP Code:
$level?=?pow?(log10?($post[posts]),?3); 
Reply With Quote
  #6  
Old 10-30-2001, 02:23 AM
UOSaint
Guest
 
Posts: n/a
Default

cool thanks
Reply With Quote
  #7  
Old 10-30-2001, 02:41 AM
Team36
Guest
 
Posts: n/a
Default

Written by Dunny, moded by NanoEntity, idea by square forums.


PHP Code:
  // ##################### L E V E L S #####################

  
$level "";
    
$level13 '48';
    
$level12 '44';
    
$level11 '40';
    
$level10 '36';
    
$level9 '32';
    
$level8 '28';
    
$level7 '24';
    
$level6 '20';
    
$level5 '16';
    
$level4 '12';
    
$level3 '8';
    
$level2 '4';
    
$level1 '1';

  if (
$post[posts] > 500) {
    
$level .= $level13;
 }
  elseif (
$post[posts] > 430) {
    
$level .= $level12;
 }
  elseif (
$post[posts] > 390) {
    
$level .= $level11;
 }
  elseif (
$post[posts] > 330) {
    
$level .= $level10;
 }
  elseif (
$post[posts] > 280) {
    
$level .= $level9;
 }
  elseif (
$post[posts] > 250) {
    
$level .= $level8;
 }
  elseif (
$post[posts] > 190) {
    
$level .= $level7;
 }
  elseif (
$post[posts] > 150) {
    
$level .= $level6;
 }
  elseif (
$post[posts] > 100) {
    
$level .= $level5;
 }
  elseif (
$post[posts] > 70) {
    
$level .= $level4;
 }
  elseif (
$post[posts] > 30) {
    
$level .= $level3;
 }
  elseif (
$post[posts] > 10) {
    
$level .= $level2;
 }
  else 
// ($post[posts] > 0)
 
$level .= $level1; }


  
$exp10 $DB_site->query_first("SELECT SUM(views) AS views FROM thread WHERE postuserid='$userinfo[userid]' AND open!='10'"); 

  
//SET MP LEVEL
  
$maxmp= ($exp10[views] * $level) / 20
  
$mp$post[posts] / 3
  if (
$mp >= $maxmp) { 
  
$mp $maxmp
  } 
  
$maxmp floor ($maxmp); 

  
$maxmp2= ($exp10[views] * $level) / 7
  
$mp2$post[posts] / 3
  if (
$mp2 >= $maxmp2) { 
  
$mp2 $maxmp2
  } 
  
$maxmp2 floor ($maxmp2); 

  
//SET HP LEVEL
  
$hp$post[posts] / 5
  
$hp floor ($hp);

  
$hp2$post[posts] / 2
  
$hp2 floor ($hp2);

  
//SET EXP LEVEL
  
$exp= ($mp $hp) / 100
  
$exp floor ($exp);

  
$exp2= ($mp2 $hp2) / 60
  
$exp2 floor ($exp2);

  if (
$exp10 == ""): 
      
$exp10 "0"
    endif; 
Reply With Quote
  #8  
Old 10-30-2001, 02:49 AM
Knoman's Avatar
Knoman Knoman is offline
 
Join Date: Oct 2001
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, we've all seen that code before. But the problem with that is that you have to type in every levels by hand and also, the EXP will eventually surpass 100%

I've made mines so that when the exp reaches 100%, you would "level up" and the EXP starts all over.

Edit: Also in my version, I've included an HP bonus multiplyer for those who greatly exceeds the 10 post per day average. This way, it's impossible for people with the same level to get the same stats
Reply With Quote
  #9  
Old 10-30-2001, 03:00 AM
Team36
Guest
 
Posts: n/a
Default

I dont know how this code got out, I havent posted it anywhere, anyhow I just had to post it, I will do a mod to your code, your is well written, I just didnt think, was going for that admin could set its own vars the way he/she wants them displayed.

Was thinking about costum administration.

same thing with my stars hack, its edited by hand for full control, and well sames a hell of a time when upgrading to new version of the forum.

make stars.php

insert and call it by where ever you want it, include('./stars.php'); in any .php file
PHP Code:
<?php

  
// #######################################################
  // #
  // # NanoEntity 
  // #                                   
  // # Stars Hack
  // # Version: 2.0.1
  // #                     
  // # ?Copyright 2001 HOLOLITH.COM.                     
  // # Created: 10/07/2001                                               
  // #
  // #######################################################
  // #
  // # COPYRIGHT NOTICE:
  // #
  // # Copyright 2001 HOLOLITH.COM,  All Rights Reserved.
  // #
  // # Selling the code for this script
  // # without prior written consent is
  // # expressly forbidden. In all cases
  // # copyright and header must remain intact.
  // #
  // #######################################################

  
unset($stars);

  
// ##################### S T A R S  G I F #####################

   // Stars Mod
    
$rankstarmod1 '<img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><P>';

   
// Stars Super Mod
    
$rankstarsmod1 '<img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><P>';

   
// Stars Admin
    
$rankstaradmin1 '<img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><P>';

   
// Stars Everyone Else
    
$rankstarelse1 '<img src="{imagesfolder}/titles/star.gif"><P>';
    
$rankstarelse2 '<img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><P>';
    
$rankstarelse3 '<img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><P>';
    
$rankstarelse4 '<img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><P>';
    
$rankstarelse5 '<img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><P>';
    
$rankstarelse6 '<img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><P>';
    
$rankstarelse7 '<img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><P>';
    
$rankstarelse8 '<img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><P>';
    
$rankstarelse9 '<img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><P>';
    
$rankstarelse10 '<img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><P>';
    
$rankstarelse11 '<img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><P>';
    
$rankstarelse12 '<img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><P>';
    
$rankstarelse13 '<img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><img src="{imagesfolder}/titles/star.gif"><P>';

  
// ##################### S T A R S  G I F #####################

  // ##################### S T A R S  A L L #####################

  
if ($post[usergroupid]==7) {
      
$stars .= $rankstarmod1;
 }
  elseif (
$post[usergroupid]==5) {
      
$stars .= $rankstarsmod1;
 }
  elseif (
$post[usergroupid]==6) {
      
$stars .= $rankstaradmin1;
 }
  elseif (
$post[posts] > 500) {
    
$stars .= $rankstarelse13;
 }
  elseif (
$post[posts] > 430) {
    
$stars .= $rankstarelse12;
 }
  elseif (
$post[posts] > 390) {
    
$stars .= $rankstarelse11;
 }
  elseif (
$post[posts] > 330) {
    
$stars .= $rankstarelse10;
 }
  elseif (
$post[posts] > 280) {
    
$stars .= $rankstarelse9;
 }
  elseif (
$post[posts] > 250) {
    
$stars .= $rankstarelse8;
 }
  elseif (
$post[posts] > 190) {
    
$stars .= $rankstarelse7;
 }
  elseif (
$post[posts] > 150) {
    
$stars .= $rankstarelse6;
 }
  elseif (
$post[posts] > 100) {
    
$stars .= $rankstarelse5;
 }
  elseif (
$post[posts] > 70) {
    
$stars .= $rankstarelse4;
 }
  elseif (
$post[posts] > 30) {
    
$stars .= $rankstarelse3;
 }
  elseif (
$post[posts] > 10) {
    
$stars .= $rankstarelse2;
 }
  elseif (
$post[posts] > 0) {
    
$stars .= $rankstarelse1;
 }

  
// ##################### S T A R S  A L L #####################

  
if (!$stars)
    
$stars '<br>';
  else
    
$stars .= '';

  
// ##################### L E V E L S #####################

  
$level "";
    
$level13 '48';
    
$level12 '44';
    
$level11 '40';
    
$level10 '36';
    
$level9 '32';
    
$level8 '28';
    
$level7 '24';
    
$level6 '20';
    
$level5 '16';
    
$level4 '12';
    
$level3 '8';
    
$level2 '4';
    
$level1 '1';

  if (
$post[posts] > 500) {
    
$level .= $level13;
 }
  elseif (
$post[posts] > 430) {
    
$level .= $level12;
 }
  elseif (
$post[posts] > 390) {
    
$level .= $level11;
 }
  elseif (
$post[posts] > 330) {
    
$level .= $level10;
 }
  elseif (
$post[posts] > 280) {
    
$level .= $level9;
 }
  elseif (
$post[posts] > 250) {
    
$level .= $level8;
 }
  elseif (
$post[posts] > 190) {
    
$level .= $level7;
 }
  elseif (
$post[posts] > 150) {
    
$level .= $level6;
 }
  elseif (
$post[posts] > 100) {
    
$level .= $level5;
 }
  elseif (
$post[posts] > 70) {
    
$level .= $level4;
 }
  elseif (
$post[posts] > 30) {
    
$level .= $level3;
 }
  elseif (
$post[posts] > 10) {
    
$level .= $level2;
 }
  else 
// ($post[posts] > 0)
 
$level .= $level1; }


  
$exp10 $DB_site->query_first("SELECT SUM(views) AS views FROM thread WHERE postuserid='$userinfo[userid]' AND open!='10'"); 

  
//SET MP LEVEL
  
$maxmp= ($exp10[views] * $level) / 20
  
$mp$post[posts] / 3
  if (
$mp >= $maxmp) { 
  
$mp $maxmp
  } 
  
$maxmp floor ($maxmp); 

  
$maxmp2= ($exp10[views] * $level) / 7
  
$mp2$post[posts] / 3
  if (
$mp2 >= $maxmp2) { 
  
$mp2 $maxmp2
  } 
  
$maxmp2 floor ($maxmp2); 

  
//SET HP LEVEL
  
$hp$post[posts] / 5
  
$hp floor ($hp);

  
$hp2$post[posts] / 2
  
$hp2 floor ($hp2);

  
//SET EXP LEVEL
  
$exp= ($mp $hp) / 100
  
$exp floor ($exp);

  
$exp2= ($mp2 $hp2) / 60
  
$exp2 floor ($exp2);

  if (
$exp10 == ""): 
      
$exp10 "0"
    endif;

?>
Reply With Quote
  #10  
Old 10-30-2001, 03:11 AM
Knoman's Avatar
Knoman Knoman is offline
 
Join Date: Oct 2001
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

modify the code as much as you want.
i never added in a custom admin or cutom mod stats
because i treat all my members the same way.

the reason why i'm willing to give up my hack is
because i'm currently expanding it myself.
soon, people will be able to use their mp to "heal"
themselves and other members. afterwards, i'm
creating a money system where members are
awarded cash for allowances and for completing
quests. this money can be used to buy upgrades
in amor and weapons in the local shops in the Role
Playing Forums.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:51 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05697 seconds
  • Memory Usage 2,410KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (5)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete