Jump to content
MakeWebGames

Max Level


Kaotic
 Share

Recommended Posts

Alright so i know the level in MCCodes are endless... But how would i make it so you can't lvl past a certain point... like lvl 100 or something? I change the lvl int to 2... 127 is the max when i did that... did tiny int at 2... only maxed at 127.... not sure what to do to change this but any help would be appreciated

Link to comment
Share on other sites

Re: Max Level

Is it because, the stat gains would still occur on Check_Level() and for a moment the player would see their level at 101? Do you recommend going to global_func.php -> check_level() and doing this:

if($ir['exp'] >= $ir['exp_needed'] && $ir['level'] < 100)

{

I also think something should be done about the experience gained from attacking after the level cap.

Link to comment
Share on other sites

Re: Max Level

The point Pheonix, is once you get to the point that you gain level 101, interesting things happen.

If your proposed fix comes before the checklevel function, then it goes like this:

The first page load after gaining the new level, your level is set to 100, and then the check level sees that you have enough exp to gain level 101, and you get the boost, like health + 20, and so on. Then on the next page load, your "fix" takes you back to level 100. And then you gain, then you lose, then you gain, then you lose. But, each time, you keep the health boost, and all that.

If your fix comes after check level. It's basically the same thing, but in a different order.

See the problem?

Link to comment
Share on other sites

Re: Max Level

You're welcome. ;)

 

And I forgot to mention that the code you posted does indeed look like it will top off leveling at level 100 ;)

 

if($ir['exp'] >= $ir['exp_needed'] && $ir['level'] < 100)
{

 

As for the experience, I'm not sure that would matter once you can't gain any levels.

As for the question of limiting money, I'm not sure players would be very happy when they find out they have maxed out. You're best bet is to reduce the amount of money people are getting from crimes and whatnot.

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.

 Share

×
×
  • Create New...