2019-03-02 19:08:54 -08:00
|
|
|
killall() Netscript Function
|
|
|
|
============================
|
|
|
|
|
2023-02-24 13:57:17 +02:00
|
|
|
.. js:function:: killall([hostname = current hostname[, safetyguard = true]])
|
2019-03-02 19:08:54 -08:00
|
|
|
|
|
|
|
:RAM cost: 0.5 GB
|
2021-03-12 02:51:56 -05:00
|
|
|
:param string hostname: Hostname of the server on which to kill all scripts.
|
2023-01-06 14:43:09 +02:00
|
|
|
:param boolean safetyguard: Whether the function will safeguard the current script or not.
|
2021-03-12 02:51:56 -05:00
|
|
|
:returns: ``true`` if scripts were killed on target server.
|
2019-03-02 19:08:54 -08:00
|
|
|
|
2021-03-12 02:51:56 -05:00
|
|
|
Kills all running scripts on the specified server.
|
|
|
|
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
.. code-block:: javascript
|
|
|
|
|
2023-01-06 14:43:09 +02:00
|
|
|
ns.killall('foodnstuff'); // returns: true
|
|
|
|
|
|
|
|
.. code-block:: javascript
|
|
|
|
|
|
|
|
ns.killall(); // returns: true, kills all scripts on the current server, except the current script
|
|
|
|
ns.killall(); // returns: false, because all no available scripts are running anymore
|
|
|
|
ns.killall(ns.getHostname(),false) // returns: true, but also kills the current script
|