mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-23 22:52:29 +01:00
Added ram costs to docs
This commit is contained in:
parent
44ed46fc7a
commit
4736363e74
@ -13,6 +13,7 @@ hack
|
|||||||
|
|
||||||
:param string hostname/ip: IP or hostname of the target server to hack
|
:param string hostname/ip: IP or hostname of the target server to hack
|
||||||
:returns: The amount of money stolen if the hack is successful, and zero otherwise
|
:returns: The amount of money stolen if the hack is successful, and zero otherwise
|
||||||
|
:ram cost: 0.1
|
||||||
|
|
||||||
Function that is used to try and hack servers to steal money and gain hacking experience. The runtime for this command depends
|
Function that is used to try and hack servers to steal money and gain hacking experience. The runtime for this command depends
|
||||||
on your hacking level and the target server's security level. In order to hack a server you must first gain root access
|
on your hacking level and the target server's security level. In order to hack a server you must first gain root access
|
||||||
@ -35,6 +36,7 @@ grow
|
|||||||
|
|
||||||
:param string hostname/ip: IP or hostname of the target server to grow
|
:param string hostname/ip: IP or hostname of the target server to grow
|
||||||
:returns: The number by which the money on the server was multiplied for the growth
|
:returns: The number by which the money on the server was multiplied for the growth
|
||||||
|
:ram cost: 0.15
|
||||||
|
|
||||||
Use your hacking skills to increase the amount of money available on a server. The runtime for this command depends on your hacking
|
Use your hacking skills to increase the amount of money available on a server. The runtime for this command depends on your hacking
|
||||||
level and the target server's security level. When grow() completes, the money available on a target server will be increased by a
|
level and the target server's security level. When grow() completes, the money available on a target server will be increased by a
|
||||||
@ -57,6 +59,7 @@ weaken
|
|||||||
:param string hostname.ip: IP or hostname of the target server to weaken
|
:param string hostname.ip: IP or hostname of the target server to weaken
|
||||||
:returns: The amount by which the target server's security level was decreased. This is equivalent to 0.05 multiplied
|
:returns: The amount by which the target server's security level was decreased. This is equivalent to 0.05 multiplied
|
||||||
by the number of script threads
|
by the number of script threads
|
||||||
|
:ram cost: 0.15
|
||||||
|
|
||||||
Use your hacking skills to attack a server's security, lowering the server's security level. The runtime for this command
|
Use your hacking skills to attack a server's security, lowering the server's security level. The runtime for this command
|
||||||
depends on your hacking level and the target server's security level. This function lowers the security level of the target
|
depends on your hacking level and the target server's security level. This function lowers the security level of the target
|
||||||
@ -75,6 +78,7 @@ sleep
|
|||||||
.. js:function:: sleep(n)
|
.. js:function:: sleep(n)
|
||||||
|
|
||||||
:param number n: Number of milliseconds to sleep
|
:param number n: Number of milliseconds to sleep
|
||||||
|
:ram cost: 0
|
||||||
|
|
||||||
Suspends the script for n milliseconds.
|
Suspends the script for n milliseconds.
|
||||||
|
|
||||||
@ -84,6 +88,7 @@ print
|
|||||||
.. js:function:: print(x)
|
.. js:function:: print(x)
|
||||||
|
|
||||||
:param x: Value to be printed
|
:param x: Value to be printed
|
||||||
|
:ram cost: 0
|
||||||
|
|
||||||
Prints a value or a variable to the script's logs.
|
Prints a value or a variable to the script's logs.
|
||||||
|
|
||||||
@ -93,6 +98,7 @@ tprint
|
|||||||
.. js:function:: tprint(x)
|
.. js:function:: tprint(x)
|
||||||
|
|
||||||
:param x: Value to be printed
|
:param x: Value to be printed
|
||||||
|
:ram cost: 0
|
||||||
|
|
||||||
Prints a value or a variable to the Terminal
|
Prints a value or a variable to the Terminal
|
||||||
|
|
||||||
@ -101,6 +107,8 @@ clearLog
|
|||||||
|
|
||||||
.. js:function:: clearLog()
|
.. js:function:: clearLog()
|
||||||
|
|
||||||
|
:ram cost: 0
|
||||||
|
|
||||||
Clears the script's logs
|
Clears the script's logs
|
||||||
|
|
||||||
disableLog
|
disableLog
|
||||||
@ -109,6 +117,7 @@ disableLog
|
|||||||
.. js:function:: disableLog(fn)
|
.. js:function:: disableLog(fn)
|
||||||
|
|
||||||
:param string fn: Name of function for which to disable logging
|
:param string fn: Name of function for which to disable logging
|
||||||
|
:ram cost: 0
|
||||||
|
|
||||||
Disables logging for the given function. Logging can be disabled for
|
Disables logging for the given function. Logging can be disabled for
|
||||||
all functions by passing 'ALL' as the argument.
|
all functions by passing 'ALL' as the argument.
|
||||||
@ -125,6 +134,7 @@ enableLog
|
|||||||
.. js:function:: enableLog(fn)
|
.. js:function:: enableLog(fn)
|
||||||
|
|
||||||
:param string fn: Name of function for which to enable logging
|
:param string fn: Name of function for which to enable logging
|
||||||
|
:ram cost: 0
|
||||||
|
|
||||||
Re-enables logging for the given function. If 'ALL' is passed into this function
|
Re-enables logging for the given function. If 'ALL' is passed into this function
|
||||||
as an argument, then it will revert the effects of disableLog('ALL')
|
as an argument, then it will revert the effects of disableLog('ALL')
|
||||||
@ -135,6 +145,7 @@ isLogEnabled
|
|||||||
.. js:function:: isLogEnabled(fn)
|
.. js:function:: isLogEnabled(fn)
|
||||||
|
|
||||||
:param string fn: Name of function to check
|
:param string fn: Name of function to check
|
||||||
|
:ram cost: 0
|
||||||
|
|
||||||
Returns a boolean indicating whether or not logging is enabled for that
|
Returns a boolean indicating whether or not logging is enabled for that
|
||||||
function (or 'ALL')
|
function (or 'ALL')
|
||||||
@ -144,6 +155,8 @@ getScriptLogs
|
|||||||
|
|
||||||
.. js:function:: getScriptLogs()
|
.. js:function:: getScriptLogs()
|
||||||
|
|
||||||
|
:ram cost: 0
|
||||||
|
|
||||||
Returns the script's logs. The logs are returned as an array, where each
|
Returns the script's logs. The logs are returned as an array, where each
|
||||||
line is an element in the array. The most recently logged line is at the
|
line is an element in the array. The most recently logged line is at the
|
||||||
end of the array.
|
end of the array.
|
||||||
@ -158,6 +171,7 @@ scan
|
|||||||
|
|
||||||
:param string hostname/ip: IP or hostname of the server to scan
|
:param string hostname/ip: IP or hostname of the server to scan
|
||||||
:param boolean: Optional boolean specifying whether the function should output hostnames (if true) or IP addresses (if false)
|
:param boolean: Optional boolean specifying whether the function should output hostnames (if true) or IP addresses (if false)
|
||||||
|
:ram cost: 0.2
|
||||||
|
|
||||||
Returns an array containing the hostnames or IPs of all servers that are one node way from the specified target server. The
|
Returns an array containing the hostnames or IPs of all servers that are one node way from the specified target server. The
|
||||||
hostnames/IPs in the returned array are strings.
|
hostnames/IPs in the returned array are strings.
|
||||||
@ -168,6 +182,7 @@ nuke
|
|||||||
.. js:function:: nuke(hostname/ip)
|
.. js:function:: nuke(hostname/ip)
|
||||||
|
|
||||||
:param string hostname/ip: IP or hostname of the target server
|
:param string hostname/ip: IP or hostname of the target server
|
||||||
|
:ram cost: 0
|
||||||
|
|
||||||
Runs the NUKE.exe program on the target server. NUKE.exe must exist on your home computer.
|
Runs the NUKE.exe program on the target server. NUKE.exe must exist on your home computer.
|
||||||
|
|
||||||
@ -181,6 +196,7 @@ brutessh
|
|||||||
.. js:function:: brutessh(hostname/ip)
|
.. js:function:: brutessh(hostname/ip)
|
||||||
|
|
||||||
:param string hostname/ip: IP or hostname of the target server
|
:param string hostname/ip: IP or hostname of the target server
|
||||||
|
:ram cost: 0
|
||||||
|
|
||||||
Runs the BruteSSH.exe program on the target server. BruteSSH.exe must exist on your home computer.
|
Runs the BruteSSH.exe program on the target server. BruteSSH.exe must exist on your home computer.
|
||||||
|
|
||||||
@ -194,6 +210,7 @@ ftpcrack
|
|||||||
.. js:function:: ftpcrack(hostname/ip)
|
.. js:function:: ftpcrack(hostname/ip)
|
||||||
|
|
||||||
:param string hostname/ip: IP or hostname of the target server
|
:param string hostname/ip: IP or hostname of the target server
|
||||||
|
:ram cost: 0
|
||||||
|
|
||||||
Runs the FTPCrack.exe program on the target server. FTPCrack.exe must exist on your home computer.
|
Runs the FTPCrack.exe program on the target server. FTPCrack.exe must exist on your home computer.
|
||||||
|
|
||||||
@ -207,6 +224,7 @@ relaysmtp
|
|||||||
.. js:function:: relaysmtp(hostname/ip)
|
.. js:function:: relaysmtp(hostname/ip)
|
||||||
|
|
||||||
:param string hostname/ip: IP or hostname of the target server
|
:param string hostname/ip: IP or hostname of the target server
|
||||||
|
:ram cost: 0
|
||||||
|
|
||||||
Runs the relaySMTP.exe program on the target server. relaySMTP.exe must exist on your home computer.
|
Runs the relaySMTP.exe program on the target server. relaySMTP.exe must exist on your home computer.
|
||||||
|
|
||||||
@ -220,6 +238,7 @@ httpworm
|
|||||||
.. js:function:: httpworm(hostname/ip)
|
.. js:function:: httpworm(hostname/ip)
|
||||||
|
|
||||||
:param string hostname/ip: IP or hostname of the target server
|
:param string hostname/ip: IP or hostname of the target server
|
||||||
|
:ram cost: 0
|
||||||
|
|
||||||
Runs the HTTPWorm.exe program on the target server. HTTPWorm.exe must exist on your home computer.
|
Runs the HTTPWorm.exe program on the target server. HTTPWorm.exe must exist on your home computer.
|
||||||
|
|
||||||
@ -233,6 +252,7 @@ sqlinject
|
|||||||
.. js:function:: sqlinject(hostname/ip)
|
.. js:function:: sqlinject(hostname/ip)
|
||||||
|
|
||||||
:param string hostname/ip: IP or hostname of the target server
|
:param string hostname/ip: IP or hostname of the target server
|
||||||
|
:ram cost: 0
|
||||||
|
|
||||||
Runs the SQLInject.exe program on the target server. SQLInject.exe must exist on your home computer.
|
Runs the SQLInject.exe program on the target server. SQLInject.exe must exist on your home computer.
|
||||||
|
|
||||||
@ -250,6 +270,7 @@ run
|
|||||||
:param args...:
|
:param args...:
|
||||||
Additional arguments to pass into the new script that is being run. Note that if any arguments are being
|
Additional arguments to pass into the new script that is being run. Note that if any arguments are being
|
||||||
passed into the new script, then the second argument *numThreads* must be filled in with a value.
|
passed into the new script, then the second argument *numThreads* must be filled in with a value.
|
||||||
|
:ram cost: 1
|
||||||
|
|
||||||
Run a script as a separate process. This function can only be used to run scripts located on the current server (the server
|
Run a script as a separate process. This function can only be used to run scripts located on the current server (the server
|
||||||
running the script that calls this function).
|
running the script that calls this function).
|
||||||
@ -282,6 +303,7 @@ exec
|
|||||||
:param args...:
|
:param args...:
|
||||||
Additional arguments to pass into the new script that is being run. Note that if any arguments are being
|
Additional arguments to pass into the new script that is being run. Note that if any arguments are being
|
||||||
passed into the new script, then the third argument *numThreads* must be filled in with a value.
|
passed into the new script, then the third argument *numThreads* must be filled in with a value.
|
||||||
|
:ram cost: 1.3
|
||||||
|
|
||||||
Run a script as a separate process on a specified server. This is similar to the *run* function except
|
Run a script as a separate process on a specified server. This is similar to the *run* function except
|
||||||
that it can be used to run a script on any server, instead of just the current server.
|
that it can be used to run a script on any server, instead of just the current server.
|
||||||
@ -311,6 +333,7 @@ spawn
|
|||||||
:param number numThreads: Number of threads to spawn new script with. Will be rounded to nearest integer
|
:param number numThreads: Number of threads to spawn new script with. Will be rounded to nearest integer
|
||||||
:param args...:
|
:param args...:
|
||||||
Additional arguments to pass into the new script that is being run.
|
Additional arguments to pass into the new script that is being run.
|
||||||
|
:ram cost: 2
|
||||||
|
|
||||||
Terminates the current script, and then after a delay of about 20 seconds it will execute the newly-specified script.
|
Terminates the current script, and then after a delay of about 20 seconds it will execute the newly-specified script.
|
||||||
The purpose of this function is to execute a new script without being constrained by the RAM usage of the current one.
|
The purpose of this function is to execute a new script without being constrained by the RAM usage of the current one.
|
||||||
@ -330,6 +353,7 @@ kill
|
|||||||
:param string script: Filename of the script to kill
|
:param string script: Filename of the script to kill
|
||||||
:param string hostname/ip: IP or hostname of the server on which to kill the script
|
:param string hostname/ip: IP or hostname of the server on which to kill the script
|
||||||
:param args...: Arguments to identify which script to kill
|
:param args...: Arguments to identify which script to kill
|
||||||
|
:ram cost: 0.5
|
||||||
|
|
||||||
Kills the script on the target server specified by the script's name and arguments. Remember that scripts
|
Kills the script on the target server specified by the script's name and arguments. Remember that scripts
|
||||||
are uniquely identified by both their name and arguments. For example, if *foo.script* is run with the argument 1, then this
|
are uniquely identified by both their name and arguments. For example, if *foo.script* is run with the argument 1, then this
|
||||||
@ -357,6 +381,7 @@ killall
|
|||||||
.. js:function:: killall(hostname/ip)
|
.. js:function:: killall(hostname/ip)
|
||||||
|
|
||||||
:param string hostname/ip: IP or hostname of the server on which to kill all scripts
|
:param string hostname/ip: IP or hostname of the server on which to kill all scripts
|
||||||
|
:ram cost: 0.5
|
||||||
|
|
||||||
Kills all running scripts on the specified server. This function returns true if any scripts were killed, and
|
Kills all running scripts on the specified server. This function returns true if any scripts were killed, and
|
||||||
false otherwise. In other words, it will return true if there are any scripts running on the target server.
|
false otherwise. In other words, it will return true if there are any scripts running on the target server.
|
||||||
@ -367,6 +392,8 @@ exit
|
|||||||
|
|
||||||
.. js:function:: exit()
|
.. js:function:: exit()
|
||||||
|
|
||||||
|
:ram cost: 0
|
||||||
|
|
||||||
Terminates the current script immediately
|
Terminates the current script immediately
|
||||||
|
|
||||||
scp
|
scp
|
||||||
@ -379,6 +406,7 @@ scp
|
|||||||
Hostname or IP of the source server, which is the server from which the file will be copied.
|
Hostname or IP of the source server, which is the server from which the file will be copied.
|
||||||
This argument is optional and if it's omitted the source will be the current server.
|
This argument is optional and if it's omitted the source will be the current server.
|
||||||
:param string destination: Hostname or IP of the destination server, which is the server to which the file will be copied.
|
:param string destination: Hostname or IP of the destination server, which is the server to which the file will be copied.
|
||||||
|
:ram cost: 0.6
|
||||||
|
|
||||||
Copies a script or literature (.lit) file(s) to another server. The *files* argument can be either a string specifying a
|
Copies a script or literature (.lit) file(s) to another server. The *files* argument can be either a string specifying a
|
||||||
single file to copy, or an array of strings specifying multiple files to copy.
|
single file to copy, or an array of strings specifying multiple files to copy.
|
||||||
@ -405,6 +433,7 @@ ls
|
|||||||
|
|
||||||
:param string hostname/ip: Hostname or IP of the target server
|
:param string hostname/ip: Hostname or IP of the target server
|
||||||
:param string grep: a substring to search for in the filename
|
:param string grep: a substring to search for in the filename
|
||||||
|
:ram cost: 0
|
||||||
|
|
||||||
Returns an array with the filenames of all files on the specified server (as strings). The returned array
|
Returns an array with the filenames of all files on the specified server (as strings). The returned array
|
||||||
is sorted in alphabetic order
|
is sorted in alphabetic order
|
||||||
@ -416,6 +445,7 @@ ps
|
|||||||
|
|
||||||
:param string ip: Hostname or IP address of the target server.
|
:param string ip: Hostname or IP address of the target server.
|
||||||
If not specified, it will be the current server's IP by default
|
If not specified, it will be the current server's IP by default
|
||||||
|
:ram cost: 0
|
||||||
|
|
||||||
Returns an array with general information about all scripts running on the specified
|
Returns an array with general information about all scripts running on the specified
|
||||||
target server. The information for each server is given in an object with
|
target server. The information for each server is given in an object with
|
||||||
@ -443,6 +473,7 @@ hasRootAccess
|
|||||||
.. js:function:: hasRootAccess(hostname/ip)
|
.. js:function:: hasRootAccess(hostname/ip)
|
||||||
|
|
||||||
:param string hostname/ip: Hostname or IP of the target server
|
:param string hostname/ip: Hostname or IP of the target server
|
||||||
|
:ram cost: 0.05
|
||||||
|
|
||||||
Returns a boolean indicating whether or not the player has root access to the specified target server.
|
Returns a boolean indicating whether or not the player has root access to the specified target server.
|
||||||
|
|
||||||
@ -457,6 +488,8 @@ getHostname
|
|||||||
|
|
||||||
.. js:function:: getHostname()
|
.. js:function:: getHostname()
|
||||||
|
|
||||||
|
:ram cost: 0.05
|
||||||
|
|
||||||
Returns a string with the hostname of the server that the script is running on
|
Returns a string with the hostname of the server that the script is running on
|
||||||
|
|
||||||
getHackingLevel
|
getHackingLevel
|
||||||
@ -464,6 +497,8 @@ getHackingLevel
|
|||||||
|
|
||||||
.. js:function:: getHackingLevel()
|
.. js:function:: getHackingLevel()
|
||||||
|
|
||||||
|
:ram cost: 0.05
|
||||||
|
|
||||||
Returns the player's current hacking level
|
Returns the player's current hacking level
|
||||||
|
|
||||||
getHackingMultipliers
|
getHackingMultipliers
|
||||||
@ -471,6 +506,8 @@ getHackingMultipliers
|
|||||||
|
|
||||||
.. js:function:: getHackingMultipliers()
|
.. js:function:: getHackingMultipliers()
|
||||||
|
|
||||||
|
:ram cost: 4
|
||||||
|
|
||||||
Returns an object containing the Player's hacking related multipliers. These multipliers are
|
Returns an object containing the Player's hacking related multipliers. These multipliers are
|
||||||
returned in fractional forms, not percentages (e.g. 1.5 instead of 150%). The object has the following structure::
|
returned in fractional forms, not percentages (e.g. 1.5 instead of 150%). The object has the following structure::
|
||||||
|
|
||||||
@ -492,6 +529,8 @@ getHacknetMultipliers
|
|||||||
|
|
||||||
.. js:function:: getHacknetMultipliers()
|
.. js:function:: getHacknetMultipliers()
|
||||||
|
|
||||||
|
:ram cost: 4
|
||||||
|
|
||||||
Returns an object containing the Player's hacknet related multipliers. These multipliers are
|
Returns an object containing the Player's hacknet related multipliers. These multipliers are
|
||||||
returned in fractional forms, not percentages (e.g. 1.5 instead of 150%). The object has the following structure::
|
returned in fractional forms, not percentages (e.g. 1.5 instead of 150%). The object has the following structure::
|
||||||
|
|
||||||
@ -517,6 +556,7 @@ getServerMoneyAvailable
|
|||||||
.. js:function:: getServerMoneyAvailable(hostname/ip)
|
.. js:function:: getServerMoneyAvailable(hostname/ip)
|
||||||
|
|
||||||
:param string hostname/ip: Hostname or IP of target server
|
:param string hostname/ip: Hostname or IP of target server
|
||||||
|
:ram cost: 0.1
|
||||||
|
|
||||||
Returns the amount of money available on a server. **Running this function on the home computer will return
|
Returns the amount of money available on a server. **Running this function on the home computer will return
|
||||||
the player's money.**
|
the player's money.**
|
||||||
@ -532,6 +572,7 @@ getServerMaxMoney
|
|||||||
.. js:function:: getServerMaxMoney(hostname/ip)
|
.. js:function:: getServerMaxMoney(hostname/ip)
|
||||||
|
|
||||||
:param string hostname/ip: Hostname or IP of target server
|
:param string hostname/ip: Hostname or IP of target server
|
||||||
|
:ram cost: 0.1
|
||||||
|
|
||||||
Returns the maximum amount of money that can be available on a server
|
Returns the maximum amount of money that can be available on a server
|
||||||
|
|
||||||
@ -541,6 +582,7 @@ getServerGrowth
|
|||||||
.. js:function:: getServerGrowth(hostname/ip)
|
.. js:function:: getServerGrowth(hostname/ip)
|
||||||
|
|
||||||
:param string hostname/ip: Hostname or IP of target server
|
:param string hostname/ip: Hostname or IP of target server
|
||||||
|
:ram cost: 0.1
|
||||||
|
|
||||||
Returns the server's instrinsic "growth parameter". This growth parameter is a number
|
Returns the server's instrinsic "growth parameter". This growth parameter is a number
|
||||||
between 1 and 100 that represents how quickly the server's money grows. This parameter affects the
|
between 1 and 100 that represents how quickly the server's money grows. This parameter affects the
|
||||||
@ -553,6 +595,7 @@ getServerSecurityLevel
|
|||||||
.. js:function:: getServerSecurityLevel(hostname/ip)
|
.. js:function:: getServerSecurityLevel(hostname/ip)
|
||||||
|
|
||||||
:param string hostname/ip: Hostname or IP of target server
|
:param string hostname/ip: Hostname or IP of target server
|
||||||
|
:ram cost: 0.1
|
||||||
|
|
||||||
Returns the security level of the target server. A server's security level is denoted by a number, typically
|
Returns the security level of the target server. A server's security level is denoted by a number, typically
|
||||||
between 1 and 100 (but it can go above 100).
|
between 1 and 100 (but it can go above 100).
|
||||||
@ -563,6 +606,7 @@ getServerBaseSecurityLevel
|
|||||||
.. js:function:: getServerBaseSecurityLevel(hostname/ip)
|
.. js:function:: getServerBaseSecurityLevel(hostname/ip)
|
||||||
|
|
||||||
:param string hostname/ip: Hostname or IP of target server
|
:param string hostname/ip: Hostname or IP of target server
|
||||||
|
:ram cost: 0.1
|
||||||
|
|
||||||
Returns the base security level of the target server. This is the security level that the server starts out with.
|
Returns the base security level of the target server. This is the security level that the server starts out with.
|
||||||
This is different than *getServerSecurityLevel()* because *getServerSecurityLevel()* returns the current
|
This is different than *getServerSecurityLevel()* because *getServerSecurityLevel()* returns the current
|
||||||
@ -575,6 +619,7 @@ getServerMinSecurityLevel
|
|||||||
.. js:function:: getServerMinSecurityLevel(hostname/ip)
|
.. js:function:: getServerMinSecurityLevel(hostname/ip)
|
||||||
|
|
||||||
:param string hostname/ip: Hostname or IP of target server
|
:param string hostname/ip: Hostname or IP of target server
|
||||||
|
:ram cost: 0.1
|
||||||
|
|
||||||
Returns the minimum security level of the target server
|
Returns the minimum security level of the target server
|
||||||
|
|
||||||
@ -584,6 +629,7 @@ getServerRequiredHackingLevel
|
|||||||
.. js:function:: getServerRequiredHackingLevel(hostname/ip)
|
.. js:function:: getServerRequiredHackingLevel(hostname/ip)
|
||||||
|
|
||||||
:param string hostname/ip: Hostname or IP of target server
|
:param string hostname/ip: Hostname or IP of target server
|
||||||
|
:ram cost: 0.1
|
||||||
|
|
||||||
Returns the required hacking level of the target server
|
Returns the required hacking level of the target server
|
||||||
|
|
||||||
@ -593,6 +639,7 @@ getServerNumPortsRequired
|
|||||||
.. js:function:: getServerNumPortsRequired(hostname/ip)
|
.. js:function:: getServerNumPortsRequired(hostname/ip)
|
||||||
|
|
||||||
:param string hostname/ip: Hostname or IP of target server
|
:param string hostname/ip: Hostname or IP of target server
|
||||||
|
:ram cost: 0.1
|
||||||
|
|
||||||
Returns the number of open ports required to successfully run NUKE.exe on the specified server.
|
Returns the number of open ports required to successfully run NUKE.exe on the specified server.
|
||||||
|
|
||||||
@ -602,6 +649,7 @@ getServerRam
|
|||||||
.. js:function:: getServerRam(hostname/ip)
|
.. js:function:: getServerRam(hostname/ip)
|
||||||
|
|
||||||
:param string hostname/ip: Hostname or IP of target server
|
:param string hostname/ip: Hostname or IP of target server
|
||||||
|
:ram cost: 0.1
|
||||||
|
|
||||||
Returns an array with two elements that gives information about a server's memory (RAM). The first
|
Returns an array with two elements that gives information about a server's memory (RAM). The first
|
||||||
element in the array is the amount of RAM that the server has total (in GB). The second element in
|
element in the array is the amount of RAM that the server has total (in GB). The second element in
|
||||||
@ -619,6 +667,7 @@ serverExists
|
|||||||
.. js:function:: serverExists(hostname/ip)
|
.. js:function:: serverExists(hostname/ip)
|
||||||
|
|
||||||
:param string hostname/ip: Hostname or IP of target server
|
:param string hostname/ip: Hostname or IP of target server
|
||||||
|
:ram cost: 0.1
|
||||||
|
|
||||||
Returns a boolean denoting whether or not the specified server exists
|
Returns a boolean denoting whether or not the specified server exists
|
||||||
|
|
||||||
@ -631,6 +680,7 @@ fileExists
|
|||||||
:param string hostname/ip:
|
:param string hostname/ip:
|
||||||
Hostname or IP of target server. This is optional. If it is not specified then the
|
Hostname or IP of target server. This is optional. If it is not specified then the
|
||||||
function will use the current server as the target server
|
function will use the current server as the target server
|
||||||
|
:ram cost: 0.1
|
||||||
|
|
||||||
Returns a boolean indicating whether the specified file exists on the target server. The filename
|
Returns a boolean indicating whether the specified file exists on the target server. The filename
|
||||||
for scripts is case-sensitive, but for other types of files it is not. For example, *fileExists("brutessh.exe")*
|
for scripts is case-sensitive, but for other types of files it is not. For example, *fileExists("brutessh.exe")*
|
||||||
@ -655,6 +705,7 @@ isRunning
|
|||||||
:param string filename: Filename of script to check. This is case-sensitive.
|
:param string filename: Filename of script to check. This is case-sensitive.
|
||||||
:param string hostname/ip: Hostname or IP of target server
|
:param string hostname/ip: Hostname or IP of target server
|
||||||
:param args...: Arguments to specify/identify which scripts to search for
|
:param args...: Arguments to specify/identify which scripts to search for
|
||||||
|
:ram cost: 0.1
|
||||||
|
|
||||||
Returns a boolean indicating whether the specified script is running on the target server. Remember that a script is
|
Returns a boolean indicating whether the specified script is running on the target server. Remember that a script is
|
||||||
uniquely identified by both its name and its arguments.
|
uniquely identified by both its name and its arguments.
|
||||||
@ -681,6 +732,8 @@ getNextHacknetNodeCost
|
|||||||
|
|
||||||
.. js:function:: getNextHacknetNodeCost()
|
.. js:function:: getNextHacknetNodeCost()
|
||||||
|
|
||||||
|
:ram cost: 0
|
||||||
|
|
||||||
Deprecated (no longer usable). See :doc:`netscripthacknetnodeapi`
|
Deprecated (no longer usable). See :doc:`netscripthacknetnodeapi`
|
||||||
|
|
||||||
purchaseHacknetNode
|
purchaseHacknetNode
|
||||||
@ -688,6 +741,8 @@ purchaseHacknetNode
|
|||||||
|
|
||||||
.. js:function:: purchaseHacknetNode()
|
.. js:function:: purchaseHacknetNode()
|
||||||
|
|
||||||
|
:ram cost: 0
|
||||||
|
|
||||||
Deprecated (no longer usable). See :doc:`netscripthacknetnodeapi`
|
Deprecated (no longer usable). See :doc:`netscripthacknetnodeapi`
|
||||||
|
|
||||||
getPurchasedServerCost
|
getPurchasedServerCost
|
||||||
@ -695,6 +750,8 @@ getPurchasedServerCost
|
|||||||
|
|
||||||
.. js:function:: getPurchasedServerCost(ram)
|
.. js:function:: getPurchasedServerCost(ram)
|
||||||
|
|
||||||
|
:ram cost: 0.25
|
||||||
|
|
||||||
:param number ram: Amount of RAM of a potential purchased server. Must be a power of 2 (2, 4, 8, 16, etc.). Maximum value of 1048576 (2^20)
|
:param number ram: Amount of RAM of a potential purchased server. Must be a power of 2 (2, 4, 8, 16, etc.). Maximum value of 1048576 (2^20)
|
||||||
|
|
||||||
Returns the cost to purchase a server with the specified amount of *ram*.
|
Returns the cost to purchase a server with the specified amount of *ram*.
|
||||||
@ -712,6 +769,7 @@ purchaseServer
|
|||||||
|
|
||||||
:param string hostname: Hostname of the purchased server
|
:param string hostname: Hostname of the purchased server
|
||||||
:param number ram: Amount of RAM of the purchased server. Must be a power of 2 (2, 4, 8, 16, etc.). Maximum value of 1048576 (2^20)
|
:param number ram: Amount of RAM of the purchased server. Must be a power of 2 (2, 4, 8, 16, etc.). Maximum value of 1048576 (2^20)
|
||||||
|
:ram cost: 2.25
|
||||||
|
|
||||||
Purchased a server with the specified hostname and amount of RAM.
|
Purchased a server with the specified hostname and amount of RAM.
|
||||||
|
|
||||||
@ -741,6 +799,7 @@ deleteServer
|
|||||||
.. js:function:: deleteServer(hostname)
|
.. js:function:: deleteServer(hostname)
|
||||||
|
|
||||||
:param string hostname: Hostname of the server to delete
|
:param string hostname: Hostname of the server to delete
|
||||||
|
:ram cost: 2.25
|
||||||
|
|
||||||
Deletes one of your purchased servers, which is specified by its hostname.
|
Deletes one of your purchased servers, which is specified by its hostname.
|
||||||
|
|
||||||
@ -757,6 +816,7 @@ getPurchasedServers
|
|||||||
:param boolean hostname:
|
:param boolean hostname:
|
||||||
Specifies whether hostnames or IP addresses should be returned. If it's true then hostnames will be returned, and if false
|
Specifies whether hostnames or IP addresses should be returned. If it's true then hostnames will be returned, and if false
|
||||||
then IPs will be returned. If this argument is omitted then it is true by default
|
then IPs will be returned. If this argument is omitted then it is true by default
|
||||||
|
:ram cost: 2.25
|
||||||
|
|
||||||
Returns an array with either the hostnames or IPs of all of the servers you have purchased.
|
Returns an array with either the hostnames or IPs of all of the servers you have purchased.
|
||||||
|
|
||||||
@ -765,6 +825,8 @@ getPurchasedServerLimit
|
|||||||
|
|
||||||
.. js:function:: getPurchasedServerLimit()
|
.. js:function:: getPurchasedServerLimit()
|
||||||
|
|
||||||
|
:ram cost: 0.05
|
||||||
|
|
||||||
Returns the maximum number of servers you can purchase
|
Returns the maximum number of servers you can purchase
|
||||||
|
|
||||||
getPurchasedServerMaxRam
|
getPurchasedServerMaxRam
|
||||||
@ -772,6 +834,8 @@ getPurchasedServerMaxRam
|
|||||||
|
|
||||||
.. js:function:: getPurchasedServerMaxRam()
|
.. js:function:: getPurchasedServerMaxRam()
|
||||||
|
|
||||||
|
:ram cost: 0.05
|
||||||
|
|
||||||
Returns the maximum RAM that a purchased server can have
|
Returns the maximum RAM that a purchased server can have
|
||||||
|
|
||||||
write
|
write
|
||||||
@ -782,6 +846,7 @@ write
|
|||||||
:param string/number port/fn: Port or text file/script that will be written to
|
:param string/number port/fn: Port or text file/script that will be written to
|
||||||
:param string data: Data to write
|
:param string data: Data to write
|
||||||
:param string mode: Defines the write mode. Only valid when writing to text files or scripts.
|
:param string mode: Defines the write mode. Only valid when writing to text files or scripts.
|
||||||
|
:ram cost: 1
|
||||||
|
|
||||||
This function can be used to either write data to a port, a text file (.txt), or a script (.script, .js, .ns)
|
This function can be used to either write data to a port, a text file (.txt), or a script (.script, .js, .ns)
|
||||||
|
|
||||||
@ -802,6 +867,7 @@ tryWrite
|
|||||||
:param number port: Port to be written to
|
:param number port: Port to be written to
|
||||||
:param string data: Data to try to write
|
:param string data: Data to try to write
|
||||||
:returns: True if the data is successfully written to the port, and false otherwise
|
:returns: True if the data is successfully written to the port, and false otherwise
|
||||||
|
:ram cost: 1
|
||||||
|
|
||||||
Attempts to write data to the specified Netscript Port. If the port is full, the data will
|
Attempts to write data to the specified Netscript Port. If the port is full, the data will
|
||||||
not be written. Otherwise, the data will be written normally
|
not be written. Otherwise, the data will be written normally
|
||||||
@ -812,6 +878,7 @@ read
|
|||||||
.. js:function:: read(port/fn)
|
.. js:function:: read(port/fn)
|
||||||
|
|
||||||
:param string/number port/fn: Port or text file to read from
|
:param string/number port/fn: Port or text file to read from
|
||||||
|
:ram cost: 1
|
||||||
|
|
||||||
This function is used to read data from a port, a text file (.txt), or a script (.script, .js, .ns)
|
This function is used to read data from a port, a text file (.txt), or a script (.script, .js, .ns)
|
||||||
|
|
||||||
@ -828,6 +895,7 @@ peek
|
|||||||
.. js:function:: peek(port)
|
.. js:function:: peek(port)
|
||||||
|
|
||||||
:param number port: Port to peek. Must be an integer between 1 and 20
|
:param number port: Port to peek. Must be an integer between 1 and 20
|
||||||
|
:ram cost: 1
|
||||||
|
|
||||||
This function is used to peek at the data from a port. It returns the first element in the specified port
|
This function is used to peek at the data from a port. It returns the first element in the specified port
|
||||||
without removing that element. If the port is empty, the string "NULL PORT DATA" will be returned.
|
without removing that element. If the port is empty, the string "NULL PORT DATA" will be returned.
|
||||||
@ -840,6 +908,7 @@ clear
|
|||||||
.. js:function:: clear(port/fn)
|
.. js:function:: clear(port/fn)
|
||||||
|
|
||||||
:param string/number port/fn: Port or text file to clear
|
:param string/number port/fn: Port or text file to clear
|
||||||
|
:ram cost: 1
|
||||||
|
|
||||||
This function is used to clear data in a `Netscript Ports <http://bitburner.wikia.com/wiki/Netscript_Ports>`_ or a text file.
|
This function is used to clear data in a `Netscript Ports <http://bitburner.wikia.com/wiki/Netscript_Ports>`_ or a text file.
|
||||||
|
|
||||||
@ -853,6 +922,7 @@ getPortHandle
|
|||||||
.. js:function:: getPortHandle(port)
|
.. js:function:: getPortHandle(port)
|
||||||
|
|
||||||
:param number port: Port number
|
:param number port: Port number
|
||||||
|
:ram cost: 10
|
||||||
|
|
||||||
Get a handle to a Netscript Port. See more details here: :ref:`netscript_ports`
|
Get a handle to a Netscript Port. See more details here: :ref:`netscript_ports`
|
||||||
|
|
||||||
@ -865,6 +935,7 @@ rm
|
|||||||
|
|
||||||
:param string fn: Filename of file to remove. Must include the extension
|
:param string fn: Filename of file to remove. Must include the extension
|
||||||
:returns: True if it successfully deletes the file, and false otherwise
|
:returns: True if it successfully deletes the file, and false otherwise
|
||||||
|
:ram cost: 1
|
||||||
|
|
||||||
Removes the specified file from the current server. This function works for every file type except message (.msg) files.
|
Removes the specified file from the current server. This function works for every file type except message (.msg) files.
|
||||||
|
|
||||||
@ -875,6 +946,7 @@ scriptRunning
|
|||||||
|
|
||||||
:param string scriptname: Filename of script to check. This is case-sensitive.
|
:param string scriptname: Filename of script to check. This is case-sensitive.
|
||||||
:param string hostname/ip: Hostname or IP of target server
|
:param string hostname/ip: Hostname or IP of target server
|
||||||
|
:ram cost: 1
|
||||||
|
|
||||||
Returns a boolean indicating whether any instance of the specified script is running on the target server, regardless of
|
Returns a boolean indicating whether any instance of the specified script is running on the target server, regardless of
|
||||||
its arguments.
|
its arguments.
|
||||||
@ -899,6 +971,7 @@ scriptKill
|
|||||||
|
|
||||||
:param string scriptname: Filename of script to kill. This is case-sensitive.
|
:param string scriptname: Filename of script to kill. This is case-sensitive.
|
||||||
:param string hostname/ip: Hostname or IP of target server
|
:param string hostname/ip: Hostname or IP of target server
|
||||||
|
:ram cost: 1
|
||||||
|
|
||||||
Kills all scripts with the specified filename on the target server specified by *hostname/ip*, regardless of arguments. Returns
|
Kills all scripts with the specified filename on the target server specified by *hostname/ip*, regardless of arguments. Returns
|
||||||
true if one or more scripts were successfully killed, and false if none were.
|
true if one or more scripts were successfully killed, and false if none were.
|
||||||
@ -908,6 +981,8 @@ getScriptName
|
|||||||
|
|
||||||
.. js:function:: getScriptName()
|
.. js:function:: getScriptName()
|
||||||
|
|
||||||
|
:ram cost: 0
|
||||||
|
|
||||||
Returns the current script name
|
Returns the current script name
|
||||||
|
|
||||||
getScriptRam
|
getScriptRam
|
||||||
@ -917,6 +992,7 @@ getScriptRam
|
|||||||
|
|
||||||
:param string scriptname: Filename of script. This is case-sensitive.
|
:param string scriptname: Filename of script. This is case-sensitive.
|
||||||
:param string hostname/ip: Hostname or IP of target server the script is located on. This is optional, If it is not specified then the function will se the current server as the target server.
|
:param string hostname/ip: Hostname or IP of target server the script is located on. This is optional, If it is not specified then the function will se the current server as the target server.
|
||||||
|
:ram cost: 0.1
|
||||||
|
|
||||||
Returns the amount of RAM required to run the specified script on the target server. Returns
|
Returns the amount of RAM required to run the specified script on the target server. Returns
|
||||||
0 if the script does not exist.
|
0 if the script does not exist.
|
||||||
@ -928,6 +1004,7 @@ getHackTime
|
|||||||
|
|
||||||
:param string hostname/ip: Hostname or IP of target server
|
:param string hostname/ip: Hostname or IP of target server
|
||||||
:param number hackLvl: Optional hacking level for the calculation. Defaults to player's current hacking level
|
:param number hackLvl: Optional hacking level for the calculation. Defaults to player's current hacking level
|
||||||
|
:ram cost: 0.05
|
||||||
|
|
||||||
Returns the amount of time in seconds it takes to execute the *hack()* Netscript function on the target server.
|
Returns the amount of time in seconds it takes to execute the *hack()* Netscript function on the target server.
|
||||||
|
|
||||||
@ -941,6 +1018,7 @@ getGrowTime
|
|||||||
|
|
||||||
:param string hostname/ip: Hostname or IP of target server
|
:param string hostname/ip: Hostname or IP of target server
|
||||||
:param number hackLvl: Optional hacking level for the calculation. Defaults to player's current hacking level
|
:param number hackLvl: Optional hacking level for the calculation. Defaults to player's current hacking level
|
||||||
|
:ram cost: 0.05
|
||||||
|
|
||||||
Returns the amount of time in seconds it takes to execute the *grow()* Netscript function on the target server.
|
Returns the amount of time in seconds it takes to execute the *grow()* Netscript function on the target server.
|
||||||
|
|
||||||
@ -954,6 +1032,7 @@ getWeakenTime
|
|||||||
|
|
||||||
:param string hostname/ip: Hostname or IP of target server
|
:param string hostname/ip: Hostname or IP of target server
|
||||||
:param number hackLvl: Optional hacking level for the calculation. Defaults to player's current hacking level
|
:param number hackLvl: Optional hacking level for the calculation. Defaults to player's current hacking level
|
||||||
|
:ram cost: 0.05
|
||||||
|
|
||||||
Returns the amount of time in seconds it takes to execute the *weaken()* Netscript function on the target server.
|
Returns the amount of time in seconds it takes to execute the *weaken()* Netscript function on the target server.
|
||||||
|
|
||||||
@ -968,6 +1047,7 @@ getScriptIncome
|
|||||||
:param string scriptname: Filename of script
|
:param string scriptname: Filename of script
|
||||||
:param string hostname/ip: Server on which script is running
|
:param string hostname/ip: Server on which script is running
|
||||||
:param args...: Arguments that the script is running with
|
:param args...: Arguments that the script is running with
|
||||||
|
:ram cost: 0.1
|
||||||
|
|
||||||
Returns the amount of income the specified script generates while online (when the game is open, does not apply for offline income).
|
Returns the amount of income the specified script generates while online (when the game is open, does not apply for offline income).
|
||||||
Remember that a script is uniquely identified by both its name and its arguments. So for example if you ran a script with the arguments
|
Remember that a script is uniquely identified by both its name and its arguments. So for example if you ran a script with the arguments
|
||||||
@ -986,6 +1066,7 @@ getScriptExpGain
|
|||||||
:param string scriptname: Filename of script
|
:param string scriptname: Filename of script
|
||||||
:param string hostname/ip: Server on which script is running
|
:param string hostname/ip: Server on which script is running
|
||||||
:param args...: Arguments that the script is running with
|
:param args...: Arguments that the script is running with
|
||||||
|
:ram cost: 0.1
|
||||||
|
|
||||||
Returns the amount of hacking experience the specified script generates while online (when the game is open, does not apply for offline experience gains).
|
Returns the amount of hacking experience the specified script generates while online (when the game is open, does not apply for offline experience gains).
|
||||||
Remember that a script is uniquely identified by both its name and its arguments.
|
Remember that a script is uniquely identified by both its name and its arguments.
|
||||||
@ -997,6 +1078,8 @@ getTimeSinceLastAug
|
|||||||
|
|
||||||
.. js:function:: getTimeSinceLastAug()
|
.. js:function:: getTimeSinceLastAug()
|
||||||
|
|
||||||
|
:ram cost: 0.05
|
||||||
|
|
||||||
Returns the amount of time in milliseconds that have passed since you last installed Augmentations
|
Returns the amount of time in milliseconds that have passed since you last installed Augmentations
|
||||||
|
|
||||||
sprintf
|
sprintf
|
||||||
@ -1004,6 +1087,8 @@ sprintf
|
|||||||
|
|
||||||
.. js:function:: sprintf()
|
.. js:function:: sprintf()
|
||||||
|
|
||||||
|
:ram cost: 0
|
||||||
|
|
||||||
See `this link <https://github.com/alexei/sprintf.js>`_ for details.
|
See `this link <https://github.com/alexei/sprintf.js>`_ for details.
|
||||||
|
|
||||||
vsprintf
|
vsprintf
|
||||||
@ -1011,6 +1096,8 @@ vsprintf
|
|||||||
|
|
||||||
.. js:function:: vsprintf()
|
.. js:function:: vsprintf()
|
||||||
|
|
||||||
|
:ram cost: 0
|
||||||
|
|
||||||
See `this link <https://github.com/alexei/sprintf.js>`_ for details.
|
See `this link <https://github.com/alexei/sprintf.js>`_ for details.
|
||||||
|
|
||||||
prompt
|
prompt
|
||||||
@ -1019,6 +1106,7 @@ prompt
|
|||||||
.. js:function:: prompt(txt)
|
.. js:function:: prompt(txt)
|
||||||
|
|
||||||
:param string txt: Text to appear in the prompt dialog box
|
:param string txt: Text to appear in the prompt dialog box
|
||||||
|
:ram cost: 0
|
||||||
|
|
||||||
Prompts the player with a dialog box with two options: "Yes" and "No". This function will return true if the player click "Yes" and
|
Prompts the player with a dialog box with two options: "Yes" and "No". This function will return true if the player click "Yes" and
|
||||||
false if the player clicks "No". The script's execution is halted until the player selects one of the options.
|
false if the player clicks "No". The script's execution is halted until the player selects one of the options.
|
||||||
@ -1031,6 +1119,7 @@ wget
|
|||||||
:param string url: URL to pull data from
|
:param string url: URL to pull data from
|
||||||
:param string target: Filename to write data to. Must be script or text file
|
:param string target: Filename to write data to. Must be script or text file
|
||||||
:param string ip: Optional hostname/ip of server for target file.
|
:param string ip: Optional hostname/ip of server for target file.
|
||||||
|
:ram cost: 0
|
||||||
|
|
||||||
Retrieves data from a URL and downloads it to a file on the specified server. The data can only
|
Retrieves data from a URL and downloads it to a file on the specified server. The data can only
|
||||||
be downloaded to a script (.script, .ns, .js) or a text file (.txt). If the file already exists,
|
be downloaded to a script (.script, .ns, .js) or a text file (.txt). If the file already exists,
|
||||||
@ -1057,4 +1146,6 @@ wget
|
|||||||
getFavorToDonate
|
getFavorToDonate
|
||||||
^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
:ram cost: 0.1
|
||||||
|
|
||||||
Returns the amount of Faction favor required to be able to donate to a faction.
|
Returns the amount of Faction favor required to be able to donate to a faction.
|
||||||
|
Loading…
Reference in New Issue
Block a user