bitburner-src/markdown/bitburner.ns.grow.md

42 lines
1.6 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; [NS](./bitburner.ns.md) &gt; [grow](./bitburner.ns.grow.md)
## NS.grow() method
2021-10-30 21:46:34 +02:00
Use your hacking skills to increase the amount of money available on a server. The runtime for this command depends on your hacking level and the target servers security level. When `grow` completes, the money available on a target server will be increased by a certain, fixed percentage. This percentage is determined by the target servers growth rate (which varies between servers) and security level. Generally, higher-level servers have higher growth rates. The getServerGrowth() function can be used to obtain a servers growth rate.
2021-10-30 18:34:14 +02:00
2021-10-30 21:46:34 +02:00
Like hack, `grow` can be called on any server, regardless of where the script is running. The grow() command requires root access to the target server, but there is no required hacking level to run the command. It also raises the security level of the target server by 0.004.
2021-10-30 18:34:14 +02:00
<b>Signature:</b>
```typescript
2021-10-30 21:46:34 +02:00
grow(host: string, opts?: BasicHGWOptions): Promise<number>;
2021-10-30 18:34:14 +02:00
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
2021-10-30 21:46:34 +02:00
| host | string | Hostname of the target server to grow. |
2021-10-30 18:34:14 +02:00
| opts | [BasicHGWOptions](./bitburner.basichgwoptions.md) | Optional parameters for configuring function behavior. |
<b>Returns:</b>
Promise&lt;number&gt;
The number by which the money on the server was multiplied for the growth.
## Remarks
2021-10-30 21:46:34 +02:00
RAM cost: 0.15 GB
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
grow("foodnstuff");
grow("foodnstuff", { threads: 5 }); // Only use 5 threads to grow
```