W3Theory || Peter Posted August 13, 2011 Share Posted August 13, 2011 Yeah that would be it, is that the whole of the function.. The standard one is something like: function check_level() { global $db, $ir, $userid; $ir['exp_needed']=(int) (($ir['level']+1)*($ir['level']+1)*($ir['level']+1)*2.2); if($ir['exp'] >= $ir['exp_needed']) { $expu = ($ir['exp']-$ir['exp_needed']); $ir['level']+=1; $ir['exp'] = $expu; $ir['energy']+=2; $ir['brave']+=2; $ir['maxenergy']+=2; $ir['maxbrave']+=2; $ir['hp']+=50; $ir['maxhp']+=50; $ir['exp_needed']=(int) (($ir['level']+1)*($ir['level']+1)*($ir['level']+1)*2.2); $db->query('UPDATE `users` SET `level`=level+1, `exp`='.$expu.', `energy`=energy+2, `brave`=brave+2, `maxenergy`=maxenergy+2, `maxbrave`=maxbrave+2, `hp`=hp+50, `maxhp`=maxhp+50 WHERE (`userid`='.$userid.')'); } } This was on the first page Quote Link to comment Share on other sites More sharing options...
Dominion Posted August 13, 2011 Share Posted August 13, 2011 and far as i know dayo's mod is not in use,. Fair enough, but the check_level() is more or less the same. http://makewebgames.io/showthread.php/39128-New-Leveling-up-system! I did not read the whole thread myself, but if the fix has been posted take a look back over the posts. :) Quote Link to comment Share on other sites More sharing options...
W3Theory || Peter Posted August 13, 2011 Share Posted August 13, 2011 Plus you might want to check your globals I believe that it even has the function posted to check. Quote Link to comment Share on other sites More sharing options...
snaketooth22 Posted August 13, 2011 Author Share Posted August 13, 2011 should there be an 'exp_needed' query in the database ?? Quote Link to comment Share on other sites More sharing options...
Dominion Posted August 13, 2011 Share Posted August 13, 2011 should there be an 'exp_needed' query in the database ?? No it's set inside the function. Quote Link to comment Share on other sites More sharing options...
W3Theory || Peter Posted August 13, 2011 Share Posted August 13, 2011 $ir['exp_needed']=(int) (($ir['level']+1)*($ir['level']+1)*($ir['level']+1)*2.2); This right here determines the exp_needed, so you won't need it set up in the database. Quote Link to comment Share on other sites More sharing options...
snaketooth22 Posted August 13, 2011 Author Share Posted August 13, 2011 oh okay,. right i have dayo's mod installed,. my colleague must have installed it,. now only the first crime is working for EXP,. does it take some time to configure or is this an error ?? Quote Link to comment Share on other sites More sharing options...
snaketooth22 Posted August 13, 2011 Author Share Posted August 13, 2011 Is there anyway you can slow down the rate that people level up ?????? Quote Link to comment Share on other sites More sharing options...
Maniak Posted August 13, 2011 Share Posted August 13, 2011 Yes, decrease the amount of EXP the users gain from Attacking and/or Successful Crimes. Pretty simple really. 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.