bitburner-src/markdown/bitburner.singularity.purchaseprogram.md

40 lines
1.1 KiB
Markdown
Raw Normal View History

2021-10-30 18:34:14 +02:00
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Singularity](./bitburner.singularity.md) &gt; [purchaseProgram](./bitburner.singularity.purchaseprogram.md)
## Singularity.purchaseProgram() method
If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to use this function and the RAM cost is doubled.
This function allows you to automatically purchase programs. You MUST have a TOR router in order to use this function. The cost of purchasing programs using this function is the same as if you were purchasing them through the Dark Web using the Terminal buy command.
<b>Signature:</b>
```typescript
2021-10-30 21:46:34 +02:00
purchaseProgram(programName: Programs): boolean;
2021-10-30 18:34:14 +02:00
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
2021-10-30 21:46:34 +02:00
| programName | [Programs](./bitburner.programs.md) | Name of program to purchase. |
2021-10-30 18:34:14 +02:00
<b>Returns:</b>
boolean
True if the specified program is purchased, and false otherwise.
## Remarks
2021-10-30 21:46:34 +02:00
Singularity - Level 1
2021-10-30 18:34:14 +02:00
## Example
2021-10-30 21:46:34 +02:00
```ts
2021-10-30 18:34:14 +02:00
purchaseProgram("brutessh.exe");
```