Skip to content

Latest commit

 

History

History
45 lines (29 loc) · 838 Bytes

bitburner.bladeburner.getstamina.md

File metadata and controls

45 lines (29 loc) · 838 Bytes

Home > bitburner > Bladeburner > getStamina

Bladeburner.getStamina() method

Get bladeburner stamina.

Signature:

getStamina(): [number, number];

Returns:

[number, number]

Array containing current stamina and max stamina.

Remarks

RAM cost: 4 GB Returns an array with two elements: * [Current stamina, Max stamina]

Example 1

// NS1:
function getStaminaPercentage() {
   var res = bladeburner.getStamina();
   return res[0] / res[1];
}

Example 2

// NS2:
function getStaminaPercentage() {
   const [current, max] = ns.bladeburner.getStamina();
   return current / max;
}