Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > Premium Archives > vbBux / vbPlaza
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
If anyone is interested, I changed 'Thief' to account for rep... Details »»
If anyone is interested, I changed 'Thief' to account for rep...
Version: , by fly fly is offline
Developer Last Online: Jun 2020 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 03-07-2006 Last Update: Never Installs: 0
 
No support by the author.

It's kinda crude, but works. You may need to adjust the variables on your forum if you have very high/low reps...

Find:
PHP Code:
// simple calculation for now to check whether or not the thief was successful
    
$randnum rand(0100);
    
$thiefsuccessful false;
    if (
$randnum $action['estore_thiefsuccessrate'])
    {
        
// set this flag that Thief was successful
        
$thiefsuccessful true;
    } 
Replace it with:
PHP Code:
// simple calculation for now to check whether or not the thief was successful
    
$randnum rand(0100);
    
$thiefsuccessful false;

    
//  added to check rep
    
$rep $vbulletin->userinfo['reputation'];
    
$randnum $randnum $rep;

    if (
$randnum $action['estore_thiefsuccessrate'])
    {
        
// set this flag that Thief was successful
        
$thiefsuccessful true;
    } 
If the person's rep is really high, the theft will always work, so make sure to set it so that the person loses rep for attempting to steal. At the other side, if the person's rep is really low, it will always fail. Right around neutral rep = pretty much random.

So that it doesn't get overwritten during an upgrade, I renamed the thief action file and pointed the thief option to that new file in the admincp.

Show Your Support

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

Comments
  #2  
Old 03-07-2006, 08:44 PM
CMX_CMGSCCC CMX_CMGSCCC is offline
 
Join Date: Sep 2003
Posts: 1,218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by flypaper
It's kinda crude, but works. You may need to adjust the variables on your forum if you have very high/low reps...

Find:
PHP Code:
// simple calculation for now to check whether or not the thief was successful
    
$randnum rand(0100);
    
$thiefsuccessful false;
    if (
$randnum $action['estore_thiefsuccessrate'])
    {
        
// set this flag that Thief was successful
        
$thiefsuccessful true;
    } 
Replace it with:
PHP Code:
// simple calculation for now to check whether or not the thief was successful
    
$randnum rand(0100);
    
$thiefsuccessful false;

    
//  added to check rep
    
$rep $vbulletin->userinfo['reputation'];
    
$randnum $randnum $rep;

    if (
$randnum $action['estore_thiefsuccessrate'])
    {
        
// set this flag that Thief was successful
        
$thiefsuccessful true;
    } 
If the person's rep is really high, the theft will always work, so make sure to set it so that the person loses rep for attempting to steal. At the other side, if the person's rep is really low, it will always fail. Right around neutral rep = pretty much random.

So that it doesn't get overwritten during an upgrade, I renamed the thief action file and pointed the thief option to that new file in the admincp.
1 Issue I can see with that is, what if the user has more than 100 reputation, the number will be negative, so once a user gets more than 100 they can steal all of the time. I would like to see it done differently, I would like it so the more reputation u have the HARDER it is to steal from that individual or something.

-CMX
Reply With Quote
  #3  
Old 03-07-2006, 09:06 PM
lordnex lordnex is offline
 
Join Date: Apr 2004
Location: Windsor, Ontario
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the problem is that everyones forums are different. 100 points may be major for one person, but on another the users may start off that high. i've seen forums where users had reps in excess of 40000.
Reply With Quote
  #4  
Old 03-07-2006, 09:57 PM
fly fly is offline
 
Join Date: Oct 2003
Posts: 1,215
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CMX_CMGSCCC
1 Issue I can see with that is, what if the user has more than 100 reputation, the number will be negative, so once a user gets more than 100 they can steal all of the time. I would like to see it done differently, I would like it so the more reputation u have the HARDER it is to steal from that individual or something.

-CMX
It was the best I could come up with, rather than totally random.

And yeah, good rep would allow one to steal all the time, which is why I use the rep reduce option for Thief...

Checking the rep of the theftee would be a neat idea. Maybe take the difference of the two reps and add that into the random.
Reply With Quote
  #5  
Old 03-07-2006, 11:54 PM
CMX_CMGSCCC CMX_CMGSCCC is offline
 
Join Date: Sep 2003
Posts: 1,218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is a way to fetch_reppower or something from one of the functions inside functions.php that should be able to be used in this manner I think to help find out the "scale" of people's forums.

-CMX
Reply With Quote
  #6  
Old 03-22-2006, 07:33 PM
HHU HHU is offline
 
Join Date: Sep 2005
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by lordnex
the problem is that everyones forums are different. 100 points may be major for one person, but on another the users may start off that high. i've seen forums where users had reps in excess of 40000.
Mine are now anywhere from 500 000 to 2 000 000..........
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 01:13 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.04809 seconds
  • Memory Usage 2,265KB
  • Queries Executed 19 (?)
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
  • (4)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (6)postbit_onlinestatus
  • (6)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete