bitburner-src/markdown/bitburner.ns.hackanalyzepercent.md
Olivier Gagnon feb0430aff work on doc
2021-10-30 15:46:34 -04:00

1.1 KiB
Raw Blame History

Home > bitburner > NS > hackAnalyzePercent

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).

Signature:

hackAnalyzePercent(host: string): number;

Parameters

Parameter Type Description
host string Hostname of the target server.

Returns:

number

The percentage of money you will steal from the target server with a single hack.

Remarks

RAM cost: 1 GB

Example

//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.