2022-10-21 17:16:00 +02:00
|
|
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
|
2022-11-24 14:19:51 +01:00
|
|
|
[Home](./index.md) > [bitburner](./bitburner.md) > [Sleeve](./bitburner.sleeve.md) > [setToCommitCrime](./bitburner.sleeve.settocommitcrime.md)
|
2022-10-21 17:16:00 +02:00
|
|
|
|
2022-11-24 14:19:51 +01:00
|
|
|
## Sleeve.setToCommitCrime() method
|
2022-10-21 17:16:00 +02:00
|
|
|
|
|
|
|
Set a sleeve to commit crime.
|
|
|
|
|
2023-02-11 19:18:50 +01:00
|
|
|
**Signature:**
|
2022-10-21 17:16:00 +02:00
|
|
|
|
|
|
|
```typescript
|
2022-11-20 18:07:22 +01:00
|
|
|
setToCommitCrime(sleeveNumber: number, crimeType: CrimeType | `${CrimeType}`): boolean;
|
2022-10-21 17:16:00 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
|
|
|
| Parameter | Type | Description |
|
|
|
|
| --- | --- | --- |
|
|
|
|
| sleeveNumber | number | Index of the sleeve to start committing crime. Sleeves are numbered starting from 0. |
|
2022-11-20 18:07:22 +01:00
|
|
|
| crimeType | [CrimeType](./bitburner.crimetype.md) \| \`${[CrimeType](./bitburner.crimetype.md)<!-- -->}\` | |
|
2022-10-21 17:16:00 +02:00
|
|
|
|
2023-02-11 19:18:50 +01:00
|
|
|
**Returns:**
|
2022-10-21 17:16:00 +02:00
|
|
|
|
|
|
|
boolean
|
|
|
|
|
|
|
|
True if this action was set successfully, false otherwise.
|
|
|
|
|
|
|
|
## Remarks
|
|
|
|
|
|
|
|
RAM cost: 4 GB
|
|
|
|
|
2022-11-20 18:07:22 +01:00
|
|
|
Return a boolean indicating whether or not this action was set successfully (false if an invalid action is specified).
|
2022-10-21 17:16:00 +02:00
|
|
|
|
2022-12-30 02:28:53 +01:00
|
|
|
## Example
|
2022-10-21 17:16:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
```ts
|
2022-12-30 02:28:53 +01:00
|
|
|
// Assigns the first sleeve to Homicide.
|
|
|
|
ns.sleeve.setToCommitCrime(0, "Homicide");
|
2022-10-21 17:16:00 +02:00
|
|
|
|
2022-12-30 02:28:53 +01:00
|
|
|
// Assigns the second sleeve to Grand Theft Auto, using enum
|
|
|
|
const crimes = ns.enums.CrimeType;
|
|
|
|
ns.sleeve.setToCommitCrime(1, crimes.grandTheftAuto)
|
2022-10-21 17:16:00 +02:00
|
|
|
```
|
|
|
|
|