Jump to content
MakeWebGames

150% energy bar (looking to buy)


Recommended Posts

Well

Find in header.php

$enperc=(int) ($ir['energy']/$ir['maxenergy']*100);

 

Replace with

if($ir['donatordays'] == 0)  $enperc=(int) ($ir['energy']/$ir['maxenergy']*100);if($ir['donatordays'] > 0) $enperc=(int) ($ir['energy']/$ir['maxenergy']*150

 

Not tested... Dunno if it works.. lol

Link to comment
Share on other sites

in header.php

// if user has a donator pack with days remaining then set 150 maxenergy

$db->query('UPDATE `users` SET `maxenergy` = 150 WHERE `donatordays` > 0');

// if user has no days remaining then put back to 100 maxenergy

$db->query('UPDATE `users` SET `maxenergy` = 100 WHERE `donatordays` = 0');

 

Hope this helps

Link to comment
Share on other sites

$db->query('UPDATE `users` SET `maxenergy` = 150 WHERE `donatordays` > 0');

that wouldnt work? as its not the maxenergy i want 150, its the energy bar its self. as it they got 150 max energy they could train REALLY! high in the gym.

as say a level 1 buys a donator pack, there max energy jump from 12 to 150.

if you know what i mean?

Link to comment
Share on other sites

Heres a hint:

/*-----------------------------------------------------

-- A product of Isomerizer.com

-- Copyright held 2007 - 2008 by Isomerizer ©

-- Buy Max Energy Mod

-----------------------------------------------------*/

That was taken off the actual 150 energy bar mod. As for if its still for sale, or not, I am sure it still is.

Link to comment
Share on other sites

// if user has a donator pack with days remaining then set 150 maxenergy

$db->query('UPDATE `users` SET `maxenergy` = 150 WHERE `donatordays` > 0');

// if user has no days remaining then put back to 100 maxenergy

$db->query('UPDATE `users` SET `maxenergy` = 100 WHERE `donatordays` = 0');

if you don't see the problem there then your seriously thinking outside the box today...

 

$max_energy = ( !empty($ir['donatordays']) ) ? $ir['maxenergy']+($ir['maxenergy']/2) : $ir['maxenergy'] ;
$db->query('UPDATE `users` SET `maxenergy` = 150 WHERE `userid` = '.$userid);
Link to comment
Share on other sites

did you mean this Crim? ...

$max_energy = ( !empty($ir['donatordays']) ) ? $ir['maxenergy']+($ir['maxenergy']/2) : $ir['maxenergy'] ;
$db->query('UPDATE `users` SET `maxenergy` = '.$max_energy.' WHERE `userid` = '.$userid);

that would not wotrk on each page visit ... BOOM max energy timesed by 1.5 next page happens again ... and again ... and so on try just putting this in ur header (no sql)

$ir['maxenergy'] = ( !empty($ir['donatordays']) ) ? $ir['maxenergy']+($ir['maxenergy']/2) : $ir['maxenergy'] ;

you will have to add that to the cron that updates energy but edit to $r['maxenergy'] or whatever it is ^^

Link to comment
Share on other sites

$ir['maxenergy'] = ( !empty($ir['donatordays']) ) ? $ir['maxenergy']+($ir['maxenergy']/2) : $ir['maxenergy'] ;

i dont think it worked mate. forgot to reply about it :/

if anyone could like make a test domain or whatever and try and get the 150% energy thing. to work that be great :)

not so its like 100% but showing 150% its so like say you can attack for 30% energy

which means you get attack 3 times every 100% (10% energy spare)

but with 150% you can attack 5 times.

if thats understandable. also with 150% energy you can train better in gyms?

it might be a really annoying mod to make, so im willing to pay for it.

NOTE: this mod is used on http://www.roguevampires.net/

Link to comment
Share on other sites

if($ir['donatordays']) { $u = "<font color=silver>{$ir['gangPREF']}{$ir['username']}</font>";$d="[img=donator.gif]"; }
mysql_query('UPDATE `users` SET `maxenergy` = 150 WHERE `donatordays` > 0');
mysql_query('UPDATE `users` SET `maxenergy` = 100 WHERE `donatordays` = 0');

 

then this for your attack.

 

if($_SESSION['attacking']==0 && $ir['attacking'] == 0)
{
if ($youdata['energy'] >= $youdata['maxenergy']/3)
{

$youdata['energy']-= floor($youdata['maxenergy']/3);
$me=floor($youdata['maxenergy']/3);
$db->query("UPDATE users SET energy=energy- {$me}, enfull=0 WHERE userid=$userid");
$_SESSION['attacklog']="";
$_SESSION['attackdmg']=0;
}
else
{
print "You can only attack someone when you have 50% energy";
$h->endpage();
exit;

 

i dont know if thats what your wanting but this is how i have mine works fine. no need to edit the gym for this, they get 10 trains for non donators and 15 for donators

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.

×
×
  • Create New...