View Single Post
  #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
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01698 seconds
  • Memory Usage 1,808KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete