Cronwerks MCCode/MCCodes Forums

Please login or register.

Login with username, password and session length

News:

Have you purchased a mod and lost your copy? Just file a support ticket through your "My Mods" page.


This forum is now closed and has moved to a new location! Click here to find out why.

AuthorTopic: maxbrave and maxenergy  (Read 855 times)

benlakaz

  • Basic Member
  • *
  • Reputation Power: 4
  • benlakaz has no influence.
  • Offline Offline
  • Posts: 10
    • View Profile
maxbrave and maxenergy
« on: September 18, 2009, 04:54:55 AM »
hello to all,

Is anyone knows what part of the script should be change so that the players will not gain anymore brave or enerygy if they level up when they have already 250 brave? or set the maximum brave gain up to 250 only and will not grow more when they level up..

Thanks
Logged

Danny696

  • Senior Member
  • ****
  • Reputation Power: 317
  • Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.
  • Offline Offline
  • Posts: 540
    • View Profile
    • WWW
Re: maxbrave and maxenergy
« Reply #1 on: September 18, 2009, 09:04:15 AM »
if($ir['maxbrave'] > 250) {
$db->query("UPDATE users SET maxbrave = 250 WHERE userid=$userid")
} if(
$ir['brave'] > 250) {
$db->query("UPDATE users SET brave = 250 WHERE userid=$userid")

add that to header mabey
Logged
Project Choosen - 10%
Daniel - Hanson . Com

benlakaz

  • Basic Member
  • *
  • Reputation Power: 4
  • benlakaz has no influence.
  • Offline Offline
  • Posts: 10
    • View Profile
Re: maxbrave and maxenergy
« Reply #2 on: September 18, 2009, 09:08:16 AM »
thanks .. i will try that
Logged

benlakaz

  • Basic Member
  • *
  • Reputation Power: 4
  • benlakaz has no influence.
  • Offline Offline
  • Posts: 10
    • View Profile
Re: maxbrave and maxenergy
« Reply #3 on: September 22, 2009, 09:58:13 AM »
hi.. I added this code but still not working.. any help pls? thanks
Logged

Cronus

  • Administrator
  • Senior Member
  • *****
  • Reputation Power: 2901
  • Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!
  • Offline Offline
  • Posts: 550
    • MSN Messenger - preston__08@hotmail.com
    • View Profile
    • WWW
Re: maxbrave and maxenergy
« Reply #4 on: September 22, 2009, 03:25:57 PM »
Hmmm, that code that danny posted should work.
Can you show us where you inserted it on the page?
Logged
My msn is preston__08@hotmail.com if anyone is interested, I am online frequently.

benlakaz

  • Basic Member
  • *
  • Reputation Power: 4
  • benlakaz has no influence.
  • Offline Offline
  • Posts: 10
    • View Profile
Re: maxbrave and maxenergy
« Reply #5 on: September 23, 2009, 07:52:30 PM »
in header.php

after <?php
Logged

Danny696

  • Senior Member
  • ****
  • Reputation Power: 317
  • Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.
  • Offline Offline
  • Posts: 540
    • View Profile
    • WWW
Re: maxbrave and maxenergy
« Reply #6 on: September 24, 2009, 08:49:23 AM »
no try under
check_level();
Logged
Project Choosen - 10%
Daniel - Hanson . Com

benlakaz

  • Basic Member
  • *
  • Reputation Power: 4
  • benlakaz has no influence.
  • Offline Offline
  • Posts: 10
    • View Profile
Re: maxbrave and maxenergy
« Reply #7 on: October 02, 2009, 11:00:38 AM »
ok ill do that.. so its not in the header?? but in func_globals right?
Logged

Danny696

  • Senior Member
  • ****
  • Reputation Power: 317
  • Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.
  • Offline Offline
  • Posts: 540
    • View Profile
    • WWW
Re: maxbrave and maxenergy
« Reply #8 on: October 03, 2009, 04:34:59 AM »
No, still in header, for anything in global_func to work, you will need use the function, in globals sorry you will find check_level();
add the code i posted up there below the check_level();
Logged
Project Choosen - 10%
Daniel - Hanson . Com
 


This forum is now closed and has moved to a new location! Click here to find out why.