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(0, 100);
$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(0, 100);
$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