work to make documentation unified.

This commit is contained in:
Olivier Gagnon
2021-03-12 02:51:56 -05:00
parent a00c253dcb
commit 2ce6ff2041
176 changed files with 1325 additions and 916 deletions

View File

@@ -1,20 +1,22 @@
hackAnalyzePercent() Netscript Function
=======================================
.. js:function:: hackAnalyzePercent(hostname/ip)
.. js:function:: hackAnalyzePercent(hostname)
:param string hostname/ip: IP or hostname of target server
:returns: The percentage of money you will steal from the target server with a single hack
:RAM cost: 1 GB
:param string hostname: Hostname of target server.
:returns: The percentage of money you will steal from the target server with
a single hack.
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).**
single hack. This value is returned in percentage form, not decimal.
For example, assume the following returns 1::
For example, assume the following returns 1:
hackAnalyzePercent("foodnstuff");
.. code-block:: javascript
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
hackAnalyzePercent("foodnstuff"); // returns: 1
This means that if hack the 'foodnstuff' server, then you will steal 1% of its
total money. If you :doc:`hack<hack>` using N threads, then you will steal N% of its total
money.