| Welcome | |
|---|---|
| Welcome to the Official<strong>World of Phaos</strong>Forums.
You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining the World of Phaos community for free, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, <a href="/profile.php?mode=register">join the World of Phaos community today</a>! |
|
jpoisson wrote:Yea I will help you develop the status bars. Umm it isnt really that challenging.
- Code: Select all
<div id="wrapbars">
Health (HP): <? print $character->hit_points; ?>/<? print $character->max_hp; ?><br/>
<div class="bars">
<div>
<img src="images/Layout/bar_red.gif" alt="" width=" <? print $character->hit_points / $character->max_hp *100; ?>%" height="5px">
</div>
</div>
Stamina: <? print $character->stamina_points ?>/<? print $character->max_stamina;?><br/>
<div class="bars">
<div>
<img src="images/Layout/bar_yellow.gif" alt="" width="<? print $character->stamina_points / $character->max_stamina * 100;?>%" height="5px">
</div>
</div>
Level Up: <? print $character->xp / $char_next_lev_xp * 100;?>%<br/>
<div class="bars">
<div>
<img src="images/Layout/bar_cyan.gif" alt="" width="<? print $character->xp / $char_next_lev_xp * 100;?>%" height="5px">
</div>
</div>
</div>
and this is the styles you need to add to get this working.
- Code: Select all
.bars {
border: 3px solid #333333;
margin-bottom: 2px;
width: 120px;
}
.bars div {
background-image: url(../images/Layout/bar_no.gif);
}
#wrapbars {
clear: both;
padding: 5px 0 5px 0;
}
If you would like for me to explain the code for you I would be glad to but it seems pretty self explanitory. and for the images just go to my site and save them.
DaWolf wrote:Honestly McCragge, I think that would be a better way anyway, it lets people see that there is always progress.
jpoisson wrote:Mccrage in order to fix this problem we need to modify the way a player levels, or at least add some type of a level lock... that we can set a base for each level
jpoisson wrote:I havn't got around to fixing it but here are my thoughts on the idea so far.
I need to split the users xp into current_exp and base_exp
so every time you level your current exp gets added to the base exp, and the current exp reverts to 0.
also this shows your current exp towards the next level while the current exp is always added onto the base which the base determines your level.
if anyone understands thisthen my job is yet to be finished.
jpoisson wrote:yay a thousand entries..
Users browsing this forum: No registered users and 0 guests