boionfire81 Posted March 16, 2016 Share Posted March 16, 2016 I'm looking to adjust the bars from a percentage to value for the energy bar. Is that possible? Quote Link to comment Share on other sites More sharing options...
Zettieee Posted March 16, 2016 Share Posted March 16, 2016 Very possible. I think it's in header. Been a while since I messed with mccodes. Post up your header and I'll see what i can do. Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted March 16, 2016 Author Share Posted March 16, 2016 $enperc = min((int) ($ir['energy'] / $ir['maxenergy'] * 100), 100); $wiperc = min((int) ($ir['will'] / $ir['maxwill'] * 100), 100); $experc = min((int) ($ir['exp'] / $ir['exp_needed'] * 100), 100); $brperc = min((int) ($ir['brave'] / $ir['maxbrave'] * 100), 100); $hpperc = min((int) ($ir['hp'] / $ir['maxhp'] * 100), 100); $enopp = 100 - $enperc; $wiopp = 100 - $wiperc; $exopp = 100 - $experc; $bropp = 100 - $brperc; $hpopp = 100 - $hpperc; Seems simple enough. Now that I see where the code is. But mathematically I'm unsure the * 100), 100); Quote Link to comment Share on other sites More sharing options...
Zettieee Posted March 16, 2016 Share Posted March 16, 2016 On the actual bar part instead of displaying $wiperc, experc, brperc, enperc, hpperc just display $ir['name'] Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted March 16, 2016 Author Share Posted March 16, 2016 My bar displayed looks like this <b>Energy:</b> {$enperc}%<br /><img src='greenbar.png' width='$enperc' height='10' /><img src='redbar.png' width='$enopp' height='10' /><br /> Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted March 16, 2016 Author Share Posted March 16, 2016 I figured it out. lol was going a bit faster over here, and saw 'name'. Didn't realize it should be 'energy' lol 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.