mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 15:28:43 +02:00
executeCommand has been removed in favor of connect and manualHack, which is what people have been asking for.
This commit is contained in:
20
doc/source/netscript/singularityfunctions/connect.rst
Normal file
20
doc/source/netscript/singularityfunctions/connect.rst
Normal file
@@ -0,0 +1,20 @@
|
||||
connect() Netscript Function
|
||||
============================
|
||||
|
||||
.. js:function:: connect(hostname)
|
||||
|
||||
:RAM cost: 2 GB
|
||||
:param string hostname: hostname of the server to connect.
|
||||
:returns: ``true`` if the connection was a success.
|
||||
|
||||
If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to use this function.
|
||||
|
||||
This function will connect you to the specified server if it's directly connected to the current server.
|
||||
You can also pass in 'home' to return to your home server from anywhere.
|
||||
|
||||
Examples:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
connect("joesguns");
|
||||
connect("CSEC");
|
||||
@@ -1,21 +0,0 @@
|
||||
executeCommand() Netscript Function
|
||||
========================================
|
||||
|
||||
.. js:function:: executeCommand(command)
|
||||
|
||||
:RAM cost: 4 GB
|
||||
:param string commands: The full string of the command.
|
||||
|
||||
If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to use this function.
|
||||
|
||||
This function writes the command to the terminal and executes it. This
|
||||
can be used to perform manual hacks. Only one command can be sent at a time.
|
||||
|
||||
Examples:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
await ns.executeCommand('connect CSEC');
|
||||
await ns.executeCommand('hack');
|
||||
await ns.executeCommand('home');
|
||||
// a manual hack will be performed and CSEC will invite you.
|
||||
24
doc/source/netscript/singularityfunctions/manualHack.rst
Normal file
24
doc/source/netscript/singularityfunctions/manualHack.rst
Normal file
@@ -0,0 +1,24 @@
|
||||
manualHack() Netscript Function
|
||||
===============================
|
||||
|
||||
.. js:function:: manualHack()
|
||||
|
||||
:RAM cost: 2 GB
|
||||
:returns: The amount of money stolen if the hack is successful, and zero otherwise
|
||||
|
||||
If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to use this function.
|
||||
|
||||
This function will perform a manual hack on the server you are currently connected to.
|
||||
This is typically required to join factions.
|
||||
|
||||
Examples:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
connect("CSEC");
|
||||
manualHack();
|
||||
|
||||
.. warning::
|
||||
For NS2 users:
|
||||
|
||||
This function is async.
|
||||
Reference in New Issue
Block a user