Interface Sleeve

Sleeve API

Remarks

If you are not in BitNode-10, then you must have Source-File 10 in order to use this API.

interface Sleeve {
    getNumSleeves(): number;
    getSleeve(sleeveNumber): SleevePerson;
    getSleeveAugmentationPrice(augName): number;
    getSleeveAugmentationRepReq(augName): number;
    getSleeveAugmentations(sleeveNumber): string[];
    getSleevePurchasableAugs(sleeveNumber): AugmentPair[];
    getTask(sleeveNumber): null | SleeveTask;
    purchaseSleeveAug(sleeveNumber, augName): boolean;
    setToBladeburnerAction(sleeveNumber, action, contract?): boolean;
    setToCommitCrime(sleeveNumber, crimeType): boolean;
    setToCompanyWork(sleeveNumber, companyName): boolean;
    setToFactionWork(sleeveNumber, factionName, factionWorkType): undefined | boolean;
    setToGymWorkout(sleeveNumber, gymName, stat): boolean;
    setToIdle(sleeveNumber): void;
    setToShockRecovery(sleeveNumber): boolean;
    setToSynchronize(sleeveNumber): boolean;
    setToUniversityCourse(sleeveNumber, university, className): boolean;
    travel(sleeveNumber, city): boolean;
}

Methods

  • Get the number of sleeves you own.

    Returns number

    Number of duplicate sleeves the player has.

    Remarks

    RAM cost: 4 GB

    Return the number of duplicate sleeves the player has.

  • Get information about a sleeve.

    Parameters

    • sleeveNumber: number

      Index of the sleeve to retrieve information.

    Returns SleevePerson

    Object containing information about this sleeve.

    Remarks

    RAM cost: 4 GB

    Return a person object for this sleeve

    storedCycles is the amount of Bonus Time in cycles, each translates to 200ms

  • Get price of an augmentation.

    Parameters

    • augName: string

      Name of Augmentation.

    Returns number

    Price of the augmentation.

    Remarks

    RAM cost: 4 GB

  • Get reputation requirement of an augmentation.

    Parameters

    • augName: string

      Name of Augmentation.

    Returns number

    Reputation requirement of the augmentation.

    Remarks

    RAM cost: 4 GB

  • Get augmentations installed on a sleeve.

    Parameters

    • sleeveNumber: number

      Index of the sleeve to retrieve augmentations from.

    Returns string[]

    List of augmentation names that this sleeve has installed.

    Remarks

    RAM cost: 4 GB

    Return a list of augmentation names that this sleeve has installed.

  • List purchasable augs for a sleeve.

    Parameters

    • sleeveNumber: number

      Index of the sleeve to retrieve purchasable augmentations from.

    Returns AugmentPair[]

    List of augmentations that the player can buy for this sleeve.

    Remarks

    RAM cost: 4 GB

    Return a list of augmentations that the player can buy for this sleeve.

  • Get task of a sleeve.

    Parameters

    • sleeveNumber: number

      Index of the sleeve to retrieve task from.

    Returns null | SleeveTask

    Object containing information for the current task that the sleeve is performing.

    Remarks

    RAM cost: 4 GB

    Return the current task that the sleeve is performing, or null if the sleeve is idle. All tasks have a "type" property, and other available properties depend on the type of task.

  • Purchase an aug for a sleeve.

    Parameters

    • sleeveNumber: number

      Index of the sleeve to buy an aug for.

    • augName: string

      Name of the aug to buy. Must be an exact match.

    Returns boolean

    True if the aug was purchased and installed on the sleeve, false otherwise.

    Remarks

    RAM cost: 4 GB

    Return true if the aug was purchased and installed on the sleeve.

  • Set a sleeve to perform Bladeburner actions.

    Parameters

    • sleeveNumber: number

      Index of the sleeve to perform a Bladeburner action.

    • action: string

      Name of the action to be performed.

    • Optional contract: string

      Name of the contract if applicable.

    Returns boolean

    True if the sleeve started the given Bladeburner action, false otherwise.

    Remarks

    RAM cost: 4 GB

    Return a boolean indicating whether or not the sleeve started a Bladeburner action.

  • Set a sleeve to commit crime.

    Parameters

    • sleeveNumber: number

      Index of the sleeve to start committing crime. Sleeves are numbered starting from 0.

    • crimeType: CrimeType | "Shoplift" | "Rob Store" | "Mug" | "Larceny" | "Deal Drugs" | "Bond Forgery" | "Traffick Arms" | "Homicide" | "Grand Theft Auto" | "Kidnap" | "Assassination" | "Heist"

      Name of the crime.

    Returns boolean

    True if this action was set successfully, false otherwise.

    Remarks

    RAM cost: 4 GB

    Return a boolean indicating whether or not this action was set successfully (false if an invalid action is specified).

    Example

    // Assigns the first sleeve to Homicide.
    ns.sleeve.setToCommitCrime(0, "Homicide");

    // Assigns the second sleeve to Grand Theft Auto, using enum
    const crimes = ns.enums.CrimeType;
    ns.sleeve.setToCommitCrime(1, crimes.grandTheftAuto)
  • Set a sleeve to work for a company.

    Parameters

    • sleeveNumber: number

      Index of the sleeve to work for the company.

    • companyName: CompanyName | "ECorp" | "MegaCorp" | "Bachman & Associates" | "Blade Industries" | "NWO" | "Clarke Incorporated" | "OmniTek Incorporated" | "Four Sigma" | "KuaiGong International" | "Fulcrum Technologies" | "Storm Technologies" | "DefComm" | "Helios Labs" | "VitaLife" | "Icarus Microsystems" | "Universal Energy" | "Galactic Cybersystems" | "AeroCorp" | "Omnia Cybersystems" | "Solaris Space Systems" | "DeltaOne" | "Global Pharmaceuticals" | "Nova Medical" | "Central Intelligence Agency" | "National Security Agency" | "Watchdog Security" | "LexoCorp" | "Rho Construction" | "Alpha Enterprises" | "Aevum Police Headquarters" | "SysCore Securities" | "CompuTek" | "NetLink Technologies" | "Carmichael Security" | "FoodNStuff" | "Joe's Guns" | "Omega Software" | "Noodle Bar"

      Name of the company to work for.

    Returns boolean

    True if the sleeve started working for this company, false otherwise.

    Remarks

    RAM cost: 4 GB

    Return a boolean indicating whether or not the sleeve started working for a company.

  • Set a sleeve to work for a faction.

    Parameters

    • sleeveNumber: number

      Index of the sleeve to work for the faction.

    • factionName: string

      Name of the faction to work for.

    • factionWorkType: FactionWorkType | "hacking" | "field" | "security"

      Name of the action to perform for this faction.

    Returns undefined | boolean

    True if the sleeve started working for this faction, false otherwise. Can also throw on errors.

    Remarks

    RAM cost: 4 GB

    Return a boolean indicating whether or not the sleeve started working for a faction.

  • Set a sleeve to workout at the gym.

    Parameters

    • sleeveNumber: number

      Index of the sleeve to workout at the gym.

    • gymName: string

      Name of the gym.

    • stat: string

      Name of the stat to train.

    Returns boolean

    True if the sleeve started working out, false otherwise.

    Remarks

    RAM cost: 4 GB

    Return a boolean indicating whether or not the sleeve started working out.

  • Set a sleeve to idle.

    Parameters

    • sleeveNumber: number

      Index of the sleeve to idle.

    Returns void

    Remarks

    RAM cost: 4 GB

  • Set a sleeve to shock recovery.

    Parameters

    • sleeveNumber: number

      Index of the sleeve to start recovery.

    Returns boolean

    True if this action was set successfully, false otherwise.

    Remarks

    RAM cost: 4 GB

    Return a boolean indicating whether or not this action was set successfully.

  • Set a sleeve to synchronize.

    Parameters

    • sleeveNumber: number

      Index of the sleeve to start synchronizing.

    Returns boolean

    True if this action was set successfully, false otherwise.

    Remarks

    RAM cost: 4 GB

    Return a boolean indicating whether or not this action was set successfully.

  • Set a sleeve to take a class at a university.

    Parameters

    • sleeveNumber: number

      Index of the sleeve to start taking class.

    • university: string

      Name of the university to attend.

    • className: string

      Name of the class to follow.

    Returns boolean

    True if this action was set successfully, false otherwise.

    Remarks

    RAM cost: 4 GB

    Return a boolean indicating whether or not this action was set successfully.

  • Make a sleeve travel to another city.

    Parameters

    • sleeveNumber: number

      Index of the sleeve to travel.

    • city: CityName | "Aevum" | "Chongqing" | "Sector-12" | "New Tokyo" | "Ishima" | "Volhaven"

      Name of the destination city.

    Returns boolean

    True if the sleeve reached destination, false otherwise.

    Remarks

    RAM cost: 4 GB

    Return a boolean indicating whether or not the sleeve reached destination.