mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-09 17:23:53 +01:00
40 lines
1.1 KiB
Markdown
40 lines
1.1 KiB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||
|
||
[Home](./index.md) > [bitburner](./bitburner.md) > [NS](./bitburner.ns.md) > [hackAnalyzePercent](./bitburner.ns.hackanalyzepercent.md)
|
||
|
||
## NS.hackAnalyzePercent() method
|
||
|
||
Returns the percentage of the specified server’s money you will steal with a single hack. This value is returned in percentage form, not decimal (Netscript functions typically return in decimal form, but not this one).
|
||
|
||
<b>Signature:</b>
|
||
|
||
```typescript
|
||
hackAnalyzePercent(host: string): number;
|
||
```
|
||
|
||
## Parameters
|
||
|
||
| Parameter | Type | Description |
|
||
| --- | --- | --- |
|
||
| host | string | Hostname of the target server. |
|
||
|
||
<b>Returns:</b>
|
||
|
||
number
|
||
|
||
The percentage of money you will steal from the target server with a single hack.
|
||
|
||
## Remarks
|
||
|
||
RAM cost: 1 GB
|
||
|
||
## Example
|
||
|
||
|
||
```ts
|
||
//For example, assume the following returns 1:
|
||
hackAnalyzePercent("foodnstuff");
|
||
//This means that if hack the foodnstuff server, then you will steal 1% of its total money. If you hack using N threads, then you will steal N% of its total money.
|
||
```
|
||
|