Home > bitburner > Bladeburner > getStamina
Get bladeburner stamina.
Signature:
getStamina(): [number, number];
Returns:
[number, number]
Array containing current stamina and max stamina.
RAM cost: 4 GB Returns an array with two elements: * [Current stamina, Max stamina]
// NS1:
function getStaminaPercentage() {
var res = bladeburner.getStamina();
return res[0] / res[1];
}
// NS2:
function getStaminaPercentage() {
const [current, max] = ns.bladeburner.getStamina();
return current / max;
}