mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 07:18:38 +02:00
v1.0.1
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
atExit() Netscript Function
|
||||
============================
|
||||
|
||||
.. js:function:: atExit(f)
|
||||
|
||||
:RAM cost: 0 GB
|
||||
:param function f: function to call when the script dies.
|
||||
|
||||
Runs when the script dies.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
function onDeath() {
|
||||
console.log('I died!!!')
|
||||
}
|
||||
atExit(onDeath);
|
||||
@@ -1,5 +1,5 @@
|
||||
autocomplete() Netscript Function
|
||||
============================
|
||||
=================================
|
||||
|
||||
.. warning:: This feature is not officially supported yet and the API might change. It is also only supported in ns2
|
||||
|
||||
@@ -32,7 +32,7 @@ autocomplete() Netscript Function
|
||||
|
||||
Terminal:
|
||||
|
||||
.. code-block:: javascript
|
||||
.. code-block:: bash
|
||||
|
||||
$ run demo.ns mega\t
|
||||
// results in
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
getBitNodeMultipliers() Netscript Function
|
||||
==========================================
|
||||
|
||||
.. js:function:: getBitNodeMultipliers()
|
||||
|
||||
:RAM cost: 4 GB
|
||||
|
||||
If you are not in BitNode-5, then you must have Source-File 5-1 in order to
|
||||
run this function.
|
||||
|
||||
Returns an object containing the current BitNode multipliers. The
|
||||
multipliers are returned in decimal forms (e.g. 1.5 instead of 150%). The
|
||||
multipliers represent the difference between the current BitNode and the
|
||||
original BitNode (BitNode-1). For example, if the *CrimeMoney* multiplier
|
||||
has a value of 0.1, then that means that committing crimes in the current
|
||||
BitNode will only give 10% of the money you would have received in
|
||||
BitNode-1.
|
||||
|
||||
The structure of the returned object is subject to change as BitNode
|
||||
multipliers get added to the game. Refer to the `source code here
|
||||
<https://github.com/danielyxie/bitburner/blob/master/src/BitNode/BitNodeMultipliers.ts>`_
|
||||
to see the name of the BitNode multipliers.
|
||||
|
||||
Example::
|
||||
|
||||
mults = getBitNodeMultipliers();
|
||||
print(mults.ServerMaxMoney);
|
||||
print(mults.HackExpGain);
|
||||
@@ -1,38 +0,0 @@
|
||||
getServer() Netscript Function
|
||||
==========================================
|
||||
|
||||
.. js:function:: getServer([hostname])
|
||||
|
||||
:RAM cost: 2 GB
|
||||
:param string hostname: Hostname of the server, defaults to host server.
|
||||
|
||||
This function is meant to be used in conjunction with the :doc:`formulas API<../netscriptformulasapi>`.
|
||||
|
||||
Returns an object with the Server's stats. The object has the following properties::
|
||||
|
||||
{
|
||||
cpuCores
|
||||
ftpPortOpen
|
||||
hasAdminRights
|
||||
hostname
|
||||
httpPortOpen
|
||||
ip
|
||||
isConnectedTo
|
||||
maxRam
|
||||
organizationName
|
||||
ramUsed
|
||||
smtpPortOpen
|
||||
sqlPortOpen
|
||||
sshPortOpen
|
||||
baseDifficulty
|
||||
hackDifficulty
|
||||
backdoorInstalled
|
||||
minDifficulty
|
||||
moneyAvailable
|
||||
moneyMax
|
||||
numOpenPortsRequired
|
||||
openPortCount
|
||||
purchasedByPlayer
|
||||
requiredHackingSkill
|
||||
serverGrowth
|
||||
}
|
||||
Reference in New Issue
Block a user