Kaotic Posted October 17, 2008 Share Posted October 17, 2008 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 Quote Link to comment Share on other sites More sharing options...
raushan2007 Posted October 17, 2008 Share Posted October 17, 2008 Re: Max Level I was also wondering how to change the maximum amount of money and all....Can anyone help? Quote Link to comment Share on other sites More sharing options...
Kaotic Posted October 17, 2008 Author Share Posted October 17, 2008 Re: Max Level Thats easy raushan... just search the forums for max money or max crystals im sure u will come across it Quote Link to comment Share on other sites More sharing options...
Pheonix Posted October 17, 2008 Share Posted October 17, 2008 Re: Max Level I think you could put something like this in header.php : if ($ir['level'] > 100) { $db->query("UPDATE users SET level = 100 where userid=$userid"); } There is probably a better way, but this would work. Quote Link to comment Share on other sites More sharing options...
Floydian Posted October 17, 2008 Share Posted October 17, 2008 Re: Max Level That last suggestion isn't going to be helpful. You have to modifiy the check_level() function. What Pheonix suggested would cause unintended consequences. Quote Link to comment Share on other sites More sharing options...
Pheonix Posted October 18, 2008 Share Posted October 18, 2008 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. Quote Link to comment Share on other sites More sharing options...
Floydian Posted October 18, 2008 Share Posted October 18, 2008 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? Quote Link to comment Share on other sites More sharing options...
Pheonix Posted October 18, 2008 Share Posted October 18, 2008 Re: Max Level Thanks Floydian for your patience and kindness. I think I understand now. Quote Link to comment Share on other sites More sharing options...
Floydian Posted October 18, 2008 Share Posted October 18, 2008 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. Quote Link to comment Share on other sites More sharing options...
Kaotic Posted October 18, 2008 Author Share Posted October 18, 2008 Re: Max Level Parse error: syntax error, unexpected T_IF, expecting T_FUNCTION in /****/***/header.php on line 213 Thats the error im getting when putting that in my header... is there somewhere specific i need to put it? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.