bitburner-src/markdown/bitburner.ns.hackanalyzepercent.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; [NS](./bitburner.ns.md) &gt; [hackAnalyzePercent](./bitburner.ns.hackanalyzepercent.md)
## NS.hackAnalyzePercent() method
Returns the percentage of the specified servers 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
2021-10-30 21:46:34 +02:00
hackAnalyzePercent(host: string): 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. |
2021-10-30 18:34:14 +02:00
<b>Returns:</b>
number
The percentage of money you will steal from the target server with a single hack.
## Remarks
2021-10-30 21:46:34 +02:00
RAM cost: 1 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
//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.
```