Jump to content
MakeWebGames

Recommended Posts

Posted

Topic says it all, how can i decrease the amount of Brave gained per level guys? please let me know if its possible without breaking the script.

Thank you !

Posted

Re: How can i decrease the brave gain/level?

change the 2 to 1 in

$ir['brave']+=2

and the query too... thats all ? nothing more to change any other files?

cool thx man!

  • 3 weeks later...
Posted

Re: How can i decrease the brave gain/level?

Lithium man..i dont think it works. I've set it to 1 but still, at level 8 i have 18 brave..i really dont understand..

i begin with 5 brave at lvl 1 and at level 8 shouldnt i have only 12 brave?

Heres the code modified to 1 brave/level...maybe you see something..please let me know and thanks!

$expu=$ir['exp']-$ir['exp_needed'];
$ir['level']+=1;
$ir['exp']=$expu;
$ir['energy']+=2;
$ir['brave']+=1;
$ir['maxenergy']+=2;
$ir['maxbrave']+=1;
$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+1,maxenergy=maxenergy+2,maxbrave=maxbrave+1,
hp=hp+50,maxhp=maxhp+50 where userid=$userid");
Posted

Re: How can i decrease the brave gain/level?

i didnt edit anything from the admin panel, in fact i have created the account after adding the brave mod to the game.. i really dont understand its frustrating like whoa :mrgreen:

Posted

Re: How can i decrease the brave gain/level?

if you have only just changed the level to +1 it won't change the brave from before...

go to your phpmyadmin and run this sql

update users set brave=level+5

Posted

Re: How can i decrease the brave gain/level?

will do but as i said i have created a new account after moding the brave to +1 and its not working lol, maybe some server side problems ill try a reboot.

Posted

Re: How can i decrease the brave gain/level?

If you're looking to increase the brave maximum you get if you sucessfully do a crime, you can, if you go to edit crime you will see a code under the title, modify that.

Posted

Re: How can i decrease the brave gain/level?

looking to gain 1 brave per level instead of 2.

updated the user as shrek1609 suggested and the next day the brave were up at 20, lvl 10.

twilight zone, i give up.

Posted

Re: How can i decrease the brave gain/level?

 

Lithium man..i dont think it works. I've set it to 1 but still, at level 8 i have 18 brave..i really dont understand..

i begin with 5 brave at lvl 1 and at level 8 shouldnt i have only 12 brave?

Heres the code modified to 1 brave/level...maybe you see something..please let me know and thanks!

$expu=$ir['exp']-$ir['exp_needed'];
$ir['level']+=1;
$ir['exp']=$expu;
$ir['energy']+=2;
$ir['brave']+=1;
$ir['maxenergy']+=2;
$ir['maxbrave']+=1;
$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+1,maxenergy=maxenergy+2,maxbrave=maxbrave+1,
hp=hp+50,maxhp=maxhp+50 where userid=$userid");

 

there is nothing wrong with that code, this should increase 1 brave per level, as its not... your problem is somewhere else, check you haven't repeated the query somewhere else

  • 1 month later...
Posted

Re: How can i decrease the brave gain/level?

ok still couldnt fix it..ive reset brave and users had brave 5+lvl but it keeps coming back to 5+2xlvl.

global_func.php has been changed to give 1 brave/level.

what else can i change to aquire that?

maybe the day cron?

$query="UPDATE users SET brave=brave+((maxbrave/10)+0.5) WHERE brave<maxbrave ";
$query2="UPDATE users SET brave=maxbrave WHERE brave>maxbrave";

let me know if something here needs changed so the brave given is 1 per level and not 2.

thanks, this puzzles me cant fix it..

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...