2019-03-03 04:08:54 +01:00
|
|
|
killall() Netscript Function
|
|
|
|
============================
|
|
|
|
|
2023-02-24 12:57:17 +01:00
|
|
|
.. js:function:: killall([hostname = current hostname[, safetyguard = true]])
|
2019-03-03 04:08:54 +01:00
|
|
|
|
|
|
|
:RAM cost: 0.5 GB
|
2021-03-12 08:51:56 +01:00
|
|
|
:param string hostname: Hostname of the server on which to kill all scripts.
|
2023-01-06 13:43:09 +01:00
|
|
|
:param boolean safetyguard: Whether the function will safeguard the current script or not.
|
2021-03-12 08:51:56 +01:00
|
|
|
:returns: ``true`` if scripts were killed on target server.
|
2019-03-03 04:08:54 +01:00
|
|
|
|
2021-03-12 08:51:56 +01:00
|
|
|
Kills all running scripts on the specified server.
|
|
|
|
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
.. code-block:: javascript
|
|
|
|
|
2023-01-06 13:43:09 +01: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
|