Jump to content
MakeWebGames

Jailbusts


Recommended Posts

basic mcc version I think. don't think I've changed it at least I don't remember changing it. anyway here is where I thought it need changing.

 

}
$mult=$r['level']*$r['level'];
$chance=min(($ir['crimexp']/$mult)*50+1, 95);
if(rand(1,100) < $chance)
{

 

that is line 22 to 26 in jailbust.php I changed (1,100) to (1,50) but my players say it is still hard to bust others

Link to comment
Share on other sites

The rand(1,100) bit is there to make the "chance" work like a percentage chance of success.

What the formula does is it takes the user's crime XP, and divides it by the person they are trying to bust's level squared. This will give a number which could be anywhere from just over 0 to a very large number. This is then multiplied by 50 to give the percentage chance of them getting a successful bust.

The +1 is there to ensure that your chance of busting someone is never 0%. If the formula above gave a number less than 1, then you would never be able to bust someone without the +1.

The min(95, chance) bit ensures that your chance of busting someone can never be greater than 95%, to make sure people with bucketloads of crime experience can't just bust hundreds of people successfully.

Let's take an example here. Say a person with 100 crime XP tries to bust a level 11 player.

Their chance of busting them would be (100/(11*11))*50 + 1, which is 42.3, to 1 decimal place. So 42 times out of 100 they would succeed in busting the person, as 42 out of the possible numbers 1-100 are less than 42.3.

As to how to make this easier? The way you have done it, changing (1,100) to (1,50), is one possible way, but is flawed in that there will eventually be some players that can bust everyone every time [as people can have a "chance" higher than 50]. This isn't the best idea, as in this situation no-one would stay in jail for any length of time at all.

What you can do is change the *50 to something bigger like *75 or even *100 if you're so inclined. This would just straight up increase people's busting capabilities, while retaining the 95% chance cap to leave some room for failure in there.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...