• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Shows stamina time gesior aac

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,719
Solutions
9
Reaction score
339
Hi folks!

I'm want to to add a information on characters page to see how much stamina the player has, but currently I'm having against some a problem, this problem is to the script says like the hours in tibia for example, 42:00 hours, etc, etc. What I suppost to use to make shows the time like in tibia? Currently, I got this.

Code:
$main_content .= '<tr bgcolor="' . $bgcolor . '"><td>Stamina:</td><td>'.(2400 - ($player->getStamina())).' </td></tr>';

I was trying to subtracting 2400 by the amount of stamina that returns in getStamina() like this https://github.com/otland/forgotten...turescripts/scripts/regeneratestamina.lua#L15, but I failed, xD

Thanks.
 
Hi folks!

I'm want to to add a information on characters page to see how much stamina the player has, but currently I'm having against some a problem, this problem is to the script says like the hours in tibia for example, 42:00 hours, etc, etc. What I suppost to use to make shows the time like in tibia? Currently, I got this.

Code:
$main_content .= '<tr bgcolor="' . $bgcolor . '"><td>Stamina:</td><td>'.(2400 - ($player->getStamina())).' </td></tr>';

I was trying to subtracting 2400 by the amount of stamina that returns in getStamina() like this https://github.com/otland/forgotten...turescripts/scripts/regeneratestamina.lua#L15, but I failed, xD

Thanks.

Code:
$main_content .= '<tr bgcolor="' . $bgcolor . '"><td>Stamina:</td><td>'.sprintf("%02d:%02d.\n", intval($player->getStamina() / 60), $player->getStamina() % 60).' </td></tr>';
 
Back
Top