diff --git a/doc/source/advancedgameplay/bitnodes.rst b/doc/source/advancedgameplay/bitnodes.rst index ce89e48e5..10126b820 100644 --- a/doc/source/advancedgameplay/bitnodes.rst +++ b/doc/source/advancedgameplay/bitnodes.rst @@ -32,7 +32,7 @@ Nodes are significantly less profitable. Servers have less money on them and low growth rates, but it is easier to lower their security level using the weaken() Netscript function. Furthermore, some BitNodes introduce new content and mechanics. For example there is one -BitNode that grants access to the :ref:`Netscript Singularity Functions `. +BitNode that grants access to the `Singularity API `_. There is another BitNode in which you can manage a gang to earn money and reputation. How to destroy a BitNode diff --git a/doc/source/advancedgameplay/sourcefiles.rst b/doc/source/advancedgameplay/sourcefiles.rst index 52a4bf46c..051d44a19 100644 --- a/doc/source/advancedgameplay/sourcefiles.rst +++ b/doc/source/advancedgameplay/sourcefiles.rst @@ -14,54 +14,52 @@ of level 3. List of all Source-Files ^^^^^^^^^^^^^^^^^^^^^^^^ -+------------------------------------+-------------------------------------------------------------------------------------+ -| BitNode-1: Source Genesis | * Lets the player start with 32 GB of RAM on home computer. | -| | * Increases all of the player's multipliers by 16%/24%/28%. | -+------------------------------------+-------------------------------------------------------------------------------------+ -| BitNode-2: Rise of the Underworld | * Lets the player create Gangs in other BitNodes (although some | -| | BitNodes will disable this mechanic). | -| | * Increases the player's crime success rate, crime money, and | -| | charisma multipliers by 24%/36%/42%. | -+------------------------------------+-------------------------------------------------------------------------------------+ -| BitNode-3: Corporatocracy | * Lets the player create Corporations in other BitNodes (although some | -| | BitNodes will disable this mechanic). | -| | * Increases the player's charisma and company salary multipliers by 8%/12%/14%. | -+------------------------------------+-------------------------------------------------------------------------------------+ -| BitNode-4: The Singularity | * Lets the player access and use Netscript Singularity Functions in other BitNodes. | -| | * Each level of this Source-File opens up more of the Singularity Functions to use. | -+------------------------------------+-------------------------------------------------------------------------------------+ -| BitNode-5: Artificial Intelligence | * Unlocks :ref:`gameplay_intelligence`. | -| | * Unlocks :js:func:`getBitNodeMultipliers` and start with Formulas.exe | -| | Netscript functions, as well as :ref:`netscriptformulas`. | -| | * Increases all of the player's hacking-related multipliers by 8%/12%/14%. | -+------------------------------------+-------------------------------------------------------------------------------------+ -| BitNode-6: Bladeburners | * Unlocks the Bladeburner feature in other BitNodes. | -| | * Increases all of the player's level and experience gain rate multipliers for | -| | combat stats by 8%/12%/14%. | -+------------------------------------+-------------------------------------------------------------------------------------+ -| BitNode-7: Bladeburners 2079 | * Allows the player to access the :ref:`netscript_bladeburnerapi` in other BitNodes.| -| | * Increases all of the player's Bladeburner multipliers by 8%/12%/14%. | -+------------------------------------+-------------------------------------------------------------------------------------+ -| BitNode-8: Ghost of Wall Street | * Increases the player's hacking growth multiplier by 12%/18%/21%. | -| | * Level 1 grants permanent access to :ref:`WSE ` and | -| | :ref:`TIX API `. | -| | * Level 2 grants permanent access to shorting stocks. | -| | * Level 3 grants permanent access to use limit/stop orders. | -+------------------------------------+-------------------------------------------------------------------------------------+ -| BitNode-9: Hacktocracy | * Level 1 permanently unlocks the Hacknet Server in other BitNodes. | -| | * Level 2 lets the player start with 128 GB of RAM on home computer. | -| | * Level 3 grants a highly-upgraded Hacknet Server when entering a new BitNode (it | -| | will be lost after installing augments). | -+------------------------------------+-------------------------------------------------------------------------------------+ -| BitNode-10: Digital Carbon | * Each level of this grants a Duplicate Sleeve. | -| | * Allows the player to access the :ref:`netscript_sleeveapi` in other BitNodes. | -+------------------------------------+-------------------------------------------------------------------------------------+ -| BitNode-11: The Big Crash | * Company favor increases both the player's salary and reputation gain at that | -| | company by 1% per favor (rather than just the reputation gain). | -| | * Increases the player's company salary and reputation gain multipliers by | -| | 32%/48%/56%. | -+------------------------------------+-------------------------------------------------------------------------------------+ -| BitNode-12: The Recursion | * There is no maximum level for this Source-File. | -| | * Lets the player start with Neuroflux Governor equal to the level of this | -| | Source-File. | -+------------------------------------+-------------------------------------------------------------------------------------+ ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +|| BitNode-1: Source Genesis || * Lets the player start with 32 GB of RAM on home computer. | +|| || * Increases all of the player's multipliers by 16%/24%/28%. | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +|| BitNode-2: Rise of the Underworld || * Lets the player create Gangs in other BitNodes (although some | +|| || BitNodes will disable this mechanic). | +|| || * Increases the player's crime success rate, crime money, and | +|| || charisma multipliers by 24%/36%/42%. | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +|| BitNode-3: Corporatocracy || * Lets the player create Corporations in other BitNodes (although some | +|| || BitNodes will disable this mechanic). | +|| || * Increases the player's charisma and company salary multipliers by 8%/12%/14%. | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +|| BitNode-4: The Singularity || * Lets the player access and use Netscript Singularity Functions in other BitNodes. | +|| || * Each level of this Source-File opens up more of the Singularity Functions to use. | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +|| BitNode-5: Artificial Intelligence || * Unlocks :ref:`gameplay_intelligence`. | +|| || * Unlocks :js:func:`getBitNodeMultipliers` and start with Formulas.exe. | +|| || * Increases all of the player's hacking-related multipliers by 8%/12%/14%. | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +|| BitNode-6: Bladeburners || * Unlocks the Bladeburner feature in other BitNodes. | +|| || * Increases all of the player's level and experience gain rate multipliers for | +|| || combat stats by 8%/12%/14%. | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +|| BitNode-7: Bladeburners 2079 || * Allows the player to access the `Bladeburner API `_ in other BitNodes. | +|| || * Increases all of the player's Bladeburner multipliers by 8%/12%/14%. | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +|| BitNode-8: Ghost of Wall Street || * Increases the player's hacking growth multiplier by 12%/18%/21%. | +|| || * Level 1 grants permanent access to :ref:`WSE ` and the `TIX API `_ | +|| || * Level 2 grants permanent access to shorting stocks. | +|| || * Level 3 grants permanent access to use limit/stop orders. | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +|| BitNode-9: Hacktocracy || * Level 1 permanently unlocks the Hacknet Server in other BitNodes. | +|| || * Level 2 lets the player start with 128 GB of RAM on home computer. | +|| || * Level 3 grants a highly-upgraded Hacknet Server when entering a new BitNode (it | +|| || will be lost after installing augments). | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +|| BitNode-10: Digital Carbon || * Each level of this grants a Duplicate Sleeve. | +|| || * Allows the player to access the `Sleeve API `_ in other BitNodes. | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +|| BitNode-11: The Big Crash || * Company favor increases both the player's salary and reputation gain at that | +|| || company by 1% per favor (rather than just the reputation gain). | +|| || * Increases the player's company salary and reputation gain multipliers by | +|| || 32%/48%/56%. | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +|| BitNode-12: The Recursion || * There is no maximum level for this Source-File. | +|| || * Lets the player start with Neuroflux Governor equal to the level of this | +|| || Source-File. | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ diff --git a/doc/source/basicgameplay/codingcontracts.rst b/doc/source/basicgameplay/codingcontracts.rst index e7e8dc4d2..a1e16ada8 100644 --- a/doc/source/basicgameplay/codingcontracts.rst +++ b/doc/source/basicgameplay/codingcontracts.rst @@ -7,7 +7,7 @@ exchange for solving programming problems. Coding Contracts are files with the ".cct" extensions. They can be accessed through the :ref:`terminal` or through scripts using -the :ref:`netscriptcodingcontractapi` +the `Coding Contract API `_ Each contract has a limited number of attempts. If you provide the wrong answer too many times and exceed the @@ -31,7 +31,7 @@ an area to provide an answer. Interacting through Scripts ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -See :ref:`netscriptcodingcontractapi`. +See the `Coding Contract API `_. Submitting Solutions ^^^^^^^^^^^^^^^^^^^^ diff --git a/doc/source/basicgameplay/stockmarket.rst b/doc/source/basicgameplay/stockmarket.rst index 959e3472a..2929d2c35 100644 --- a/doc/source/basicgameplay/stockmarket.rst +++ b/doc/source/basicgameplay/stockmarket.rst @@ -180,7 +180,7 @@ Working for a Company Automating the Stock Market --------------------------- You can write scripts to perform automatic and algorithmic trading on the Stock Market. -See :ref:`netscript_tixapi` for more details. +See `TIX API `_ for more details. Under the Hood -------------- diff --git a/doc/source/conf.py b/doc/source/conf.py index 78cf4a43b..da2f8bada 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -73,7 +73,7 @@ release = '0.58.0' # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = 'English' +language = 'en' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. diff --git a/doc/source/guidesandtips/recommendedbitnodeorder.rst b/doc/source/guidesandtips/recommendedbitnodeorder.rst index 550ac9705..759014fb8 100644 --- a/doc/source/guidesandtips/recommendedbitnodeorder.rst +++ b/doc/source/guidesandtips/recommendedbitnodeorder.rst @@ -403,7 +403,7 @@ For fast progression strong because hacking is typically one of the best ways of earning money. 3. (Optional) Consider doing **BitNode-4: The Singularity**. Its Source-File does not directly make you - more powerful in any way, but it does unlock :ref:`netscript_singularityfunctions` which + more powerful in any way, but it does unlock the `Singularity API `_ which let you automate significantly more aspects of the game. 4. Do **BitNode-3: Corporatocracy** once to unlock the Corporation mechanic. This mechanic @@ -440,12 +440,12 @@ them. For more scripting/hacking ^^^^^^^^^^^^^^^^^^^^^^^^^^ -**BitNode-4: The Singularity** unlocks the :ref:`netscript_singularityfunctions`, which +**BitNode-4: The Singularity** unlocks the `Singularity API `_, which can be used to automate many different aspects of the game, including working for factions/companies, purchasing & installing Augmentations, and creating programs **BitNode-6** and **BitNode-7** unlock Bladeburner and its corresponding -:ref:`Netscript API `. This allows you to automate an entire +`Netscript API `_. This allows you to automate an entire new mechanic. **BitNode-2: Rise of the Underworld** also unlocks a new mechanic and Netscript API for automating diff --git a/doc/source/index.rst b/doc/source/index.rst index ea980b50d..b2da5daed 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -20,7 +20,8 @@ secrets that you've been searching for. :maxdepth: 5 :caption: Contents: - Netscript + Full documentation + Basic documentation Basic Gameplay Advanced Gameplay Keyboard Shortcuts @@ -29,6 +30,7 @@ secrets that you've been searching for. Tools & Resources Changelog v1.0.0 script migration guide + 404 <404.rst> Donate Indices and tables diff --git a/doc/source/netscript.rst b/doc/source/netscript.rst index 18e60b384..fc502de29 100644 --- a/doc/source/netscript.rst +++ b/doc/source/netscript.rst @@ -10,13 +10,12 @@ This means that Netscript's syntax is identical to that of JavaScript, but it does not implement some of the features that JavaScript has. -If you have any requests or suggestions to improve the Netscript language, feel free -to reach out to the developer! .. toctree:: :maxdepth: 5 :caption: Sections: + Full documentation Learn to Program Netscript 1.0 NetscriptJS (Netscript 2.0) @@ -24,11 +23,4 @@ to reach out to the developer! Basic Functions Advanced Functions Hacknet Node API - Trade Information eXchange (TIX) API - Singularity Functions - Bladeburner API - Gang API - Coding Contract API - Sleeve API - Formulas API Miscellaneous diff --git a/doc/source/netscript/advancedfunctions/atExit.rst b/doc/source/netscript/advancedfunctions/atExit.rst deleted file mode 100644 index 0596224d3..000000000 --- a/doc/source/netscript/advancedfunctions/atExit.rst +++ /dev/null @@ -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); diff --git a/doc/source/netscript/advancedfunctions/autocomplete.rst b/doc/source/netscript/advancedfunctions/autocomplete.rst index be967e2e2..22fefe4b1 100644 --- a/doc/source/netscript/advancedfunctions/autocomplete.rst +++ b/doc/source/netscript/advancedfunctions/autocomplete.rst @@ -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 diff --git a/doc/source/netscript/advancedfunctions/getBitNodeMultipliers.rst b/doc/source/netscript/advancedfunctions/getBitNodeMultipliers.rst deleted file mode 100644 index 0da436be1..000000000 --- a/doc/source/netscript/advancedfunctions/getBitNodeMultipliers.rst +++ /dev/null @@ -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 - `_ - to see the name of the BitNode multipliers. - - Example:: - - mults = getBitNodeMultipliers(); - print(mults.ServerMaxMoney); - print(mults.HackExpGain); diff --git a/doc/source/netscript/advancedfunctions/getServer.rst b/doc/source/netscript/advancedfunctions/getServer.rst deleted file mode 100644 index 09243518d..000000000 --- a/doc/source/netscript/advancedfunctions/getServer.rst +++ /dev/null @@ -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 - } diff --git a/doc/source/netscript/basicfunctions/alert.rst b/doc/source/netscript/basicfunctions/alert.rst deleted file mode 100644 index 28d0cf1bc..000000000 --- a/doc/source/netscript/basicfunctions/alert.rst +++ /dev/null @@ -1,15 +0,0 @@ -alert() Netscript Function -============================ - -.. js:function:: alert(message) - - :RAM cost: 0 GB - :param string message: message to display - - Spawns an alert box. - - Example: - - .. code-block:: javascript - - alert("Reached $1b"); diff --git a/doc/source/netscript/basicfunctions/clear.rst b/doc/source/netscript/basicfunctions/clear.rst deleted file mode 100644 index 3f4f7fd09..000000000 --- a/doc/source/netscript/basicfunctions/clear.rst +++ /dev/null @@ -1,16 +0,0 @@ -clear() Netscript Function -========================== - -.. js:function:: clear(portOrFilename) - - :RAM cost: 1 GB - - :param string/number portOrFilename: Port or text file to clear. - - This function is used to clear data in a :ref:`Netscript Port ` or a text file. - - If the ``portOrFilename`` argument is a number between 1 and 20, then it - specifies a port and will clear it (deleting all data from the underlying queue). - - If the ``portOrFilename`` argument is a string, then it specifies the name - of a text file (.txt) and will delete all data from that text file. diff --git a/doc/source/netscript/basicfunctions/clearLog.rst b/doc/source/netscript/basicfunctions/clearLog.rst deleted file mode 100644 index 1c892b669..000000000 --- a/doc/source/netscript/basicfunctions/clearLog.rst +++ /dev/null @@ -1,17 +0,0 @@ -clearLog() Netscript Function -============================= - -.. js:function:: clearLog() - - :RAM cost: 0 GB - - Clears the script's logs. Useful when making monitoring scripts. - - Examples: - - .. code-block:: javascript - - while(true) { - clearLog(); - print(getServerMoneyAvailable('foodnstuff')); - } diff --git a/doc/source/netscript/basicfunctions/exit.rst b/doc/source/netscript/basicfunctions/exit.rst deleted file mode 100644 index 9bf93d072..000000000 --- a/doc/source/netscript/basicfunctions/exit.rst +++ /dev/null @@ -1,17 +0,0 @@ -exit() Netscript Function -========================= - -.. js:function:: exit() - - :RAM cost: 0 GB - - Terminates the current script immediately. - - .. warning:: In :ref:`netscriptjs`, execution may continue past a call to - this function; while some game-related functions (e.g. those with an - ``ns.`` prefix) will not function after this function has been called, - there might still be unintended behavior if you assume ``exit`` will - immediately halt execution, like it does in :ref:`netscript1`. To be - safe, you should probably ``return`` from the main function instead - of/in addition to calling ``ns.exit()`` when halting a NetscriptJS - script. diff --git a/doc/source/netscript/basicfunctions/flags.rst b/doc/source/netscript/basicfunctions/flags.rst deleted file mode 100644 index 7f47419e2..000000000 --- a/doc/source/netscript/basicfunctions/flags.rst +++ /dev/null @@ -1,46 +0,0 @@ -flags() Netscript Function -============================ - -.. js:function:: flags(data) - - :RAM cost: 0 GB - :param data array of pairs of strings: Flags definition. - :returns: Object containing all the flags that were parsed or default. - - This function allows for a more flexible way of parsing script arguments - than to just pass a fixed list in a fixed order. Options can be given - names, and passed in any order, while having defined default values. - - The flag definition is an array of pairs of values: the first value is the - name of the flag, and the 2nd value is the default value for that flag. - - The return object is a map containing flag names to the value. It also - contains the special field '_', which contains all arguments that were not - flags. - - Example: - - .. code-block:: javascript - - // example.script - var data = flags([ - ['delay', 0], // a default number means this flag is a number - ['server', 'foodnstuff'], // a default string means this flag is a string - ['exclude', []], // a default array means this flag is a default array of string - ['help', false], // a default boolean means this flag is a boolean - ]); - tprint(data); - /* - [home ~/]> run example.script - {"_":[],"delay":0,"server":"foodnstuff","exclude":[],"help":false} - [home ~/]> run example.script --delay 3000 - {"_":[],"server":"foodnstuff","exclude":[],"help":false,"delay":3000} - [home ~/]> run example.script --delay 3000 --server harakiri-sushi - {"_":[],"exclude":[],"help":false,"delay":3000,"server":"harakiri-sushi"} - [home ~/]> run example.script --delay 3000 --server harakiri-sushi hello world - {"_":["hello","world"],"exclude":[],"help":false,"delay":3000,"server":"harakiri-sushi"} - [home ~/]> run example.script --delay 3000 --server harakiri-sushi hello world --exclude a --exclude b - {"_":["hello","world"],"help":false,"delay":3000,"server":"harakiri-sushi","exclude":["a","b"]} - [home ~/]> run example.script --help - {"_":[],"delay":0,"server":"foodnstuff","exclude":[],"help":true} - */ diff --git a/doc/source/netscript/basicfunctions/getFavorToDonate.rst b/doc/source/netscript/basicfunctions/getFavorToDonate.rst deleted file mode 100644 index 8ebbc8489..000000000 --- a/doc/source/netscript/basicfunctions/getFavorToDonate.rst +++ /dev/null @@ -1,13 +0,0 @@ -getFavorToDonate() Netscript Function -===================================== - -.. js:function:: getFavorToDonate() - - :RAM cost: 0.1 GB - :returns: Amount of faction favor required to unlock donation. - - Example: - - .. code-block:: javascript - - getFavorToDonate() // returns: 150 diff --git a/doc/source/netscript/basicfunctions/getGrowTime.rst b/doc/source/netscript/basicfunctions/getGrowTime.rst deleted file mode 100644 index 2d29f16d0..000000000 --- a/doc/source/netscript/basicfunctions/getGrowTime.rst +++ /dev/null @@ -1,21 +0,0 @@ -getGrowTime() Netscript Function -================================ - -.. js:function:: getGrowTime(hostname[, hackLvl=current level]) - - :RAM cost: 0.05 GB - - :param string hostname: Hostname of target server. - :returns: seconds it takes to execute :doc:`grow` on that server. - - The function takes in an optional ``hackLvl`` parameter that can be - specified to see what the grow time would be at different hacking levels. - - Example: - - .. code-block:: javascript - - getGrowTime("foodnstuff"); // returns: 53.4 - -.. note:: For Hacknet Servers (the upgraded version of a Hacknet Node), this function will - return ``Infinity``. diff --git a/doc/source/netscript/basicfunctions/getHackTime.rst b/doc/source/netscript/basicfunctions/getHackTime.rst deleted file mode 100644 index 57d95ea3a..000000000 --- a/doc/source/netscript/basicfunctions/getHackTime.rst +++ /dev/null @@ -1,20 +0,0 @@ -getHackTime() Netscript Function -================================ - -.. js:function:: getHackTime(hostname[, hackLvl=current level]) - - :RAM cost: 0.05 GB - :param string hostname: Hostname of target server. - :returns: seconds it takes to execute :doc:`hack` on that server. - - The function takes in an optional ``hackLvl`` parameter that can be - specified to see what the hack time would be at different hacking levels. - - Example: - - .. code-block:: javascript - - getHackTime("foodnstuff"); // returns: 53.4 - - .. note:: For Hacknet Servers (the upgraded version of a Hacknet Node), this function will - return :code:`Infinity`. diff --git a/doc/source/netscript/basicfunctions/getHostname.rst b/doc/source/netscript/basicfunctions/getHostname.rst deleted file mode 100644 index b1287941b..000000000 --- a/doc/source/netscript/basicfunctions/getHostname.rst +++ /dev/null @@ -1,13 +0,0 @@ -getHostname() Netscript Function -================================ - -.. js:function:: getHostname() - - :RAM cost: 0.05 GB - :returns: Hostname of the server this script is running on. - - Example: - - .. code-block:: javascript - - getHostname(); // returns: "foodnstuff" diff --git a/doc/source/netscript/basicfunctions/getPlayer.rst b/doc/source/netscript/basicfunctions/getPlayer.rst deleted file mode 100644 index fc86e9e54..000000000 --- a/doc/source/netscript/basicfunctions/getPlayer.rst +++ /dev/null @@ -1,101 +0,0 @@ -getPlayer() Netscript Function -============================== - -.. js:function:: getPlayer() - - :RAM cost: 0.5 GB - - The result of this function can be passed to the :doc:`formulas API<../netscriptformulasapi>`. - - Returns an object with the Player's stats. The object has the following properties:: - - { - hacking: Current Hacking skill level - hp: Current health points - max_hp: Maximum health points - strength: Current Strength skill level - defense: Current Defense skill level - dexterity: Current Dexterity skill level - agility: Current Agility skill level - charisma: Current Charisma skill level - intelligence: Current Intelligence skill level (from BitNode-5) - hacking_chance_mult: Hacking Chance multiplier (from Source-Files and Augments) - hacking_speed_mult: Hacking Speed multiplier (from Source-Files and Augments) - hacking_money_mult: Hacking Money multiplier (from Source-Files and Augments) - hacking_grow_mult: Hacking Growth multiplier (from Source-Files and Augments) - hacking_exp: Current Hacking experience points - strength_exp: Current Strength experience points - defense_exp: Current Defense experience points - dexterity_exp: Current Dexterity experience points - agility_exp: Current Agility experience points - charisma_exp: Current Charisma experience points - hacking_mult: Hacking Level multiplier (from Source-Files and Augments) - strength_mult: Strength Level multiplier (from Source-Files and Augments) - defense_mult: Defense Level multiplier (from Source-Files and Augments) - dexterity_mult: Dexterity Level multiplier (from Source-Files and Augments) - agility_mult: Agility Level multiplier (from Source-Files and Augments) - charisma_mult: Charisma Level multiplier (from Source-Files and Augments) - hacking_exp_mult: Hacking Experience multiplier (from Source-Files and Augments) - strength_exp_mult: Strength Experience multiplier (from Source-Files and Augments) - defense_exp_mult: Defense Experience multiplier (from Source-Files and Augments) - dexterity_exp_mult: Dexterity Experience multiplier (from Source-Files and Augments) - agility_exp_mult: Agility Experience multiplier (from Source-Files and Augments) - charisma_exp_mult: Charisma Experience multiplier (from Source-Files and Augments) - company_rep_mult: Company reputation gain multiplier (from Source-Files and Augments) - faction_rep_mult: Faction reputation gain multiplier (from Source-Files and Augments) - money: Current money - city: Name of city you are currently in - location: Name of the last location visited - crime_money_mult: Crime money multiplier (from Source-Files and Augments) - crime_success_mult: Crime success multiplier (from Source-Files and Augments) - isWorking: Boolean indicating whether the player is currently performing work - workType: Name of the kind of work the player is performing - currentWorkFactionName: Name of the faction the player is currently working for - currentWorkFactionDescription: Description of the kind of work the player is currently doing - workHackExpGainRate: Amount of Hacking experience the player will gain every cycle (fifth of a second) - workStrExpGainRate: Amount of Strength experience the player will gain every cycle - workDefExpGainRate: Amount of Defense experience the player will gain every cycle - workDexExpGainRate: Amount of Dexterity experience the player will gain every cycle - workAgiExpGainRate: Amount of Agility experience the player will gain every cycle - workChaExpGainRate: Amount of Charisma experience the player will gain every cycle - workRepGainRate: Amount of Reputation the player will gain every cycle - workMoneyGainRate: Amount of Money the player will gain every cycle - workMoneyLossRate: Amount of Money the player will lose every cycle - workHackExpGained: Total Hacking experience gained while working thus far - workStrExpGained: Total Strength experience gained while working thus far - workDefExpGained: Total Defense experience gained while working thus far - workDexExpGained: Total Dexterity experience gained while working thus far - workAgiExpGained: Total Agility experience gained while working thus far - workChaExpGained: Total Charisma experience gained while working thus far - workRepGained: Total Reputation gained while working thus far - workMoneyGained: Total Money gained while working thus far - createProgramName: Name of the program the player is currently creating - createProgramReqLvl: Hacking skill required to make that program - className: Name of the class the player is currently studying - crimeType: Name of the crime the player last started - work_money_mult: Salary multiplier (from Source-Files and Augments) - hacknet_node_money_mult: Hacknet Node production multiplier (from Source-Files and Augments) - hacknet_node_purchase_cost_mult: Hacknet Node purchase cost multiplier (from Source-Files and Augments) - hacknet_node_ram_cost_mult: Hacknet Node RAM upgrade cost multiplier (from Source-Files and Augments) - hacknet_node_core_cost_mult: Hacknet Node Core purchase cost multiplier (from Source-Files and Augments) - hacknet_node_level_cost_mult: Hacknet Node level upgrade cost multiplier (from Source-Files and Augments) - hasWseAccount: Boolean indicating whether the player has a WSE Account - hasTixApiAccess: Boolean indicating whether the player has TIX API Access - has4SData: Boolean indicating whether the player has 4S Market Data Access - has4SDataTixApi: Boolean indicating whether the player has 4S Market Data TIX API Access - bladeburner_max_stamina_mult: Bladeburner Max Stamina multiplier (from Source-Files and Augments) - bladeburner_stamina_gain_mult: Bladeburner Stamina Gain multiplier (from Source-Files and Augments) - bladeburner_success_chance_mult: Bladeburner Success Chance multiplier (from Source-Files and Augments) - bitNodeN: Current BitNode number - totalPlaytime: Total amount of time the game has been running, in milliseconds - playtimeSinceLastAug: Milliseconds since the last time Augmentations were installed - playtimeSinceLastBitnode: Milliseconds since this BitNode was started - jobs: A mapping of companies the player works for to the title of the player's job at that company - factions: An array of factions the player is currently a member of - tor: Boolean indicating whether or not you have a tor router - } - - Example:: - - player = getPlayer(); - print('My charisma level is: ' + player.charisma); diff --git a/doc/source/netscript/basicfunctions/getPortHandle.rst b/doc/source/netscript/basicfunctions/getPortHandle.rst deleted file mode 100644 index e0f800efd..000000000 --- a/doc/source/netscript/basicfunctions/getPortHandle.rst +++ /dev/null @@ -1,11 +0,0 @@ -getPortHandle() Netscript Function -================================== - -.. js:function:: getPortHandle(port) - - :RAM cost: 10 GB - - :param number port: Port number - :returns: portHandle object. See :ref:`netscript_ports` - - **WARNING:** Port Handles only work in :ref:`netscriptjs`. They will not work in :ref:`netscript1`. diff --git a/doc/source/netscript/basicfunctions/getRunningScript.rst b/doc/source/netscript/basicfunctions/getRunningScript.rst deleted file mode 100644 index de35d5c88..000000000 --- a/doc/source/netscript/basicfunctions/getRunningScript.rst +++ /dev/null @@ -1,88 +0,0 @@ -getRunningScript() Netscript Function -===================================== - -.. js:function:: getRunningScript() - - :RAM cost: 0.3 GB - :returns: Script object or null if not found. - - The object has the following properties: - - .. code-block:: javascript - - { - // Script arguments - args - - // Script filename - filename - - // This script's logs. An array of log entries - logs - - // Flag indicating whether the logs have been updated since - // the last time the UI was updated - logUpd - - // Total amount of hacking experience earned from this script when offline - offlineExpGained - - // Total amount of money made by this script when offline - offlineMoneyMade - - // Number of seconds that the script has been running offline - offlineRunningTime - - // Total amount of hacking experience earned from this script when online - onlineExpGained - - // Total amount of money made by this script when online - onlineMoneyMade - - // Number of seconds that this script has been running online - onlineRunningTime - - // Process ID. - pid - - // How much RAM this script uses for ONE thread - ramUsage - - // IP of the server on which this script is running - server - - // Number of threads that this script is running with - threads - } - - Examples: - - .. code-block:: javascript - - getRunningScript(); // get the current script. - -.. js:function:: getRunningScript(pid) - - :RAM cost: 0.3 GB - :param number pid: PID of the script. - :returns: Script object or null if not found. - - Examples: - - .. code-block:: javascript - - getRunningScript(42); // get the script with pid 42. - -.. js:function:: getRunningScript(fn, hostname[, args...]) - - :RAM cost: 0.3 GB - :param number fn: Filename of the target script. - :param number hostname: Hostname of the server running the script. - :param number args...: Arguments that the script is running with. - :returns: Script object or null if not found. - - Examples: - - .. code-block:: javascript - - getRunningScript("example.script", "home", "foodnstuff"); // get the script called "example.script" on "home" with argument "foodnstuff" diff --git a/doc/source/netscript/basicfunctions/getScriptExpGain.rst b/doc/source/netscript/basicfunctions/getScriptExpGain.rst deleted file mode 100644 index 71fa4b1a6..000000000 --- a/doc/source/netscript/basicfunctions/getScriptExpGain.rst +++ /dev/null @@ -1,17 +0,0 @@ -getScriptExpGain() Netscript Function -===================================== - -.. js:function:: getScriptExpGain([scriptname[, hostname[, args...]]]) - - :RAM cost: 0.1 GB - :param string scriptname: Filename of script. - :param string hostname: Server on which script is running. - :param args...: Arguments that the script is running with. - :returns: The amount of hacking experience the specified script generates - while online. - - This function can also return the total experience gain rate of all of your - active scripts by running the function with no arguments. - - .. note:: A script is uniquely identified by both its name and its - arguments. diff --git a/doc/source/netscript/basicfunctions/getScriptIncome.rst b/doc/source/netscript/basicfunctions/getScriptIncome.rst deleted file mode 100644 index f0a6ce193..000000000 --- a/doc/source/netscript/basicfunctions/getScriptIncome.rst +++ /dev/null @@ -1,19 +0,0 @@ -getScriptIncome() Netscript Function -==================================== - -.. js:function:: getScriptIncome([scriptname[, hostname/ip[, [args...]]]) - - :RAM cost: 0.1 GB - :param string scriptname: Filename of script - :param string hostname/ip: Server on which script is running - :param args...: Arguments that the script is running with - :returns: Amount of income the specified script generates while online. - - If called with no arguments this function will return an array of two - values. The first value is the total income ($ / second) of all of your - active scripts (scripts that are currently running on any server). The - second value is the total income ($ / second) that you've earned from - scripts since you last installed Augmentations. - - .. note:: A script is uniquely identified by both its name and its - arguments. diff --git a/doc/source/netscript/basicfunctions/getScriptLogs.rst b/doc/source/netscript/basicfunctions/getScriptLogs.rst deleted file mode 100644 index b8ffe9e09..000000000 --- a/doc/source/netscript/basicfunctions/getScriptLogs.rst +++ /dev/null @@ -1,33 +0,0 @@ -getScriptLogs() Netscript Function -================================== - -.. js:function:: getScriptLogs([filename[, hostname=current hostname[, args...]]]) - - :RAM cost: 0 GB - :param string filename: Optional. Filename of script to get logs from. - :param string hostname: Optional. Hostname of the server running the script. - :param args...: Arguments to identify which scripts to get logs for - :returns: Array of string, each line being a logged line. Chronological. - - .. note:: There is a maximum number of lines that a script stores in its logs. - This is configurable in the game's options. - - If the function is called with no arguments, it will return the current - script's logs. - - Otherwise, the ``filename``, ``hostname``, and ``args...`` arguments can be - used to get the logs from another script. Remember that scripts are uniquely - identified by both their names and arguments. - - Example: - - .. code-block:: javascript - - // Get logs from foo.script on the current server that was run with no args - getScriptLogs("foo.script"); - - // Get logs from foo.script on the foodnstuff server that was run with no args - getScriptLogs("foo.script", "foodnstuff"); - - // Get logs from foo.script on the foodnstuff server that was run with the arguments [1, "test"] - getScriptLogs("foo.script", "foodnstuff", 1, "test"); diff --git a/doc/source/netscript/basicfunctions/getScriptName.rst b/doc/source/netscript/basicfunctions/getScriptName.rst deleted file mode 100644 index 436041846..000000000 --- a/doc/source/netscript/basicfunctions/getScriptName.rst +++ /dev/null @@ -1,13 +0,0 @@ -getScriptName() Netscript Function -================================== - -.. js:function:: getScriptName() - - :RAM cost: 0 GB - :returns: Current script name. - - Example: - - .. code-block:: javascript - - getScriptName(); // returns: "example.script" diff --git a/doc/source/netscript/basicfunctions/getServerBaseSecurityLevel.rst b/doc/source/netscript/basicfunctions/getServerBaseSecurityLevel.rst deleted file mode 100644 index 59ac978a5..000000000 --- a/doc/source/netscript/basicfunctions/getServerBaseSecurityLevel.rst +++ /dev/null @@ -1,28 +0,0 @@ -getServerBaseSecurityLevel() Netscript Function -=============================================== - -.. js:function:: getServerBaseSecurityLevel(hostname) - - :RAM cost: 0.1 GB - :param string hostname: Hostname of target server. - :returns: Base security level of target server. - - The base security level is the security level that the server starts out with. - - This function isn't particularly useful. - :doc:`getServerSecurityLevel` and - :doc:`getServerMinSecurityLevel` are more often - used. - - Example: - - .. code-block:: javascript - - getServerBaseSecurityLevel('foodnstuff'); // returns: 9 - -.. note:: This is different than :doc:`getServerSecurityLevel` - because :doc:`getServerSecurityLevel` returns the current - security level of a server, which can constantly change due to - :doc:`hack`, :doc:`grow`, and :doc:`weaken` calls on - that server. The base security level will stay the same until you reset - by installing augmentation(s). diff --git a/doc/source/netscript/basicfunctions/getServerGrowth.rst b/doc/source/netscript/basicfunctions/getServerGrowth.rst deleted file mode 100644 index f1455e2cb..000000000 --- a/doc/source/netscript/basicfunctions/getServerGrowth.rst +++ /dev/null @@ -1,19 +0,0 @@ -getServerGrowth() Netscript Function -==================================== - -.. js:function:: getServerGrowth(hostname) - - :RAM cost: 0.1 GB - :param string hostname: Hostname of target server. - :returns: Server growth parameter. - - The growth parameter is a number, typically between 1 and 100, that affects - the percentage by which the server's money is increased when using the - :doc:`grow` function. A higher growth parameter will result in a - higher percentage increase. - - Example: - - .. code-block:: javascript - - getServerGrowth('foodnstuff'); // returns: 5 diff --git a/doc/source/netscript/basicfunctions/getServerRam.rst b/doc/source/netscript/basicfunctions/getServerRam.rst deleted file mode 100644 index b83bb22b6..000000000 --- a/doc/source/netscript/basicfunctions/getServerRam.rst +++ /dev/null @@ -1,25 +0,0 @@ -getServerRam() Netscript Function -================================= - -.. js:function:: getServerRam(hostname) - - .. warning:: This function is deprecated. It still functions, but new - scripts should prefer :doc:`getServerMaxRam` - and :doc:`getServerUsedRam` instead. - - :RAM cost: 0.1 GB - :param string hostname: Hostname of target server. - :returns: An array of 2 numbers; the first number is the total RAM, and the - second is the used RAM. - - 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 - the array is the amount of RAM that is currently being used on the server (in GB). - - Example: - - .. code-block:: javascript - - res = getServerRam("helios"); // returns: [5, 10] - totalRam = res[0]; - ramUsed = res[1]; diff --git a/doc/source/netscript/basicfunctions/getTimeSinceLastAug.rst b/doc/source/netscript/basicfunctions/getTimeSinceLastAug.rst deleted file mode 100644 index c7651bda1..000000000 --- a/doc/source/netscript/basicfunctions/getTimeSinceLastAug.rst +++ /dev/null @@ -1,13 +0,0 @@ -getTimeSinceLastAug() Netscript Function -======================================== - -.. js:function:: getTimeSinceLastAug() - - :RAM cost: 0.05 GB - :returns: Milliseconds since you last installed augmentations. - - Example: - - .. code-block:: javascript - - getTimeSinceLastAug(); // returns: 13912400 diff --git a/doc/source/netscript/basicfunctions/getWeakenTime.rst b/doc/source/netscript/basicfunctions/getWeakenTime.rst deleted file mode 100644 index 95ae7fd12..000000000 --- a/doc/source/netscript/basicfunctions/getWeakenTime.rst +++ /dev/null @@ -1,21 +0,0 @@ -getWeakenTime() Netscript Function -================================== - -.. js:function:: getWeakenTime(hostname[, hackLvl=current level]) - - :RAM cost: 0.05 GB - :param string hostname: Hostname of target server. - :returns: seconds it takes to execute the :doc:`weaken` Netscript - function on the target server. - - The function takes in an optional *hackLvl* parameter that can be specified - to see what the weaken time would be at different hacking levels. - - Example: - - .. code-block:: javascript - - getWeakenTime("foodnstuff"); // returns: 34.5 - - .. note:: For Hacknet Servers (the upgraded version of a Hacknet Node), this function will - return :code:`Infinity`. diff --git a/doc/source/netscript/basicfunctions/grow.rst b/doc/source/netscript/basicfunctions/grow.rst index ccfd39fcc..43eece4f3 100644 --- a/doc/source/netscript/basicfunctions/grow.rst +++ b/doc/source/netscript/basicfunctions/grow.rst @@ -20,8 +20,7 @@ grow() Netscript Function server will be increased by a certain, fixed percentage. This percentage is determined by the target server's growth rate (which varies between servers) and security level. Generally, higher-level servers have higher growth - rates. The :doc:`getServerGrowth` function can be used to - obtain a server's growth rate. + rates. Like :doc:`hack`, :doc:`grow` can be called on any server, from any server. The :doc:`grow` command requires root access to the target diff --git a/doc/source/netscript/basicfunctions/growthAnalyze.rst b/doc/source/netscript/basicfunctions/growthAnalyze.rst deleted file mode 100644 index 3efc840b0..000000000 --- a/doc/source/netscript/basicfunctions/growthAnalyze.rst +++ /dev/null @@ -1,24 +0,0 @@ -growthAnalyze() Netscript Function -================================== - -.. js:function:: growthAnalyze(hostname, growthAmount[, cores]) - - :RAM cost: 1 GB - :param string hostname: Hostname of server to analyze. - :param number growthAmount: Multiplicative factor by which the server is - grown. Decimal form. Must be >= 1. - :param number cores: Amount of cores on the server that would run the growth, defaults to 1 - :returns: The amount of :doc:`grow` threads needed to grow the specified - server by the specified amount. - - Example: - - .. code-block:: javascript - - // How many grow threads are needed to double the current money on 'foodnstuff' - growthAnalyze("foodnstuff", 2); // returns: 5124 - - If this returns 5124, then this means you need to call :doc:`grow` - 5124 times in order to double the money (or once with 5124 threads). - - **Warning**: The value returned by this function isn't necessarily a whole number. diff --git a/doc/source/netscript/basicfunctions/hackAnalyzePercent.rst b/doc/source/netscript/basicfunctions/hackAnalyzePercent.rst deleted file mode 100644 index c83e0c07b..000000000 --- a/doc/source/netscript/basicfunctions/hackAnalyzePercent.rst +++ /dev/null @@ -1,22 +0,0 @@ -hackAnalyzePercent() Netscript Function -======================================= - -.. js:function:: hackAnalyzePercent(hostname) - - :RAM cost: 1 GB - :param string hostname: Hostname of target server. - :returns: The percentage of money you will steal from the target server with - a single hack. - - Returns the percentage of the specified server's money you will steal with a - single hack. This value is returned in percentage form, not decimal. - - For example, assume the following returns 1: - - .. code-block:: javascript - - hackAnalyzePercent("foodnstuff"); // returns: 1 - - This means that if hack the 'foodnstuff' server, then you will steal 1% of its - total money. If you :doc:`hack` using N threads, then you will steal N% of its total - money. diff --git a/doc/source/netscript/basicfunctions/hackAnalyzeThreads.rst b/doc/source/netscript/basicfunctions/hackAnalyzeThreads.rst deleted file mode 100644 index 05df6387e..000000000 --- a/doc/source/netscript/basicfunctions/hackAnalyzeThreads.rst +++ /dev/null @@ -1,37 +0,0 @@ -hackAnalyzeThreads() Netscript Function -======================================= - -.. js:function:: hackAnalyzeThreads(hostname, hackAmount) - - :RAM cost: 1 GB - :param string hostname: Hostname of server to analyze. - :param number hackAmount: Amount of money you want to hack from the server. - :returns: The number of threads needed to :doc:`hack` the server for - ``hackAmount`` money. - - This function returns the number of script threads you need when running - the :doc:`hack` command to steal the specified amount of money from - the target server. - - If ``hackAmount`` is less than zero or greater than the amount of money - available on the server, then this function returns -1. - - For example, let's say the 'foodnstuff' server has $10m and you run: - - .. code-block:: javascript - - hackAnalyzeThreads("foodnstuff", 1e6); - - If this function returns 50, this means that if your next :doc:`hack` call - is run on a script with 50 threads, it will steal $1m from the `foodnstuff` server. - - .. warning:: The value returned by this function isn't necessarily a whole number. - .. warning:: It is possible for this function to return :code:`Infinity` or :code:`NaN` in - certain uncommon scenarios. This is because in JavaScript: - - * :code:`0 / 0 = NaN` - * :code:`N / 0 = Infinity` for 0 < N < Infinity. - - For example, if a server has no money available and you want to hack some positive - amount from it, then the function would return :code:`Infinity` because - this would be impossible. diff --git a/doc/source/netscript/basicfunctions/hackChance.rst b/doc/source/netscript/basicfunctions/hackChance.rst deleted file mode 100644 index 5b4d4baf3..000000000 --- a/doc/source/netscript/basicfunctions/hackChance.rst +++ /dev/null @@ -1,16 +0,0 @@ -hackChance() Netscript Function -=============================== - -.. js:function:: hackChance(hostname) - - :RAM cost: 1 GB - :param string hostname: Hostname of target server. - :returns: The chance you have of successfully hacking the target server. - in decimal form. - - Example: - - .. code-block:: javascript - - hackChance("foodnstuff"); // returns: .5 - // So 50% chance to hack "foodnstuff" diff --git a/doc/source/netscript/basicfunctions/nFormat.rst b/doc/source/netscript/basicfunctions/nFormat.rst deleted file mode 100644 index 2f1f86281..000000000 --- a/doc/source/netscript/basicfunctions/nFormat.rst +++ /dev/null @@ -1,22 +0,0 @@ -nFormat() Netscript Function -============================ - -.. js:function:: nFormat(n, format) - - :RAM cost: 0 GB - :param number n: number to format - :param string format: The format to use. - - Converts a number into a string with the specified format. This uses the - `numeraljs `_ library, so the formatters must be - compatible with that. - - The game uses the ``$0.000a`` format to display money. - - Example: - - .. code-block:: javascript - - nFormat(1.23e9, "$0.000a"); // returns: "$1.230b" - nFormat(12345.678, "0,0"); // returns: "12,346" - nFormat(0.84, "0.0%"); // returns: "84.0%" diff --git a/doc/source/netscript/basicfunctions/peek.rst b/doc/source/netscript/basicfunctions/peek.rst deleted file mode 100644 index 9a44bfa0d..000000000 --- a/doc/source/netscript/basicfunctions/peek.rst +++ /dev/null @@ -1,14 +0,0 @@ -peek() Netscript Function -========================= - -.. js:function:: peek(port) - - :RAM cost: 1 GB - :param number port: Port to peek. Must be an integer between 1 and 20. - :returns: First element on that 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. - - Read about how :ref:`netscript_ports` work here diff --git a/doc/source/netscript/basicfunctions/prompt.rst b/doc/source/netscript/basicfunctions/prompt.rst deleted file mode 100644 index c2e7629f7..000000000 --- a/doc/source/netscript/basicfunctions/prompt.rst +++ /dev/null @@ -1,23 +0,0 @@ -prompt() Netscript Function -=========================== - -.. js:function:: prompt(txt) - - :RAM cost: 0 GB - :param string txt: Text to appear in the prompt dialog box. - :returns: ``true`` if the player clicks "Yes". - - 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. - - Example: - - .. code-block:: javascript - - cost = getPurchasedServerCost(8192); - answer = prompt("Buy a server for $"+cost); - if(answer) { - purchaseServer("my server", 8192); - } diff --git a/doc/source/netscript/basicfunctions/read.rst b/doc/source/netscript/basicfunctions/read.rst deleted file mode 100644 index b1cf5ca77..000000000 --- a/doc/source/netscript/basicfunctions/read.rst +++ /dev/null @@ -1,21 +0,0 @@ -read() Netscript Function -========================= - -.. js:function:: read(portOrFilename) - - :RAM cost: 1 GB - :param string/number portOrFilename: Port or text file to read from. - - This function is used to read data from a port, a text file (.txt), or a - script (.script, .js, .ns). - - If the argument ``portOrFilename`` is a number between 1 and 20, then it - specifies a port and it will read data from that port. Read about how - :ref:`netscript_ports` work here. A port is a serialized queue. This - function will remove the first element from that queue and return it. If the - queue is empty, then the string "NULL PORT DATA" will be returned. - - If the argument ``portOrFilename`` is a string, then it specifies the name - of a text file or script and this function will return the data in the - specified text file/script. If the text file does not exist, an empty string - will be returned. diff --git a/doc/source/netscript/basicfunctions/rm.rst b/doc/source/netscript/basicfunctions/rm.rst deleted file mode 100644 index a1159cff8..000000000 --- a/doc/source/netscript/basicfunctions/rm.rst +++ /dev/null @@ -1,13 +0,0 @@ -rm() Netscript Function -======================= - -.. js:function:: rm(filename[, hostname=current server]) - - :RAM cost: 1 GB - :param string filename: Filename of file to remove. Must include the extension. - :param string hostname: Hostname address of the server on which to delete - the file. Optional. Defaults to current server - :returns: ``true`` if it successfully deletes the file. - - Removes the specified file from the current server. This function works for - every file type except ``.msg`` files. diff --git a/doc/source/netscript/basicfunctions/sprintf.rst b/doc/source/netscript/basicfunctions/sprintf.rst deleted file mode 100644 index 2ea752682..000000000 --- a/doc/source/netscript/basicfunctions/sprintf.rst +++ /dev/null @@ -1,8 +0,0 @@ -sprintf() Netscript Function -============================ - -.. js:function:: sprintf() - - :RAM cost: 0 GB - - See `this link `_ for details. diff --git a/doc/source/netscript/basicfunctions/tFormat.rst b/doc/source/netscript/basicfunctions/tFormat.rst deleted file mode 100644 index a3c5ff155..000000000 --- a/doc/source/netscript/basicfunctions/tFormat.rst +++ /dev/null @@ -1,17 +0,0 @@ -tFormat() Netscript Function -============================ - -.. js:function:: tFormat(milliseconds[, milliPrecision=false]) - - :RAM cost: 0 GB - :param number milliseconds: Amount of milliseconds to format. - :param number milliPrecision: Display time with millisecond precision. - :returns: milliseconds in the "D M H S" format - - Example: - - .. code-block:: javascript - - tFormat(3000); // returns: "3 seconds" - tFormat(10000000); // returns: "2 hours 46 minutes 40 seconds" - tFormat(10000023, true); // returns: "2 hours 46 minutes 40.023 seconds" diff --git a/doc/source/netscript/basicfunctions/tail.rst b/doc/source/netscript/basicfunctions/tail.rst deleted file mode 100644 index fd4adc474..000000000 --- a/doc/source/netscript/basicfunctions/tail.rst +++ /dev/null @@ -1,58 +0,0 @@ -tail() Netscript Function -================================== - -.. js:function:: tail([fn[, hostname=current hostname[, ...args]]) - - :RAM cost: 0 GB - :param string fn: Optional. Filename of script to get logs from. - :param string hostname: Optional. Hostname of the server that the script is on. - :param args...: Arguments to identify which scripts to get logs for. - - Opens a script's logs. This is functionally the same as the - :ref:`tail_terminal_command` Terminal command. - - If the function is called with no arguments, it will open the current script's logs. - - Otherwise, the ``fn``, ``hostname``, and ``args...`` arguments can be - used to get the logs from another script. Remember that scripts are uniquely - identified by both their names and arguments. - - Example: - - .. code-block:: javascript - - // Open logs from foo.script on the current server that was run with no args - tail("foo.script"); - - // Open logs from foo.script on the foodnstuff server that was run with no args - tail("foo.script", "foodnstuff"); - - // Open logs from foo.script on the foodnstuff server that was run with the arguments [1, "test"] - tail("foo.script", "foodnstuff", 1, "test"); - -.. js:function:: tail(scriptPid) - - :RAM cost: 0 GB - :param number scriptPid: PID of the script to tail. - - Opens a script's logs by pid - - Example: - - .. code-block:: javascript - - // Open logs from process with id 42 - tail(42); - -.. js:function:: tail() - - :RAM cost: 0 GB - - Opens the current script logs. - - Example: - - .. code-block:: javascript - - // Open the current script logs. - tail(); diff --git a/doc/source/netscript/basicfunctions/toast.rst b/doc/source/netscript/basicfunctions/toast.rst deleted file mode 100644 index eb3e581e0..000000000 --- a/doc/source/netscript/basicfunctions/toast.rst +++ /dev/null @@ -1,17 +0,0 @@ -toast() Netscript Function -============================ - -.. js:function:: toast(message[, variant]) - - :RAM cost: 0 GB - :param string message: message to display - :param success|info|warning|error variant: color of the toast - - Spawns a toast (those bottom right notifications, like "Game Saved!" ). - - Example: - - .. code-block:: javascript - - toast("Reached $1b"); - toast("Failed to hack home", "error"); diff --git a/doc/source/netscript/basicfunctions/tprintf.rst b/doc/source/netscript/basicfunctions/tprintf.rst deleted file mode 100644 index 1b24d937b..000000000 --- a/doc/source/netscript/basicfunctions/tprintf.rst +++ /dev/null @@ -1,17 +0,0 @@ -tprint() Netscript Function -=========================== - -.. js:function:: tprintf(format, args...) - - :RAM cost: 0 GB - :param format: Format of the string to be printed. - :param args: Values to be formatted - - Prints a raw formatted string to the terminal. - - Example: - - .. code-block:: javascript - - tprintf("Hello world!"); // Prints "Hello world!" to the terminal. - tprintf("Hello %s", "world!"); // Prints "Hello world!" to the terminal. diff --git a/doc/source/netscript/basicfunctions/tryWrite.rst b/doc/source/netscript/basicfunctions/tryWrite.rst deleted file mode 100644 index ec37c351a..000000000 --- a/doc/source/netscript/basicfunctions/tryWrite.rst +++ /dev/null @@ -1,14 +0,0 @@ -tryWrite() Netscript Function -============================= - -.. js:function:: tryWrite(port, data="") - - :RAM cost: 1 GB - :param number port: Port to be written to - :param string data: Data to try to write - :returns: ``true`` if the data is successfully written to the port. - - 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. - - See :ref:`netscript_ports` for more details. diff --git a/doc/source/netscript/basicfunctions/vsprintf.rst b/doc/source/netscript/basicfunctions/vsprintf.rst deleted file mode 100644 index 1b7431de0..000000000 --- a/doc/source/netscript/basicfunctions/vsprintf.rst +++ /dev/null @@ -1,8 +0,0 @@ -vsprintf() Netscript Function -============================= - -.. js:function:: vsprintf() - - :RAM cost: 0 GB - - See `this link `_ for details. diff --git a/doc/source/netscript/basicfunctions/wget.rst b/doc/source/netscript/basicfunctions/wget.rst deleted file mode 100644 index 423387a78..000000000 --- a/doc/source/netscript/basicfunctions/wget.rst +++ /dev/null @@ -1,31 +0,0 @@ -wget() Netscript Function -========================= - -.. js:function:: wget(url, target[, hostname=current hostname]) - - :RAM cost: 0 GB - :param string url: URL to pull data from - :param string target: Filename to write data to. Must be script or text file - :param string ip: Optional hostname of server for target file. - - 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, - it will be overwritten by this command. - - Note that it will not be possible to download data from many websites because they do not allow - cross-origin resource sharing (CORS). Example:: - - wget("https://raw.githubusercontent.com/danielyxie/bitburner/master/README.md", "game_readme.txt"); - - **IMPORTANT:** This is an asynchronous function that returns a Promise. The Promise's resolved - value will be a boolean indicating whether or not the data was successfully - retrieved from the URL. Because the function is async and returns a Promise, - it is recommended you use ``wget`` in :ref:`netscriptjs`. - - In NetscriptJS, you must preface any call to - ``wget`` with the ``await`` keyword (like you would ``hack`` or ``sleep``). - - ``wget`` will still work in :ref:`netscript1`, but the functions execution will not - be synchronous (i.e. it may not execute when you expect/want it to). Furthermore, since Promises are not - supported in ES5, you will not be able to process the returned value of ``wget`` in - Netscript 1.0. diff --git a/doc/source/netscript/basicfunctions/write.rst b/doc/source/netscript/basicfunctions/write.rst deleted file mode 100644 index 656996632..000000000 --- a/doc/source/netscript/basicfunctions/write.rst +++ /dev/null @@ -1,26 +0,0 @@ -write() Netscript Function -=========================== - -.. js:function:: write(portOrFilename, data="", mode="a") - - :RAM cost: 1 GB - :param string/number portOrFilename: Port or text file/script that will be written to - :param string data: Data to write - :param string mode: Defines the write mode. Only valid when writing to text files or scripts. - - This function can be used to either write data to a port, a text file - (.txt), or a script (.script, .js, .ns) - - If the first argument is a number between 1 and 20, then it specifies a port - and this function will write ``data`` to that port. Read about how - :ref:`netscript_ports` work here. The third argument, ``mode``, is not used - when writing to a port. - - If the first argument is a string, then it specifies the name of a text file - or script and this function will write ``data`` to that text file/script. If - the specified text file/script does not exist, then it will be created. The - third argument ``mode``, defines how the data will be written. If ``mode`` - is set to "w", then the data is written in "write" mode which means that it - will overwrite all existing data on the text file/script. If ``mode`` is set - to any other value then the data will be written in "append" mode which - means that the data will be added at the end of the file. diff --git a/doc/source/netscript/bladeburnerapi/getActionAutolevel.rst b/doc/source/netscript/bladeburnerapi/getActionAutolevel.rst deleted file mode 100644 index b2dc609ec..000000000 --- a/doc/source/netscript/bladeburnerapi/getActionAutolevel.rst +++ /dev/null @@ -1,15 +0,0 @@ -getActionAutolevel() Netscript Function -======================================= - -.. js:function:: getActionAutolevel(type, name) - - :RAM cost: 4 GB - :param string type: Type of action. See :ref:`bladeburner_action_types` - :param string name: Name of action. Must be an exact match - :returns: ``true`` if this action is set to auto level. - - Examples: - - .. code-block:: javascript - - bladeburner.getActionAutolevel("Contracts", "Tracking"); // returns: true \ No newline at end of file diff --git a/doc/source/netscript/bladeburnerapi/getActionCountRemaining.rst b/doc/source/netscript/bladeburnerapi/getActionCountRemaining.rst deleted file mode 100644 index 1dbd514e1..000000000 --- a/doc/source/netscript/bladeburnerapi/getActionCountRemaining.rst +++ /dev/null @@ -1,21 +0,0 @@ -getActionCountRemaining() Netscript Function -============================================ - -.. js:function:: getActionCountRemaining(type, name) - - :RAM cost: 4 GB - :param string type: Type of action. See :ref:`bladeburner_action_types` - :param string name: Name of action. Must be an exact match - :returns: Remaining action count. -1 for invalid actions. - - Note that this is meant to be used for 'Contracts' and 'Operations'. - This function will return 'Infinity' for actions such as 'Training' and - 'Field Analysis'. - This function will return 1 for BlackOps not yet completed regardless of - whether the player has the required rank to attempt the mission or not. - - Example: - - .. code-block:: javascript - - bladeburner.getActionCountRemaining("Contracts", "Tracking"); // returns: 124 \ No newline at end of file diff --git a/doc/source/netscript/bladeburnerapi/getActionCurrentLevel.rst b/doc/source/netscript/bladeburnerapi/getActionCurrentLevel.rst deleted file mode 100644 index 34d3aa37b..000000000 --- a/doc/source/netscript/bladeburnerapi/getActionCurrentLevel.rst +++ /dev/null @@ -1,15 +0,0 @@ -getActionCurrentLevel() Netscript Function -========================================== - -.. js:function:: getActionCurrentLevel(type, name) - - :RAM cost: 4 GB - :param string type: Type of action. See :ref:`bladeburner_action_types` - :param string name: Name of action. Must be an exact match. - :returns: Action current level, -1 for invalid actions. - - Example: - - .. code-block:: javascript - - bladeburner.getActionCurrentLevel("Contracts", "Tracking"); // returns: 9 \ No newline at end of file diff --git a/doc/source/netscript/bladeburnerapi/getActionEstimatedSuccessChance.rst b/doc/source/netscript/bladeburnerapi/getActionEstimatedSuccessChance.rst deleted file mode 100644 index e8015efdc..000000000 --- a/doc/source/netscript/bladeburnerapi/getActionEstimatedSuccessChance.rst +++ /dev/null @@ -1,15 +0,0 @@ -getActionEstimatedSuccessChance() Netscript Function -==================================================== - -.. js:function:: getActionEstimatedSuccessChance(type, name) - - :RAM cost: 4 GB - :param string type: Type of action. See :ref:`bladeburner_action_types` - :param string name: Name of action. Must be an exact match - :returns: Array of 2 number, lower and upper bound of the action chance. - - Example: - - .. code-block:: javascript - - bladeburner.getActionEstimatedSuccessChance("Contracts", "Tracking"); // returns: [.3, .6] diff --git a/doc/source/netscript/bladeburnerapi/getActionMaxLevel.rst b/doc/source/netscript/bladeburnerapi/getActionMaxLevel.rst deleted file mode 100644 index 92b48f875..000000000 --- a/doc/source/netscript/bladeburnerapi/getActionMaxLevel.rst +++ /dev/null @@ -1,15 +0,0 @@ -getActionMaxLevel() Netscript Function -====================================== - -.. js:function:: getActionMaxLevel(type, name) - - :RAM cost: 4 GB - :param string type: Type of action. See :ref:`bladeburner_action_types` - :param string name: Name of action. Must be an exact match - :returns: Action max level, -1 for invalid actions. - - Example: - - .. code-block:: javascript - - bladeburner.getActionMaxLevel("Contracts", "Tracking"); // returns: 15 diff --git a/doc/source/netscript/bladeburnerapi/getActionRepGain.rst b/doc/source/netscript/bladeburnerapi/getActionRepGain.rst deleted file mode 100644 index 5bfeda64d..000000000 --- a/doc/source/netscript/bladeburnerapi/getActionRepGain.rst +++ /dev/null @@ -1,18 +0,0 @@ -getActionRepGain() Netscript Function -===================================== - -.. js:function:: getActionRepGain(type, name[, level=current level]) - - :RAM cost: 4 GB - :param string type: Type of action. See :ref:`bladeburner_action_types` - :param string name: Name of action. Must be an exact match - :param number level: Optional action level at which to calculate the gain. - :returns: Average Bladeburner reputation gain for successfully completing - the specified action. Note that this value is an 'average' and the real - reputation gain may vary slightly from this value. - - Example: - - .. code-block:: javascript - - bladeburner.getActionRepGain("Contracts", "Tracking"); // returns: 341 \ No newline at end of file diff --git a/doc/source/netscript/bladeburnerapi/getActionTime.rst b/doc/source/netscript/bladeburnerapi/getActionTime.rst deleted file mode 100644 index e89f39c4f..000000000 --- a/doc/source/netscript/bladeburnerapi/getActionTime.rst +++ /dev/null @@ -1,16 +0,0 @@ -getActionTime() Netscript Function -================================== - -.. js:function:: getActionTime(type, name) - - :RAM cost: 4 GB - :param string type: Type of action. See :ref:`bladeburner_action_types` - :param string name: Name of action. Must be an exact match - :returns: Number of seconds it takes to complete the specified action. - - - Example: - - .. code-block:: javascript - - bladeburner.getActionTime("Contracts", "Tracking"); // returns: 4 diff --git a/doc/source/netscript/bladeburnerapi/getBlackOpNames.rst b/doc/source/netscript/bladeburnerapi/getBlackOpNames.rst deleted file mode 100644 index 310cdf681..000000000 --- a/doc/source/netscript/bladeburnerapi/getBlackOpNames.rst +++ /dev/null @@ -1,13 +0,0 @@ -getBlackOpNames() Netscript Function -==================================== - -.. js:function:: getBlackOpNames() - - :RAM cost: 0.4 GB - :returns: Array of strings containing the names of all Bladeburner Black Ops. - - Example: - - .. code-block:: javascript - - bladeburner.getBlackOpNames(); // returns: ["Operation Typhoon"] \ No newline at end of file diff --git a/doc/source/netscript/bladeburnerapi/getBlackOpRank.rst b/doc/source/netscript/bladeburnerapi/getBlackOpRank.rst deleted file mode 100644 index 850cef76c..000000000 --- a/doc/source/netscript/bladeburnerapi/getBlackOpRank.rst +++ /dev/null @@ -1,14 +0,0 @@ -getBlackOpRank() Netscript Function -==================================== - -.. js:function:: getBlackOpRank(name) - - :RAM cost: 2 GB - :param string name: name of the BlackOp. Must be an exact match. - :returns: Rank required to complete this BlackOp. -1 for invalid BlackOp. - - Example: - - .. code-block:: javascript - - bladeburner.getBlackOpRank("Operation Typhoon"); // returns: 2500 \ No newline at end of file diff --git a/doc/source/netscript/bladeburnerapi/getBonusTime.rst b/doc/source/netscript/bladeburnerapi/getBonusTime.rst deleted file mode 100644 index fc693a68f..000000000 --- a/doc/source/netscript/bladeburnerapi/getBonusTime.rst +++ /dev/null @@ -1,21 +0,0 @@ -getBonusTime() Netscript Function -================================= - -.. js:function:: getBonusTime() - - :RAM cost: 0 GB - :returns: Amount of accumulated "bonus time" (seconds) for the Bladeburner mechanic. - - "Bonus time" is accumulated when the game is offline or if the game is - inactive in the browser. - - "Bonus time" makes the game progress faster, up to 5x the normal speed. - For example, if an action takes 30 seconds to complete but you've accumulated - over 30 seconds in bonus time, then the action will only take 6 seconds - in real life to complete. - - Example: - - .. code-block:: javascript - - bladeburner.getBonusTime(); // returns: 130 diff --git a/doc/source/netscript/bladeburnerapi/getCity.rst b/doc/source/netscript/bladeburnerapi/getCity.rst deleted file mode 100644 index 49a6bd1b9..000000000 --- a/doc/source/netscript/bladeburnerapi/getCity.rst +++ /dev/null @@ -1,13 +0,0 @@ -getCity() Netscript Function -============================ - -.. js:function:: getCity() - - :RAM cost: 4 GB - :returns: City that the player is currently in (for Bladeburner). - - Example: - - .. code-block:: javascript - - bladeburner.getCity(); // returns: "Sector-12" diff --git a/doc/source/netscript/bladeburnerapi/getCityChaos.rst b/doc/source/netscript/bladeburnerapi/getCityChaos.rst deleted file mode 100644 index e17fa7d8b..000000000 --- a/doc/source/netscript/bladeburnerapi/getCityChaos.rst +++ /dev/null @@ -1,14 +0,0 @@ -getCityChaos() Netscript Function -================================= - -.. js:function:: getCityChaos(cityName) - - :RAM cost: 4 GB - :param string cityName: Name of city. Case-sensitive - :returns: Chaos in the specified city, or -1 if an invalid city was specified. - - Example: - - .. code-block:: javascript - - bladeburner.getCityChaos("Sector-12"); // returns: 3800.1 diff --git a/doc/source/netscript/bladeburnerapi/getCityCommunities.rst b/doc/source/netscript/bladeburnerapi/getCityCommunities.rst deleted file mode 100644 index 297c2f9e2..000000000 --- a/doc/source/netscript/bladeburnerapi/getCityCommunities.rst +++ /dev/null @@ -1,15 +0,0 @@ -getCityCommunities() Netscript Function -================================================ - -.. js:function:: getCityCommunities(cityName) - - :RAM cost: 4 GB - :param string cityName: Name of city. Case-sensitive - :returns: Confirmed number of Synthoid communities in the specified city, - or -1 if an invalid city was specified. - - Example: - - .. code-block:: javascript - - bladeburner.getCityCommunities("Sector-12"); // returns: 76 \ No newline at end of file diff --git a/doc/source/netscript/bladeburnerapi/getCityEstimatedPopulation.rst b/doc/source/netscript/bladeburnerapi/getCityEstimatedPopulation.rst deleted file mode 100644 index bca2c69ed..000000000 --- a/doc/source/netscript/bladeburnerapi/getCityEstimatedPopulation.rst +++ /dev/null @@ -1,15 +0,0 @@ -getCityEstimatedPopulation() Netscript Function -=============================================== - -.. js:function:: getCityEstimatedPopulation(cityName) - - :RAM cost: 4 GB - :param string cityName: Name of city. Case-sensitive - :returns: Estimated number of Synthoids in the specified city, or -1 if an - invalid city was specified. - - Example: - - .. code-block:: javascript - - bladeburner.getCityEstimatedPopulation("Sector-12"); // returns: 1240000 \ No newline at end of file diff --git a/doc/source/netscript/bladeburnerapi/getContractNames.rst b/doc/source/netscript/bladeburnerapi/getContractNames.rst deleted file mode 100644 index 612d8e6a4..000000000 --- a/doc/source/netscript/bladeburnerapi/getContractNames.rst +++ /dev/null @@ -1,13 +0,0 @@ -getContractNames() Netscript Function -===================================== - -.. js:function:: getContractNames() - - :RAM cost: 0.4 GB - :returns: Array of strings containing the names of all Bladeburner contracts. - - Example: - - .. code-block:: javascript - - bladeburner.getContractNames(); // returns: ["Tracking"] \ No newline at end of file diff --git a/doc/source/netscript/bladeburnerapi/getCurrentAction.rst b/doc/source/netscript/bladeburnerapi/getCurrentAction.rst deleted file mode 100644 index ef4821bbf..000000000 --- a/doc/source/netscript/bladeburnerapi/getCurrentAction.rst +++ /dev/null @@ -1,25 +0,0 @@ -getCurrentAction() Netscript Function -===================================== - -.. js:function:: getCurrentAction() - - :RAM cost: 1 GB - :returns: An object that represents the player's current Bladeburner action. - - Result:: - - { - type: Type of Action - name: Name of Action - } - - If the player is not performing an action, the function will return an object - with the 'type' property set to "Idle". - - Example: - - .. code-block:: javascript - - action = bladeburner.getCurrentAction(); - print(action.type); // "Contracts" - print(action.name); // "Tracking" diff --git a/doc/source/netscript/bladeburnerapi/getGeneralActionNames.rst b/doc/source/netscript/bladeburnerapi/getGeneralActionNames.rst deleted file mode 100644 index a853fbd38..000000000 --- a/doc/source/netscript/bladeburnerapi/getGeneralActionNames.rst +++ /dev/null @@ -1,13 +0,0 @@ -getGeneralActionNames() Netscript Function -========================================== - -.. js:function:: getGeneralActionNames() - - :RAM cost: 0.4 GB - :returns: Array of strings containing the names of all general Bladeburner actions. - - Example: - - .. code-block:: javascript - - bladeburner.getGeneralActionNames(); // returns: ["Training"] diff --git a/doc/source/netscript/bladeburnerapi/getOperationNames.rst b/doc/source/netscript/bladeburnerapi/getOperationNames.rst deleted file mode 100644 index dbb4497be..000000000 --- a/doc/source/netscript/bladeburnerapi/getOperationNames.rst +++ /dev/null @@ -1,13 +0,0 @@ -getOperationNames() Netscript Function -====================================== - -.. js:function:: getOperationNames() - - :RAM cost: 0.4 GB - :returns: Array of strings containing the names of all Bladeburner operations. - - Example: - - .. code-block:: javascript - - bladeburner.getOperationNames(); // returns: ["Investigation"] diff --git a/doc/source/netscript/bladeburnerapi/getRank.rst b/doc/source/netscript/bladeburnerapi/getRank.rst deleted file mode 100644 index fec20883c..000000000 --- a/doc/source/netscript/bladeburnerapi/getRank.rst +++ /dev/null @@ -1,13 +0,0 @@ -getRank() Netscript Function -============================ - -.. js:function:: getRank() - - :RAM cost: 4 GB - :returns: Player's Bladeburner Rank. - - Example: - - .. code-block:: javascript - - bladeburner.getRank(); // returns: 87135 diff --git a/doc/source/netscript/bladeburnerapi/getSkillLevel.rst b/doc/source/netscript/bladeburnerapi/getSkillLevel.rst deleted file mode 100644 index 0f116dae1..000000000 --- a/doc/source/netscript/bladeburnerapi/getSkillLevel.rst +++ /dev/null @@ -1,14 +0,0 @@ -getSkillLevel() Netscript Function -================================== - -.. js:function:: getSkillLevel(skillName) - - :RAM cost: 4 GB - :param string skillName: Name of skill. Case-sensitive. - :returns: Level of specified skill, -1 for invalid skills. - - Example: - - .. code-block:: javascript - - bladeburner.getSkillLevel("Overclock"); // returns: 90 \ No newline at end of file diff --git a/doc/source/netscript/bladeburnerapi/getSkillNames.rst b/doc/source/netscript/bladeburnerapi/getSkillNames.rst deleted file mode 100644 index 70a811fb6..000000000 --- a/doc/source/netscript/bladeburnerapi/getSkillNames.rst +++ /dev/null @@ -1,13 +0,0 @@ -getSkillNames() Netscript Function -================================== - -.. js:function:: getSkillNames() - - :RAM cost: 0.4 GB - :returns: Array of strings containing the names of all Bladeburner skills. - - Example: - - .. code-block:: javascript - - bladeburner.getSkillNames(); // returns: ["Overclock"] diff --git a/doc/source/netscript/bladeburnerapi/getSkillPoints.rst b/doc/source/netscript/bladeburnerapi/getSkillPoints.rst deleted file mode 100644 index 7323cfb07..000000000 --- a/doc/source/netscript/bladeburnerapi/getSkillPoints.rst +++ /dev/null @@ -1,13 +0,0 @@ -getSkillPoints() Netscript Function -=================================== - -.. js:function:: getSkillPoints() - - :RAM cost: 4 GB - :returns: Amount of Bladeburner skill points you have. - - Example: - - .. code-block:: javascript - - bladeburner.getSkillPoints(); // returns: 1630 \ No newline at end of file diff --git a/doc/source/netscript/bladeburnerapi/getSkillUpgradeCost.rst b/doc/source/netscript/bladeburnerapi/getSkillUpgradeCost.rst deleted file mode 100644 index 27c509615..000000000 --- a/doc/source/netscript/bladeburnerapi/getSkillUpgradeCost.rst +++ /dev/null @@ -1,14 +0,0 @@ -getSkillUpgradeCost() Netscript Function -======================================== - -.. js:function:: getSkillUpgradeCost(skillName) - - :RAM cost: 4 GB - :param string skillName: Name of skill. Case-sensitive and must be an exact match - :returns: Amount of skill points needed to upgrade the specified skill. -1 for invalid skills. - - Example: - - .. code-block:: javascript - - bladeburner.getSkillUpgradeCost("Overclock"); // returns: 120 diff --git a/doc/source/netscript/bladeburnerapi/getStamina.rst b/doc/source/netscript/bladeburnerapi/getStamina.rst deleted file mode 100644 index 9fbc50ab1..000000000 --- a/doc/source/netscript/bladeburnerapi/getStamina.rst +++ /dev/null @@ -1,14 +0,0 @@ -getStamina() Netscript Function -=============================== - -.. js:function:: getStamina() - - :RAM cost: 4 GB - :returns: Array with two elements [Current stamina, Max stamina] - - Example: - - .. code-block:: javascript - - res = bladeburner.getStamina(); - percentage = res[0] / res[1]; diff --git a/doc/source/netscript/bladeburnerapi/getTeamSize.rst b/doc/source/netscript/bladeburnerapi/getTeamSize.rst deleted file mode 100644 index f0052768d..000000000 --- a/doc/source/netscript/bladeburnerapi/getTeamSize.rst +++ /dev/null @@ -1,19 +0,0 @@ -getTeamSize() Netscript Function -================================ - -.. js:function:: getTeamSize(type, name) - - :RAM cost: 4 GB - :param string type: Type of action. See :ref:`bladeburner_action_types` - :param string name: Name of action. Must be an exact match - :returns: Number of Bladeburner team members you have assigned to the - specified action. - - Setting a team is only applicable for Operations and BlackOps. This function - will return 0 for other action types. - - Example: - - .. code-block:: javascript - - bladeburner.getTeamSize("Operations", "Investigation"); // returns: 7 \ No newline at end of file diff --git a/doc/source/netscript/bladeburnerapi/joinBladeburnerDivision.rst b/doc/source/netscript/bladeburnerapi/joinBladeburnerDivision.rst deleted file mode 100644 index 5274c4e1f..000000000 --- a/doc/source/netscript/bladeburnerapi/joinBladeburnerDivision.rst +++ /dev/null @@ -1,16 +0,0 @@ -joinBladeburnerDivision() Netscript Function -============================================ - -.. js:function:: joinBladeburnerDivision() - - :RAM cost: 4 GB - :returns: ``true`` if you successfully join the Bladeburner division, or if you - are already a member. - - Attempts to join the Bladeburner division. - - Example: - - .. code-block:: javascript - - bladeburner.joinBladeburnerDivision(); // returns: true \ No newline at end of file diff --git a/doc/source/netscript/bladeburnerapi/joinBladeburnerFaction.rst b/doc/source/netscript/bladeburnerapi/joinBladeburnerFaction.rst deleted file mode 100644 index 26c4f40cc..000000000 --- a/doc/source/netscript/bladeburnerapi/joinBladeburnerFaction.rst +++ /dev/null @@ -1,16 +0,0 @@ -joinBladeburnerFaction() Netscript Function -=========================================== - -.. js:function:: joinBladeburnerFaction() - - :RAM cost: 4 GB - :returns: ``true`` if you successfully join the Bladeburner faction, or if - you are already a member. - - Attempts to join the Bladeburner faction. - - Example: - - .. code-block:: javascript - - bladeburner.joinBladeburnerFaction(); // returns: true \ No newline at end of file diff --git a/doc/source/netscript/bladeburnerapi/setActionAutolevel.rst b/doc/source/netscript/bladeburnerapi/setActionAutolevel.rst deleted file mode 100644 index aa42d7af5..000000000 --- a/doc/source/netscript/bladeburnerapi/setActionAutolevel.rst +++ /dev/null @@ -1,17 +0,0 @@ -setActionAutolevel() Netscript Function -======================================= - -.. js:function:: setActionAutolevel(type, name, autoLevel) - - :RAM cost: 4 GB - :param string type: Type of action. See :ref:`bladeburner_action_types` - :param string name: Name of action. Must be an exact match - :param boolean autoLevel: Whether or not to autolevel this action - - Enable/disable autoleveling for the specified action. - - Example: - - .. code-block:: javascript - - bladeburner.setActionAutolevel("Contracts", "Tracking", true); diff --git a/doc/source/netscript/bladeburnerapi/setActionLevel.rst b/doc/source/netscript/bladeburnerapi/setActionLevel.rst deleted file mode 100644 index 23a274940..000000000 --- a/doc/source/netscript/bladeburnerapi/setActionLevel.rst +++ /dev/null @@ -1,17 +0,0 @@ -setActionLevel() Netscript Function -=================================== - -.. js:function:: setActionLevel(type, name, level) - - :RAM cost: 4 GB - :param string type: Type of action. See :ref:`bladeburner_action_types` - :param string name: Name of action. Must be an exact match - :param level int: Level to set this action to - - Set the level for the specified action. - - Example: - - .. code-block:: javascript - - bladeburner.setActionLevel("Contracts", "Tracking", 10); diff --git a/doc/source/netscript/bladeburnerapi/setTeamSize.rst b/doc/source/netscript/bladeburnerapi/setTeamSize.rst deleted file mode 100644 index 630d71af0..000000000 --- a/doc/source/netscript/bladeburnerapi/setTeamSize.rst +++ /dev/null @@ -1,18 +0,0 @@ -setTeamSize() Netscript Function -================================ - -.. js:function:: setTeamSize(type, name, size) - - :RAM cost: 4 GB - :param string type: Type of action. See :ref:`bladeburner_action_types` - :param string name: Name of action. Must be an exact match - :param int size: Number of team members to set. Will be converted using Math.round() - :returns: Team size or -1 for invalid actions. - - Set the team size for the specified Bladeburner action. - - Example: - - .. code-block:: javascript - - bladeburner.setTeamSize("Operations", "Investigation", 7); \ No newline at end of file diff --git a/doc/source/netscript/bladeburnerapi/startAction.rst b/doc/source/netscript/bladeburnerapi/startAction.rst deleted file mode 100644 index c2e7cfc7a..000000000 --- a/doc/source/netscript/bladeburnerapi/startAction.rst +++ /dev/null @@ -1,17 +0,0 @@ -startAction() Netscript Function -================================ - -.. js:function:: startAction(type, name) - - :RAM cost: 4 GB - :param string type: Type of action. See :ref:`bladeburner_action_types` - :param string name: Name of action. Must be an exact match - :returns: ``true`` if the action was started successfully. - - Attempts to start the specified Bladeburner action. - - Example: - - .. code-block:: javascript - - bladeburner.startAction("Contracts", "Tracking"); // returns: true \ No newline at end of file diff --git a/doc/source/netscript/bladeburnerapi/stopBladeburnerAction.rst b/doc/source/netscript/bladeburnerapi/stopBladeburnerAction.rst deleted file mode 100644 index abb86f97e..000000000 --- a/doc/source/netscript/bladeburnerapi/stopBladeburnerAction.rst +++ /dev/null @@ -1,14 +0,0 @@ -stopBladeburnerAction() Netscript Function -========================================== - -.. js:function:: stopBladeburnerAction() - - :RAM cost: 2 GB - - Stops the current Bladeburner action - - Example: - - .. code-block:: javascript - - bladeburner.stopBladeburnerAction(); \ No newline at end of file diff --git a/doc/source/netscript/bladeburnerapi/switchCity.rst b/doc/source/netscript/bladeburnerapi/switchCity.rst deleted file mode 100644 index ead7399dc..000000000 --- a/doc/source/netscript/bladeburnerapi/switchCity.rst +++ /dev/null @@ -1,16 +0,0 @@ -switchCity() Netscript Function -=============================== - -.. js:function:: switchCity(cityName) - - :RAM cost: 4 GB - :param string cityName: Name of city - :returns: ``true`` if successful. - - Attempts to switch to the specified city (for Bladeburner only). - - Example: - - .. code-block:: javascript - - bladeburner.switchCity("Sector-12"); // returns: true diff --git a/doc/source/netscript/bladeburnerapi/upgradeSkill.rst b/doc/source/netscript/bladeburnerapi/upgradeSkill.rst deleted file mode 100644 index b5ceb43eb..000000000 --- a/doc/source/netscript/bladeburnerapi/upgradeSkill.rst +++ /dev/null @@ -1,16 +0,0 @@ -upgradeSkill() Netscript Function -================================= - -.. js:function:: upgradeSkill(skillName) - - :RAM cost: 4 GB - :param string skillName: Name of Skill to be upgraded. Case-sensitive and must be an exact match - :returns: ``true`` if the skill is successfully upgraded. - - Attempts to upgrade the specified Bladeburner skill. - - Example: - - .. code-block:: javascript - - bladeburner.upgradeSkill("Overclock"); // returns: true \ No newline at end of file diff --git a/doc/source/netscript/codingcontractapi/attempt.rst b/doc/source/netscript/codingcontractapi/attempt.rst deleted file mode 100644 index a0d569aec..000000000 --- a/doc/source/netscript/codingcontractapi/attempt.rst +++ /dev/null @@ -1,27 +0,0 @@ -attempt() Netscript Function -============================ - -.. js:function:: attempt(answer, filename[, hostname=current hostname[, opts={}]]) - - :RAM cost: 10 GB - :param answer: Solution for the contract - :param string filename: Filename of the contract - :param string hostname: Hostname of the server containing the contract. - Optional. Defaults to current server if not provided - :param object opts: Optional parameters for configuring function behavior. Properties: - - * returnReward (*boolean*) If truthy, then the function will return a string - that states the contract's reward when it is successfully solved. - :returns: ``true`` if the solution was correct. If the :code:`returnReward` - option is configured, then the function will instead return a - string. If the contract is successfully solved, the string will - contain a description of the contract's reward. Otherwise, it will - be an empty string. - - Attempts to solve the Coding Contract with the provided solution. - - Example: - - .. code-block:: javascript - - codingcontract.attempt("myanswer!", "contract-123.cct", "home"); diff --git a/doc/source/netscript/codingcontractapi/getContractType.rst b/doc/source/netscript/codingcontractapi/getContractType.rst deleted file mode 100644 index 401a981e6..000000000 --- a/doc/source/netscript/codingcontractapi/getContractType.rst +++ /dev/null @@ -1,19 +0,0 @@ -getContractType() Netscript Function -==================================== - -.. js:function:: getContractType(filename[, hostname=current hostname]) - - :RAM cost: 5 GB - :param string filename: Filename of the contract - :param string hostname: Hostname of the server containing the contract. - Optional. Defaults to current server if not provided - :returns: A string with the contract's problem type - - Describes the type of problem posed by the Coding Contract. - (e.g. Find Largest Prime Factor, Total Ways to Sum, etc.) - - Example: - - .. code-block:: javascript - - codingcontract.getContractType("contract-123.cct", "home"); diff --git a/doc/source/netscript/codingcontractapi/getData.rst b/doc/source/netscript/codingcontractapi/getData.rst deleted file mode 100644 index f067674a5..000000000 --- a/doc/source/netscript/codingcontractapi/getData.rst +++ /dev/null @@ -1,23 +0,0 @@ -getData() Netscript Function -============================ - -.. js:function:: getData(filename[, hostname=current hostname]) - - :RAM cost: 5 GB - :param string filename: Filename of the contract - :param string hostname: Hostname of the server containing the contract. - Optional. Defaults to current server if not provided - :returns: The specified contract's data. Different data type depending on - contract type. - - Get the data associated with the specific Coding Contract. Note that this is - not the same as the contract's description; this is just the data that - the contract wants you to act on in order to solve. - - Example: - - .. code-block:: javascript - - data = codingcontract.getData("contract-123.cct", "home"); - answer = solve(data); - codingcontract.attempt(answer, "contract-123.cct", "home"); diff --git a/doc/source/netscript/codingcontractapi/getDescription.rst b/doc/source/netscript/codingcontractapi/getDescription.rst deleted file mode 100644 index c6dc50713..000000000 --- a/doc/source/netscript/codingcontractapi/getDescription.rst +++ /dev/null @@ -1,18 +0,0 @@ -getDescription() Netscript Function -=================================== - -.. js:function:: getDescription(filename[, hostname=current hostname]) - - :RAM cost: 5 GB - :param string filename: Filename of the contract - :param string hostname: Hostname of the server containing the contract. - Optional. Defaults to current server if not provided - :returns: A string with the contract's text description - - Get the full text description for the problem posed by the Coding Contract. - - Example: - - .. code-block:: javascript - - codingcontract.getDescription("contract-123.cct", "home"); diff --git a/doc/source/netscript/codingcontractapi/getNumTriesRemaining.rst b/doc/source/netscript/codingcontractapi/getNumTriesRemaining.rst deleted file mode 100644 index 9f0b469e3..000000000 --- a/doc/source/netscript/codingcontractapi/getNumTriesRemaining.rst +++ /dev/null @@ -1,19 +0,0 @@ -getNumTriesRemaining() Netscript Function -========================================= - -.. js:function:: getNumTriesRemaining(filename[, hostname=current hostname]) - - :RAM cost: 2 GB - :param string filename: Filename of the contract - :param string hostname: Hostname of the server containing the contract. - Optional. Defaults to current server if not provided - :returns: Number indicating how many attempts are remaining - - Get the number of tries remaining on the contract before it - self-destructs. - - Example: - - .. code-block:: javascript - - codingcontract.getNumTriesRemaining("contract-123.cct", "home"); // returns: 5 diff --git a/doc/source/netscript/formulasapi/basic/calculateExp.rst b/doc/source/netscript/formulasapi/basic/calculateExp.rst deleted file mode 100644 index 1c27027fb..000000000 --- a/doc/source/netscript/formulasapi/basic/calculateExp.rst +++ /dev/null @@ -1,25 +0,0 @@ -calculateExp() Netscript Function -================================= - -.. js:function:: calculateExp(skillLevel[, mult]) - - :RAM cost: 0 GB - :param number skillLevel: ``skillLevel`` to convert to exp. - :param number mult: Assume a specific skill multipler (not exp multiplier). - :returns: number of exp required to reach given ``skillLevel`` with that multiplier. - - If you are not in BitNode-5, then you must have Source-File 5-1 in order to - use this function. - - This function calculates the amount of experience needed to reach the given - ``skillLevel``. - - Examples: - - .. code-block:: javascript - - var player = getPlayer(); - var nextHacking = player.hacking_skill+1; - var nextExp = formulas.basic.calculateExp(nextHacking); - var missingExp = nextExp - player.hacking_exp; - tprint("Missing " + missingExp + " to reach next hacking level"); diff --git a/doc/source/netscript/formulasapi/basic/calculateSkill.rst b/doc/source/netscript/formulasapi/basic/calculateSkill.rst deleted file mode 100644 index 48e157102..000000000 --- a/doc/source/netscript/formulasapi/basic/calculateSkill.rst +++ /dev/null @@ -1,21 +0,0 @@ -calculateSkill() Netscript Function -=================================== - -.. js:function:: calculateSkill(exp[, mult]) - - :RAM cost: 0 GB - :param number exp: ``exp`` to convert to skillLevel. - :param number mult: Assume a specific skill multipler (not exp multiplier). - :returns: skillLevel that ``exp`` would reach with that multiplier. - - If you are not in BitNode-5, then you must have Source-File 5-1 in order to - use this function. - - This function calculates the skillLevel that the given amount of ``exp`` would reach. - - Examples: - - .. code-block:: javascript - - skillLevel = formulas.basic.calculateSkill(1000); - tprint("1000 exp would reach level " + skillLevel); diff --git a/doc/source/netscript/formulasapi/basic/growPercent.rst b/doc/source/netscript/formulasapi/basic/growPercent.rst deleted file mode 100644 index bbaa39bb1..000000000 --- a/doc/source/netscript/formulasapi/basic/growPercent.rst +++ /dev/null @@ -1,28 +0,0 @@ -growPercent() Netscript Function -================================= - -.. js:function:: growPercent(server, threads, player, cores) - - :RAM cost: 0 GB - :param server server: The server that receives the growth. - :param number threads: The number of thread that would be used. - :param player player: The player. - :param number cores: The amount of cores on the host computer. - :returns: The amount the server's money would be multiplied by with these - parameters. - - If you are not in BitNode-5, then you must have Source-File 5-1 in order to - use this function. - - Server can be acquired with the :doc:`getServer<../../advancedfunctions/getServer>` function. - Player can be acquired with the :doc:`getPlayer<../../basicfunctions/getPlayer>` function. - - This function calculates the amount of growth, as a multiplier, a server - would receive with these parameters. Despite its name, it does not return - a percentage. - - Examples: - - .. code-block:: javascript - - tprint(formulas.basic.growPercent(getServer(), 50, getPlayer())) diff --git a/doc/source/netscript/formulasapi/basic/growTime.rst b/doc/source/netscript/formulasapi/basic/growTime.rst deleted file mode 100644 index ec04ec3c6..000000000 --- a/doc/source/netscript/formulasapi/basic/growTime.rst +++ /dev/null @@ -1,25 +0,0 @@ -growTime() Netscript Function -================================= - -.. js:function:: growTime(server, player) - - :RAM cost: 0 GB - :param server server: The server to grow. - :param player player: The player. - :returns: The time it takes to grow this server. In seconds. - - If you are not in BitNode-5, then you must have Source-File 5-1 in order to - use this function. - - Server can be acquired with the :doc:`getServer<../../advancedfunctions/getServer>` function. - Player can be acquired with the :doc:`getPlayer<../../basicfunctions/getPlayer>` function. - - This function calculates the amount of time it takes to grow a server. - - Examples: - - .. code-block:: javascript - - server = getServer(); - server.hackDifficulty = server.minDifficulty; - tprint(formulas.basic.growTime(server, getPlayer())); diff --git a/doc/source/netscript/formulasapi/basic/hackChance.rst b/doc/source/netscript/formulasapi/basic/hackChance.rst deleted file mode 100644 index 04a617bad..000000000 --- a/doc/source/netscript/formulasapi/basic/hackChance.rst +++ /dev/null @@ -1,25 +0,0 @@ -hackChance() Netscript Function -================================= - -.. js:function:: hackChance(server, player) - - :RAM cost: 0 GB - :param server server: The server to hack. - :param player player: The player. - :returns: The chance to hack that server, between 0 and 1. - - If you are not in BitNode-5, then you must have Source-File 5-1 in order to - use this function. - - Server can be acquired with the :doc:`getServer<../../advancedfunctions/getServer>` function. - Player can be acquired with the :doc:`getPlayer<../../basicfunctions/getPlayer>` function. - - This function calculates the probability to successfully hack a server. - - Examples: - - .. code-block:: javascript - - var server = getServer(); - server.hackDifficulty = server.minDifficulty; - tprint(formulas.basic.hackChance(server, getPlayer())); diff --git a/doc/source/netscript/formulasapi/basic/hackExp.rst b/doc/source/netscript/formulasapi/basic/hackExp.rst deleted file mode 100644 index 38d49b7df..000000000 --- a/doc/source/netscript/formulasapi/basic/hackExp.rst +++ /dev/null @@ -1,23 +0,0 @@ -hackExp() Netscript Function -================================= - -.. js:function:: hackExp(server, player) - - :RAM cost: 0 GB - :param server server: The server to hack. - :param player player: The player. - :returns: The amount of exp that would be acquired if this server were to be hacked. - - If you are not in BitNode-5, then you must have Source-File 5-1 in order to - use this function. - - Server can be acquired with the :doc:`getServer<../../advancedfunctions/getServer>` function. - Player can be acquired with the :doc:`getPlayer<../../basicfunctions/getPlayer>` function. - - This function calculates the amount of exp obtained by hacking a server. - - Examples: - - .. code-block:: javascript - - tprint(formulas.basic.hackExp(getServer(), getPlayer())); diff --git a/doc/source/netscript/formulasapi/basic/hackPercent.rst b/doc/source/netscript/formulasapi/basic/hackPercent.rst deleted file mode 100644 index 2a447c21b..000000000 --- a/doc/source/netscript/formulasapi/basic/hackPercent.rst +++ /dev/null @@ -1,26 +0,0 @@ -hackPercent() Netscript Function -================================= - -.. js:function:: hackPercent(server, player) - - :RAM cost: 0 GB - :param server server: The server to hack. - :param player player: The player. - :returns: The percentage of money hacked from the server's money. - - If you are not in BitNode-5, then you must have Source-File 5-1 in order to - use this function. - - Server can be acquired with the :doc:`getServer<../../advancedfunctions/getServer>` function. - Player can be acquired with the :doc:`getPlayer<../../basicfunctions/getPlayer>` function. - - This function calculates the percentage of money hacked from a server. - Multiply this by thread count to calculate the percentage for more than 1 thread. - - Examples: - - .. code-block:: javascript - - server = getServer(); - server.hackDifficulty = server.minDifficulty; - tprint(formulas.basic.hackPercent(server, getPlayer())); diff --git a/doc/source/netscript/formulasapi/basic/hackTime.rst b/doc/source/netscript/formulasapi/basic/hackTime.rst deleted file mode 100644 index 64e7fa8c1..000000000 --- a/doc/source/netscript/formulasapi/basic/hackTime.rst +++ /dev/null @@ -1,25 +0,0 @@ -hackTime() Netscript Function -================================= - -.. js:function:: hackTime(server, player) - - :RAM cost: 0 GB - :param server server: The server to hack. - :param player player: The player. - :returns: The time it takes to hack this server. In seconds. - - If you are not in BitNode-5, then you must have Source-File 5-1 in order to - use this function. - - Server can be acquired with the :doc:`getServer<../../advancedfunctions/getServer>` function. - Player can be acquired with the :doc:`getPlayer<../../basicfunctions/getPlayer>` function. - - This function calculates the amount of time it takes to hack a server. - - Examples: - - .. code-block:: javascript - - server = getServer(); - server.hackDifficulty = server.minDifficulty; - tprint(formulas.basic.hackTime(server, getPlayer())); diff --git a/doc/source/netscript/formulasapi/basic/weakenTime.rst b/doc/source/netscript/formulasapi/basic/weakenTime.rst deleted file mode 100644 index 4e9f0276f..000000000 --- a/doc/source/netscript/formulasapi/basic/weakenTime.rst +++ /dev/null @@ -1,25 +0,0 @@ -weakenTime() Netscript Function -================================= - -.. js:function:: weakenTime(server, player) - - :RAM cost: 0 GB - :param server server: The server to weaken. - :param player player: The player. - :returns: The time it takes to weaken this server. In seconds. - - If you are not in BitNode-5, then you must have Source-File 5-1 in order to - use this function. - - Server can be acquired with the :doc:`getServer<../../advancedfunctions/getServer>` function. - Player can be acquired with the :doc:`getPlayer<../../basicfunctions/getPlayer>` function. - - This function calculates the amount of time it takes to weaken a server. - - Examples: - - .. code-block:: javascript - - server = getServer(); - server.hackDifficulty = server.minDifficulty; - tprint(formulas.basic.weakenTime(server, getPlayer())); diff --git a/doc/source/netscript/formulasapi/hacknetNodes/constants.rst b/doc/source/netscript/formulasapi/hacknetNodes/constants.rst deleted file mode 100644 index d13026f32..000000000 --- a/doc/source/netscript/formulasapi/hacknetNodes/constants.rst +++ /dev/null @@ -1,33 +0,0 @@ -constants() Netscript Function -============================== - -.. js:function:: constants() - - :RAM cost: 0 GB - :returns: A structure with various constants related to hacknet nodes. - - If you are not in BitNode-5, then you must have Source-File 5-1 in order to - use this function. - - Returns an object with the following properties:: - - { - MoneyGainPerLevel: Multiplied by the node's level to get the node's base income - BaseCost: A multiplier used when buying new nodes or upgrading levels - LevelBaseCost: A multiplier used when upgrading levels - RamBaseCost: A multiplier used when upgrading RAM - CoreBaseCost: A multiplier used when buying additional cores - PurchaseNextMult: The root of an exponent used when buying new nodes - UpgradeLevelMult: The root of an exponent used when upgrading levels - UpgradeRamMult: The root of an exponent used when upgrading RAM - UpgradeCoreMult: The root of an exponent used when buying additional cores - MaxLevel: Maximum level a node can have - MaxRam: Maximum RAM a node can have - MaxCores: Maximum number of cores a node can have - } - - Examples: - - .. code-block:: javascript - - tprint("Maximum RAM a hacknet node can have: "+formulas.hacknetNodes.constants().MaxRam+" GB."); diff --git a/doc/source/netscript/formulasapi/hacknetNodes/coreUpgradeCost.rst b/doc/source/netscript/formulasapi/hacknetNodes/coreUpgradeCost.rst deleted file mode 100644 index 6f84eb794..000000000 --- a/doc/source/netscript/formulasapi/hacknetNodes/coreUpgradeCost.rst +++ /dev/null @@ -1,21 +0,0 @@ -coreUpgradeCost() Netscript Function -============================================= - -.. js:function:: coreUpgradeCost(startingCores[, extraCores[, costMult]]) - - :RAM cost: 0 GB - :param number startingCores: Number of core at the start the calculation. - :param number extraCores: Extra number of cores you want to buy. Default to ``1``. - :param number costMult: Aug multiplier that reduces cost. Defaults to ``1``. - :returns: Money required to go from ``startingCores`` to ``startingCores+extraCores``. - - If you are not in BitNode-5, then you must have Source-File 5-1 in order to - use this function. - - This function calculates the cost of upgrading cores from any level to any level. - - Examples: - - .. code-block:: javascript - - formulas.hacknetNodes.coreUpgradeCost(1, 5); // returns: 6355000 diff --git a/doc/source/netscript/formulasapi/hacknetNodes/hacknetNodeCost.rst b/doc/source/netscript/formulasapi/hacknetNodes/hacknetNodeCost.rst deleted file mode 100644 index 71a9b9523..000000000 --- a/doc/source/netscript/formulasapi/hacknetNodes/hacknetNodeCost.rst +++ /dev/null @@ -1,20 +0,0 @@ -hacknetNodeCost() Netscript Function -============================================= - -.. js:function:: hacknetNodeCost(nodeN[, costMult]]) - - :RAM cost: 0 GB - :param number nodeN: Number of the new node. - :param number costMult: Aug multiplier that reduces cost. Defaults to ``1``. - :returns: Money required to buy your ``nodeN`` th node. - - If you are not in BitNode-5, then you must have Source-File 5-1 in order to - use this function. - - This function calculates the cost purchasing a hacknet node. - - Examples: - - .. code-block:: javascript - - formulas.hacknetNodes.hacknetNodeCost(2); // returns: 1800 diff --git a/doc/source/netscript/formulasapi/hacknetNodes/levelUpgradeCost.rst b/doc/source/netscript/formulasapi/hacknetNodes/levelUpgradeCost.rst deleted file mode 100644 index a700a00c3..000000000 --- a/doc/source/netscript/formulasapi/hacknetNodes/levelUpgradeCost.rst +++ /dev/null @@ -1,21 +0,0 @@ -levelUpgradeCost() Netscript Function -============================================== - -.. js:function:: levelUpgradeCost(startingLevel[, extraLevels[, costMult]]) - - :RAM cost: 0 GB - :param number startingLevel: Number of level at the start the calculation. - :param number extraLevels: Extra number of levels you want to buy. Default to ``1``. - :param number costMult: Aug multiplier that reduces cost. Defaults to ``1``. - :returns: Money required to go from ``startingLevel`` to ``startingLevel+extraLevels``. - - If you are not in BitNode-5, then you must have Source-File 5-1 in order to - use this function. - - This function calculates the cost of upgrading levels from any level to any level. - - Examples: - - .. code-block:: javascript - - formulas.hacknetNodes.levelUpgradeCost(1, 5); // returns: 2816 diff --git a/doc/source/netscript/formulasapi/hacknetNodes/moneyGainRate.rst b/doc/source/netscript/formulasapi/hacknetNodes/moneyGainRate.rst deleted file mode 100644 index 05e5b390c..000000000 --- a/doc/source/netscript/formulasapi/hacknetNodes/moneyGainRate.rst +++ /dev/null @@ -1,25 +0,0 @@ -moneyGainRate() Netscript Function -=========================================== - -.. js:function:: moneyGainRate(level, ram, core[, mult]) - - :RAM cost: 0 GB - :param number level: level of the node. - :param number ram: ram of the node. - :param number core: cores of the node. - :returns: Money per second that a node with those stats would gain per second. - - If you are not in BitNode-5, then you must have Source-File 5-1 in order to - use this function. - - This function calculates the money rate of a node with the given stats. - - Examples: - - .. code-block:: javascript - - node = hacknet.getNodeStats(1); - currentRate = formulas.hacknetNodes.moneyGainRate(node.level, node.ram, node.cores); - levelRate = formulas.hacknetNodes.moneyGainRate(node.level+1, node.ram, node.cores); - ramRate = formulas.hacknetNodes.moneyGainRate(node.level, node.ram*2, node.cores); - coresRate = formulas.hacknetNodes.moneyGainRate(node.level, node.ram, node.cores+1); diff --git a/doc/source/netscript/formulasapi/hacknetNodes/ramUpgradeCost.rst b/doc/source/netscript/formulasapi/hacknetNodes/ramUpgradeCost.rst deleted file mode 100644 index a7e517acf..000000000 --- a/doc/source/netscript/formulasapi/hacknetNodes/ramUpgradeCost.rst +++ /dev/null @@ -1,23 +0,0 @@ -ramUpgradeCost() Netscript Function -============================================ - -.. js:function:: ramUpgradeCost(startingRam[, extraRamLevels[, costMult]]) - - :RAM cost: 0 GB - :param number startingRam: Amount of RAM at the start the calculation. - :param number extraRamLevels: Extra number of levels you want to buy. Default to ``1``. - :param number costMult: Aug multiplier that reduces cost. Defaults to ``1``. - :returns: Money required to go from ``startingRam`` to ``startingRam+extraRamLevels``. - - ..note:: ``startingRam`` is the actual amount of ram, not the amount of levels of ram. - - If you are not in BitNode-5, then you must have Source-File 5-1 in order to - use this function. - - This function calculates the cost of upgrading levels from any level to any level. - - Examples: - - .. code-block:: javascript - - formulas.hacknetNodes.ramUpgradeCost(1, 5); // returns: 2095000 diff --git a/doc/source/netscript/formulasapi/hacknetServers/cacheUpgradeCost.rst b/doc/source/netscript/formulasapi/hacknetServers/cacheUpgradeCost.rst deleted file mode 100644 index ebf124a3c..000000000 --- a/doc/source/netscript/formulasapi/hacknetServers/cacheUpgradeCost.rst +++ /dev/null @@ -1,22 +0,0 @@ -cacheUpgradeCost() Netscript Function -============================================== - -.. js:function:: cacheUpgradeCost(startingCache[, extraCacheLevels[, costMult]]) - - :RAM cost: 0 GB - :param number startingCache: Cache level at the start the calculation. - :param number extraCacheLevels: Extra number of cache level you want to buy. Default to ``1``. - :param number costMult: Aug multiplier that reduces cost. Defaults to ``1``. - :returns: Money required to go from ``startingLevel`` to ``startingLevel+extraLevels``. - - If you are not in BitNode-5, then you must have Source-File 5-1 in order to - use this function. In addition, if you are not in BitNode-9, then you must - have Source-File 9-1 in order to use this function. - - This function calculates the cost of upgrading cache from any level to any level. - - Examples: - - .. code-block:: javascript - - formulas.hacknetServers.cacheUpgradeCost(1, 5); // returns: 243170000 diff --git a/doc/source/netscript/formulasapi/hacknetServers/constants.rst b/doc/source/netscript/formulasapi/hacknetServers/constants.rst deleted file mode 100644 index 490ce8041..000000000 --- a/doc/source/netscript/formulasapi/hacknetServers/constants.rst +++ /dev/null @@ -1,37 +0,0 @@ -constants() Netscript Function -============================================= - -.. js:function:: constants() - - :RAM cost: 0 GB - :returns: A structure with various constants related to hacknet servers. - - If you are not in BitNode-5, then you must have Source-File 5-1 in order to - use this function. In addition, if you are not in BitNode-9, then you must - have Source-File 9-1 in order to use this function. - - Returns an object with the following properties:: - - { - HashesPerLevel: Multiplied by the server's level to get the server's base income - BaseCost: A multiplier used when buying new nodes or upgrading levels - RamBaseCost: A multiplier used when upgrading RAM - CoreBaseCost: A multiplier used when buying additional cores - CacheBaseCost: A multiplier used when upgrading cache - PurchaseMult: The root of an exponent used when buying new servers - UpgradeLevelMult: The root of an exponent used when upgrading levels - UpgradeRamMult: The root of an exponent used when upgrading RAM - UpgradeCoreMult: The root of an exponent used when buying additional cores - UpgradeCacheMult: The root of an exponent used when upgrading cache - MaxServers: Maximum number of hacknet servers you can own - MaxLevel: Maximum level a server can have - MaxRam: Maximum RAM a server can have - MaxCores: Maximum number of cores a server can have - MaxCache: Maximum cache a server can have - } - - Examples: - - .. code-block:: javascript - - tprint("Maximum RAM a hacknet server can have: "+formulas.hacknetServers.constants().MaxRam+" GB"); diff --git a/doc/source/netscript/formulasapi/hacknetServers/coreUpgradeCost.rst b/doc/source/netscript/formulasapi/hacknetServers/coreUpgradeCost.rst deleted file mode 100644 index 26bc6ed2f..000000000 --- a/doc/source/netscript/formulasapi/hacknetServers/coreUpgradeCost.rst +++ /dev/null @@ -1,22 +0,0 @@ -coreUpgradeCost() Netscript Function -============================================= - -.. js:function:: coreUpgradeCost(startingCores[, extraCores[, costMult]]) - - :RAM cost: 0 GB - :param number startingCores: Number of core at the start the calculation. - :param number extraCores: Extra number of cores you want to buy. Default to ``1``. - :param number costMult: Aug multiplier that reduces cost. Defaults to ``1``. - :returns: Money required to go from ``startingCores`` to ``startingCores+extraCores``. - - If you are not in BitNode-5, then you must have Source-File 5-1 in order to - use this function. In addition, if you are not in BitNode-9, then you must - have Source-File 9-1 in order to use this function. - - This function calculates the cost of upgrading cores from any level to any level. - - Examples: - - .. code-block:: javascript - - formulas.hacknetServers.coreUpgradeCost(1, 5); // returns: 12015000 diff --git a/doc/source/netscript/formulasapi/hacknetServers/hacknetServerCost.rst b/doc/source/netscript/formulasapi/hacknetServers/hacknetServerCost.rst deleted file mode 100644 index 223678b53..000000000 --- a/doc/source/netscript/formulasapi/hacknetServers/hacknetServerCost.rst +++ /dev/null @@ -1,21 +0,0 @@ -hacknetServerCost() Netscript Function -=============================================== - -.. js:function:: hacknetServerCost(serverN[, costMult]]) - - :RAM cost: 0 GB - :param number serverN: Number of the new node. - :param number costMult: Aug multiplier that reduces cost. Defaults to ``1``. - :returns: Money required to buy your ``serverN`` th node. - - If you are not in BitNode-5, then you must have Source-File 5-1 in order to - use this function. In addition, if you are not in BitNode-9, then you must - have Source-File 9-1 in order to use this function. - - This function calculates the cost purchasing a hacknet node. - - Examples: - - .. code-block:: javascript - - formulas.hacknetNodes.hacknetServerCost(2); // returns: 1800000 diff --git a/doc/source/netscript/formulasapi/hacknetServers/hashGainRate.rst b/doc/source/netscript/formulasapi/hacknetServers/hashGainRate.rst deleted file mode 100644 index 18fbe2254..000000000 --- a/doc/source/netscript/formulasapi/hacknetServers/hashGainRate.rst +++ /dev/null @@ -1,27 +0,0 @@ -hashGainRate() Netscript Function -========================================== - -.. js:function:: hashGainRate(level, ramUsed, maxRam, core[, mult]) - - :RAM cost: 0 GB - :param number level: level of the server. - :param number ramUsed: ram used on the server. - :param number maxRam: max ram of the server. - :param number core: cores of the server. - :returns: Hashes per second that a server with those stats would gain. - - If you are not in BitNode-5, then you must have Source-File 5-1 in order to - use this function. In addition, if you are not in BitNode-9, then you must - have Source-File 9-1 in order to use this function. - - This function calculates the hash rate of a server with the given stats. - - Examples: - - .. code-block:: javascript - - server = hacknet.getNodeStats(1); - currentRate = formulas.hacknetServers.hashGainRate(server.level, 0, server.ram, server.cores); - levelRate = formulas.hacknetServers.hashGainRate(server.level+1, 0, server.ram, server.cores); - ramRate = formulas.hacknetServers.hashGainRate(server.level, 0, server.ram*2, server.cores); - coresRate = formulas.hacknetServers.hashGainRate(server.level, 0, server.ram, server.cores+1); diff --git a/doc/source/netscript/formulasapi/hacknetServers/hashUpgradeCost.rst b/doc/source/netscript/formulasapi/hacknetServers/hashUpgradeCost.rst deleted file mode 100644 index e7e0bcbf3..000000000 --- a/doc/source/netscript/formulasapi/hacknetServers/hashUpgradeCost.rst +++ /dev/null @@ -1,21 +0,0 @@ -hashUpgradeCost() Netscript Function -============================================= - -.. js:function:: hashUpgradeCost(upgName, level) - - :RAM cost: 0 GB - :param string upgName: Name of the Hash upgrade. - :param number level: Level of the upgrade. - :returns: Amount of Hash. - - If you are not in BitNode-5, then you must have Source-File 5-1 in order to - use this function. In addition, if you are not in BitNode-9, then you must - have Source-File 9-1 in order to use this function. - - This function calculates amount of Hash require to buy level ``level`` of upgrade ``upgName``. - - Examples: - - .. code-block:: javascript - - formulas.hacknetServers.hashUpgradeCost("Increase Maximum Money", 5); // returns: 250 diff --git a/doc/source/netscript/formulasapi/hacknetServers/levelUpgradeCost.rst b/doc/source/netscript/formulasapi/hacknetServers/levelUpgradeCost.rst deleted file mode 100644 index 99893c3c1..000000000 --- a/doc/source/netscript/formulasapi/hacknetServers/levelUpgradeCost.rst +++ /dev/null @@ -1,22 +0,0 @@ -levelUpgradeCost() Netscript Function -============================================= - -.. js:function:: levelUpgradeCost(startingLevel[, extraLevels[, costMult]]) - - :RAM cost: 0 GB - :param number startingLevel: Number of level at the start the calculation. - :param number extraLevels: Extra number of levels you want to buy. Default to ``1``. - :param number costMult: Aug multiplier that reduces cost. Defaults to ``1``. - :returns: Money required to go from ``startingLevel`` to ``startingLevel+extraLevels``. - - If you are not in BitNode-5, then you must have Source-File 5-1 in order to - use this function. In addition, if you are not in BitNode-9, then you must - have Source-File 9-1 in order to use this function. - - This function calculates the cost of upgrading levels from any level to any level. - - Examples: - - .. code-block:: javascript - - formulas.hacknetServers.levelUpgradeCost(1, 5); // returns: 2792000 diff --git a/doc/source/netscript/formulasapi/hacknetServers/ramUpgradeCost.rst b/doc/source/netscript/formulasapi/hacknetServers/ramUpgradeCost.rst deleted file mode 100644 index 0da238289..000000000 --- a/doc/source/netscript/formulasapi/hacknetServers/ramUpgradeCost.rst +++ /dev/null @@ -1,24 +0,0 @@ -ramUpgradeCost() Netscript Function -============================================= - -.. js:function:: ramUpgradeCost(startingRam[, extraRamLevels[, costMult]]) - - :RAM cost: 0 GB - :param number startingRam: Amount of RAM at the start the calculation. - :param number extraRamLevels: Extra number of levels you want to buy. Default to ``1``. - :param number costMult: Aug multiplier that reduces cost. Defaults to ``1``. - :returns: Money required to go from ``startingRam`` to ``startingRam+extraRamLevels``. - - ..note:: ``startingRam`` is the actual amount of ram, not the amount of levels of ram. - - If you are not in BitNode-5, then you must have Source-File 5-1 in order to - use this function. In addition, if you are not in BitNode-9, then you must - have Source-File 9-1 in order to use this function. - - This function calculates the cost of upgrading levels from any level to any level. - - Examples: - - .. code-block:: javascript - - formulas.hacknetServers.ramUpgradeCost(1, 5); // returns: 15810000 diff --git a/doc/source/netscript/gangapi/ascendMember.rst b/doc/source/netscript/gangapi/ascendMember.rst deleted file mode 100644 index d925c373c..000000000 --- a/doc/source/netscript/gangapi/ascendMember.rst +++ /dev/null @@ -1,22 +0,0 @@ -ascendMember() Netscript Function -================================= - -.. js:function:: ascendMember(name) - - :RAM cost: 4 GB - :param string name: Name of member to ascend - :returns: An object with info about the ascension results. - - The object has the following structure:: - - { - respect: Amount of respect lost from ascending - hack: Hacking multiplier gained from ascending. Decimal form - str: Strength multiplier gained from ascending. Decimal form - def: Defense multiplier gained from ascending. Decimal form - dex: Dexterity multiplier gained from ascending. Decimal form - agi: Agility multiplier gained from ascending. Decimal form - cha: Charisma multiplier gained from ascending. Decimal form - } - - Ascend the specified Gang Member. \ No newline at end of file diff --git a/doc/source/netscript/gangapi/canRecruitMember.rst b/doc/source/netscript/gangapi/canRecruitMember.rst deleted file mode 100644 index a4026ef3f..000000000 --- a/doc/source/netscript/gangapi/canRecruitMember.rst +++ /dev/null @@ -1,7 +0,0 @@ -canRecruitMember() Netscript Function -===================================== - -.. js:function:: canRecruitMember() - - :RAM cost: 1 GB - :returns: ``true`` if a member can be recruited. \ No newline at end of file diff --git a/doc/source/netscript/gangapi/createGang.rst b/doc/source/netscript/gangapi/createGang.rst deleted file mode 100644 index 2e0365484..000000000 --- a/doc/source/netscript/gangapi/createGang.rst +++ /dev/null @@ -1,12 +0,0 @@ -createGang() Netscript Function -====================================== - -.. js:function:: createGang(faction) - - :RAM cost: 1 GB - :param string faction: Name of faction - :returns: ``true`` if a Gang was created with that faction. - - Creates a Gang with that faction. You need to have access to Gangs, the - faction must be one of the approved gang factions, and you must be a member - of that faction for the creation to be successful. diff --git a/doc/source/netscript/gangapi/getBonusTime.rst b/doc/source/netscript/gangapi/getBonusTime.rst deleted file mode 100644 index 772b19845..000000000 --- a/doc/source/netscript/gangapi/getBonusTime.rst +++ /dev/null @@ -1,13 +0,0 @@ -getBonusTime() Netscript Function -================================= - -.. js:function:: getBonusTime() - - :RAM cost: 0 GB - :returns: Bonus time for the Gang mechanic in seconds - - "Bonus time" is accumulated when the game is offline or if the game is - inactive in the browser. - - "Bonus time" makes the game progress faster, up to 10x the normal speed. - diff --git a/doc/source/netscript/gangapi/getChanceToWinClash.rst b/doc/source/netscript/gangapi/getChanceToWinClash.rst deleted file mode 100644 index db3cae7b7..000000000 --- a/doc/source/netscript/gangapi/getChanceToWinClash.rst +++ /dev/null @@ -1,9 +0,0 @@ -getChanceToWinClash() Netscript Function -======================================== - -.. js:function:: getChanceToWinClash(gangName) - - :RAM cost: 4 GB - :param string gangName: Target gang - :returns: Chance you have to win a clash with the specified gang. The chance - is returned in decimal form. diff --git a/doc/source/netscript/gangapi/getEquipmentCost.rst b/doc/source/netscript/gangapi/getEquipmentCost.rst deleted file mode 100644 index 24f0aa237..000000000 --- a/doc/source/netscript/gangapi/getEquipmentCost.rst +++ /dev/null @@ -1,12 +0,0 @@ -getEquipmentCost() Netscript Function -===================================== - -.. js:function:: getEquipmentCost(equipName) - - :RAM cost: 2 GB - :param string equipName: Name of equipment - :returns: Cost to purchase the specified Equipment/Augmentation (number). - Infinity for invalid arguments. - - Get the amount of money it takes to purchase a piece of Equipment or an Augmentation. - If an invalid Equipment/Augmentation is specified, this function will return Infinity. \ No newline at end of file diff --git a/doc/source/netscript/gangapi/getEquipmentNames.rst b/doc/source/netscript/gangapi/getEquipmentNames.rst deleted file mode 100644 index 9a1ff8e2b..000000000 --- a/doc/source/netscript/gangapi/getEquipmentNames.rst +++ /dev/null @@ -1,11 +0,0 @@ -getEquipmentNames() Netscript Function -====================================== - -.. js:function:: getEquipmentNames() - - :RAM cost: 1 GB - :returns: Array of strings of the names of all Equpiment/Augmentations - - Get the name of all possible equipment/upgrades you can purchase for your - Gang Members. This includes Augmentations. - diff --git a/doc/source/netscript/gangapi/getEquipmentStats.rst b/doc/source/netscript/gangapi/getEquipmentStats.rst deleted file mode 100644 index 1b2c55339..000000000 --- a/doc/source/netscript/gangapi/getEquipmentStats.rst +++ /dev/null @@ -1,15 +0,0 @@ -getEquipmentStats() Netscript Function -====================================== - -.. js:function:: getEquipmentStats(equipName) - - :RAM cost: 2 GB - :param string equipName: Name of equipment - :returns: A dictionary containing the stats of the equipment. - - Get the specified equipment stats.:: - - { - "str":1.04, - "def":1.04 - } diff --git a/doc/source/netscript/gangapi/getEquipmentType.rst b/doc/source/netscript/gangapi/getEquipmentType.rst deleted file mode 100644 index bebd6bdb0..000000000 --- a/doc/source/netscript/gangapi/getEquipmentType.rst +++ /dev/null @@ -1,16 +0,0 @@ -getEquipmentType() Netscript Function -===================================== - -.. js:function:: getEquipmentType(equipName) - - :RAM cost: 2 GB - :param string equipName: Name of equipment - :returns: A string stating the type of the equipment - - Get the specified equipment type, which can be one of the following: - - * Weapon - * Armor - * Vehicle - * Rootkit - * Augmentation diff --git a/doc/source/netscript/gangapi/getGangInformation.rst b/doc/source/netscript/gangapi/getGangInformation.rst deleted file mode 100644 index 7cad54aad..000000000 --- a/doc/source/netscript/gangapi/getGangInformation.rst +++ /dev/null @@ -1,24 +0,0 @@ -getGangInformation() Netscript Function -======================================== - -.. js:function:: getGangInformation() - - :RAM cost: 2 GB - :returns: An object with the gang information. - - The object has the following structure:: - - { - faction: Name of faction that the gang belongs to ("Slum Snakes", etc.) - isHacking: Boolean indicating whether or not its a hacking gang - moneyGainRate: Money earned per second - power: Gang's power for territory warfare - respect: Gang's respect - respectGainRate: Respect earned per second - territory: Amount of territory held. Returned in decimal form, not percentage - territoryClashChance: Clash chance. Returned in decimal form, not percentage - wantedLevel: Gang's wanted level - wantedLevelGainRate: Wanted level gained/lost per second (negative for losses) - } - - Get general information about the gang \ No newline at end of file diff --git a/doc/source/netscript/gangapi/getMemberInformation.rst b/doc/source/netscript/gangapi/getMemberInformation.rst deleted file mode 100644 index 4743ef868..000000000 --- a/doc/source/netscript/gangapi/getMemberInformation.rst +++ /dev/null @@ -1,56 +0,0 @@ -getMemberInformation() Netscript Function -========================================= - -.. js:function:: getMemberInformation(name) - - :RAM cost: 2 GB - :param string name: Name of member - :returns: An object with the gang member information. - - The object has the following structure:: - - { - name: Name of this member. - task: Name of currently assigned task. - earnedRespect: Total amount of respect earned by this member. - - hack: Hacking stat - str: Strength stat - def: Defense stat - dex: Dexterity stat - agi: Agility stat - cha: Charisma stat - - hack_exp: Hacking experience - str_exp: Strength experience - def_exp: Defense experience - dex_exp: Dexterity experience - agi_exp: Agility experience - cha_exp: Charisma experience - - hack_mult: Hacking multiplier from equipment. Decimal form - str_mult: Strength multiplier from equipment. Decimal form - def_mult: Defense multiplier from equipment. Decimal form - dex_mult: Dexterity multiplier from equipment. Decimal form - agi_mult: Agility multiplier from equipment. Decimal form - cha_mult: Charisma multiplier from equipment. Decimal form - - hack_asc_mult: Hacking multiplier from ascension. Decimal form - str_asc_mult: Strength multiplier from ascension. Decimal form - def_asc_mult: Defense multiplier from ascension. Decimal form - dex_asc_mult: Dexterity multiplier from ascension. Decimal form - agi_asc_mult: Agility multiplier from ascension. Decimal form - cha_asc_mult: Charisma multiplier from ascension. Decimal form - - hack_asc_points: Hacking ascension points. - str_asc_points: Strength ascension points. - def_asc_points: Defense ascension points. - dex_asc_points: Dexterity ascension points. - agi_asc_points: Agility ascension points. - cha_asc_points: Charisma ascension points. - - upgrades: Array of names of all owned Non-Augmentation Equipment - augmentations: Array of names of all owned Augmentations - } - - Get stat and equipment-related information about a Gang Member \ No newline at end of file diff --git a/doc/source/netscript/gangapi/getMemberNames.rst b/doc/source/netscript/gangapi/getMemberNames.rst deleted file mode 100644 index ff7ac8d6d..000000000 --- a/doc/source/netscript/gangapi/getMemberNames.rst +++ /dev/null @@ -1,9 +0,0 @@ -getMemberNames() Netscript Function -=================================== - -.. js:function:: getMemberNames() - - :RAM cost: 1 GB - :returns: An array of the names of all Gang members as strings - - Get the names of all Gang members \ No newline at end of file diff --git a/doc/source/netscript/gangapi/getOtherGangInformation.rst b/doc/source/netscript/gangapi/getOtherGangInformation.rst deleted file mode 100644 index 55fb99605..000000000 --- a/doc/source/netscript/gangapi/getOtherGangInformation.rst +++ /dev/null @@ -1,27 +0,0 @@ -getOtherGangInformation() Netscript Function -============================================ - -.. js:function:: getOtherGangInformation() - - :RAM cost: 2 GB - :returns: An object with information about all gangs - - The object has the following structure:: - - { - "Slum Snakes" : { - power: Slum Snakes' power - territory: Slum Snakes' territory, in decimal form - }, - "Tetrads" : { - power: ... - territory: ... - }, - "The Syndicate" : { - power: ... - territory: ... - }, - ... (for all six gangs) - } - - Get territory and power information about all gangs \ No newline at end of file diff --git a/doc/source/netscript/gangapi/getTaskNames.rst b/doc/source/netscript/gangapi/getTaskNames.rst deleted file mode 100644 index 8749ea3e1..000000000 --- a/doc/source/netscript/gangapi/getTaskNames.rst +++ /dev/null @@ -1,9 +0,0 @@ -getTaskNames() Netscript Function -================================= - -.. js:function:: getTaskNames() - - :RAM cost: 1 GB - :returns: Array of strings of all task names - - Get the name of all valid tasks that Gang members can be assigned to \ No newline at end of file diff --git a/doc/source/netscript/gangapi/getTaskStats.rst b/doc/source/netscript/gangapi/getTaskStats.rst deleted file mode 100644 index 14eb71704..000000000 --- a/doc/source/netscript/gangapi/getTaskStats.rst +++ /dev/null @@ -1,39 +0,0 @@ -getTaskStats() Netscript Function -====================================== - -.. js:function:: getTaskStats(taskName) - - :RAM cost: 1 GB - :param string name: Name of the task. - :returns: Detailed stats of a task. - - Examples: - - .. code-block:: javascript - - { - name: Terrorism, - desc: "Assign this gang member to commit acts of terrorism - - Greatly increases respect - Greatly increases wanted level - Scales heavily with territory", - isHacking: false, - isCombat: true, - baseRespect: 0.01, - baseWanted: 6, - baseMoney: 0, - hackWeight: 20, - strWeight: 20, - defWeight: 20, - dexWeight: 20, - agiWeight: 0, - chaWeight: 20, - difficulty: 36, - territory: { - money: 1, - respect: 2, - wanted: 2 - } - } - - Get the stats of a gang task stats. This is typically used to evaluate - which action should be executed next. \ No newline at end of file diff --git a/doc/source/netscript/gangapi/inGang.rst b/doc/source/netscript/gangapi/inGang.rst deleted file mode 100644 index 7813b4d9f..000000000 --- a/doc/source/netscript/gangapi/inGang.rst +++ /dev/null @@ -1,7 +0,0 @@ -inGang() Netscript Function -====================================== - -.. js:function:: inGang() - - :RAM cost: 1 GB - :returns: ``true`` if the player is already in a gang. diff --git a/doc/source/netscript/gangapi/purchaseEquipment.rst b/doc/source/netscript/gangapi/purchaseEquipment.rst deleted file mode 100644 index cffec4fc6..000000000 --- a/doc/source/netscript/gangapi/purchaseEquipment.rst +++ /dev/null @@ -1,12 +0,0 @@ -purchaseEquipment() Netscript Function -====================================== - -.. js:function:: purchaseEquipment(memberName, equipName) - - :RAM cost: 4 GB - :param string memberName: Name of Gang member to purchase the equipment for - :param string equipName: Name of Equipment/Augmentation to purchase - :returns: ``true`` if the equipment was purchased. - - Attempt to purchase the specified Equipment/Augmentation for the specified - Gang member. diff --git a/doc/source/netscript/gangapi/recruitMember.rst b/doc/source/netscript/gangapi/recruitMember.rst deleted file mode 100644 index eb144364d..000000000 --- a/doc/source/netscript/gangapi/recruitMember.rst +++ /dev/null @@ -1,15 +0,0 @@ -recruitMember() Netscript Function -================================== - -.. js:function:: recruitMember(name) - - :RAM cost: 2 GB - :param string name: Name of member to recruit - :returns: True if the member was successfully recruited. False otherwise - - Attempt to recruit a new gang member. - - Possible reasons for failure: - - * Cannot currently recruit a new member - * There already exists a member with the specified name diff --git a/doc/source/netscript/gangapi/setMemberTask.rst b/doc/source/netscript/gangapi/setMemberTask.rst deleted file mode 100644 index 541431640..000000000 --- a/doc/source/netscript/gangapi/setMemberTask.rst +++ /dev/null @@ -1,13 +0,0 @@ -setMemberTask() Netscript Function -================================== - -.. js:function:: setMemberTask(memberName, taskName) - - :RAM cost: 2 GB - :param string memberName: Name of Gang member to assign - :param string taskName: Task to assign - :returns: True if the Gang Member was successfully assigned to the task. False otherwise - - Attempts to assign the specified Gang Member to the specified task. - If an invalid task is specified, the Gang member will be set to idle ("Unassigned") - diff --git a/doc/source/netscript/gangapi/setTerritoryWarfare.rst b/doc/source/netscript/gangapi/setTerritoryWarfare.rst deleted file mode 100644 index 573b06b85..000000000 --- a/doc/source/netscript/gangapi/setTerritoryWarfare.rst +++ /dev/null @@ -1,9 +0,0 @@ -setTerritoryWarfare() Netscript Function -======================================== - -.. js:function:: setTerritoryWarfare(engage) - - :RAM cost: 2 GB - :param bool engage: Whether or not to engage in territory warfare - - Set whether or not the gang should engage in territory warfare diff --git a/doc/source/netscript/hacknetnodeapi/getCacheUpgradeCost.rst b/doc/source/netscript/hacknetnodeapi/getCacheUpgradeCost.rst deleted file mode 100644 index aa6c3f6d8..000000000 --- a/doc/source/netscript/hacknetnodeapi/getCacheUpgradeCost.rst +++ /dev/null @@ -1,17 +0,0 @@ -getCacheUpgradeCost() Netscript Function -======================================== - -.. warning:: This page contains spoilers for the game - -.. js:function:: getCacheUpgradeCost(i, n) - - :RAM cost: 0 GB - :param number i: Index of Hacknet Node. :ref:`See here for details ` - :param number n: Number of times to upgrade cache. Must be positive. Rounded to nearest integer - :return: Cost of upgrading the cache level of the specified Hacknet Server by ``n``. - - .. note:: This function is only applicable for Hacknet Servers (the upgraded version of - a Hacknet Node). - - If an invalid value for ``n`` is provided, then this function returns ``0``. If the - specified Hacknet Server is already at the max cache level, then ``Infinity`` is returned. diff --git a/doc/source/netscript/hacknetnodeapi/getHashUpgradeLevel.rst b/doc/source/netscript/hacknetnodeapi/getHashUpgradeLevel.rst deleted file mode 100644 index 268492a35..000000000 --- a/doc/source/netscript/hacknetnodeapi/getHashUpgradeLevel.rst +++ /dev/null @@ -1,18 +0,0 @@ -getHashUpgradeLevel() Netscript Function -======================================== - -.. js:function:: getHashUpgradeLevel(upgName) - - :RAM cost: 0 GB - :param string upgName: Name of upgrade to spend hashes on. Must be an exact match. - :returns: level of the upgrade. - - .. note:: This function is only applicable for Hacknet Servers (the upgraded version - of a Hacknet Node). - - Example: - - .. code:: javascript - - hacknet.getHashUpgradeLevel("Sell for Money"); // returns: 5 - // "Sell for Money" was bought 5 times. diff --git a/doc/source/netscript/hacknetnodeapi/getStudyMult.rst b/doc/source/netscript/hacknetnodeapi/getStudyMult.rst deleted file mode 100644 index a2dbb0974..000000000 --- a/doc/source/netscript/hacknetnodeapi/getStudyMult.rst +++ /dev/null @@ -1,13 +0,0 @@ -getStudyMult() Netscript Function -================================= - -.. js:function:: getStudyMult() - - :RAM cost: 0 GB - :returns: The multiplier to studying that hash upgrades provide to the player. - - Example: - - .. code:: javascript - - hacknet.getStudyMult(); // return: 1.4 \ No newline at end of file diff --git a/doc/source/netscript/hacknetnodeapi/getTrainingMult.rst b/doc/source/netscript/hacknetnodeapi/getTrainingMult.rst deleted file mode 100644 index 643566cee..000000000 --- a/doc/source/netscript/hacknetnodeapi/getTrainingMult.rst +++ /dev/null @@ -1,13 +0,0 @@ -getTrainingMult() Netscript Function -=================================== - -.. js:function:: getTrainingMult() - - :RAM cost: 0 GB - :returns: The multiplier to training that hash upgrades provide to the player. - - Example: - - .. code:: javascript - - hacknet.getTrainingMult(); // return: 1.4 \ No newline at end of file diff --git a/doc/source/netscript/hacknetnodeapi/hashCapacity.rst b/doc/source/netscript/hacknetnodeapi/hashCapacity.rst deleted file mode 100644 index 956869b5b..000000000 --- a/doc/source/netscript/hacknetnodeapi/hashCapacity.rst +++ /dev/null @@ -1,12 +0,0 @@ -hashCapacity() Netscript Function -================================= - -.. warning:: This page contains spoilers for the game - -.. js:function:: hashCapacity() - - :RAM cost: 0 GB - :returns: The players maximum hash capacity. - - .. note:: This function is only applicable for Hacknet Servers (the upgraded version of - a Hacknet Node). diff --git a/doc/source/netscript/hacknetnodeapi/hashCost.rst b/doc/source/netscript/hacknetnodeapi/hashCost.rst deleted file mode 100644 index fc5f7b5d4..000000000 --- a/doc/source/netscript/hacknetnodeapi/hashCost.rst +++ /dev/null @@ -1,23 +0,0 @@ -hashCost() Netscript Function -============================= - -.. warning:: This page contains spoilers for the game - -.. js:function:: hashCost(upgName) - - :RAM cost: 0 GB - :param string upgName: Name of upgrade to get the cost of. Must be an exact match - :returns: Number of hashes required for the specified upgrade. The name of - the upgrade must be an exact match. - - .. note:: This function is only applicable for Hacknet Servers (the upgraded version - of a Hacknet Node). - - Example: - - .. code:: javascript - - upgradeName = "Sell for Corporation Funds"; - if (hacknet.numHashes() > hacknet.hashCost(upgradeName)) { - hacknet.spendHashes(upgName); - } diff --git a/doc/source/netscript/hacknetnodeapi/maxNumNodes.rst b/doc/source/netscript/hacknetnodeapi/maxNumNodes.rst deleted file mode 100644 index f9a565a61..000000000 --- a/doc/source/netscript/hacknetnodeapi/maxNumNodes.rst +++ /dev/null @@ -1,7 +0,0 @@ -maxNumNodes() Netscript Function -================================ - -.. js:function:: maxNumNodes() - - :RAM cost: 0 GB - :returns: Maximum number of Hacknet Nodes you can own, unless you have not unlocked HackNet servers. Then, it returns Infinity. diff --git a/doc/source/netscript/hacknetnodeapi/numHashes.rst b/doc/source/netscript/hacknetnodeapi/numHashes.rst deleted file mode 100644 index 62d54289a..000000000 --- a/doc/source/netscript/hacknetnodeapi/numHashes.rst +++ /dev/null @@ -1,13 +0,0 @@ -numHashes() Netscript Function -============================== - -.. warning:: This page contains spoilers for the game - -.. js:function:: numHashes() - - :RAM cost: 0 GB - :returns: Number of hashes you have. - - .. note:: This function is only applicable for Hacknet Servers (the upgraded version - of a Hacknet Node). - diff --git a/doc/source/netscript/hacknetnodeapi/spendHashes.rst b/doc/source/netscript/hacknetnodeapi/spendHashes.rst deleted file mode 100644 index b622b5044..000000000 --- a/doc/source/netscript/hacknetnodeapi/spendHashes.rst +++ /dev/null @@ -1,28 +0,0 @@ -spendHashes() Netscript Function -================================ - -.. warning:: This page contains spoilers for the game - -.. js:function:: spendHashes(upgName, upgTarget) - - :RAM cost: 0 GB - :param string upgName: Name of upgrade to spend hashes on. Must be an exact match - :param string upgTarget: Object to which upgrade applies. Required for certain upgrades - :returns: ``true`` if the purchase was successful. - - .. note:: This function is only applicable for Hacknet Servers (the upgraded version - of a Hacknet Node). - - Spend the hashes generated by your Hacknet Servers on an upgrade. - - The name of the upgrade must be an exact match. The ``upgTarget`` argument - is used for upgrades such as ``Reduce Minimum Security``, which applies to a - specific server. In this case, the ``upgTarget`` argument must be the - hostname of the server. - - Example: - - .. code:: javascript - - hacknet.spendHashes("Sell for Corporation Funds"); - hacknet.spendHashes("Increase Maximum Money", "foodnstuff"); diff --git a/doc/source/netscript/hacknetnodeapi/upgradeCache.rst b/doc/source/netscript/hacknetnodeapi/upgradeCache.rst deleted file mode 100644 index f670975ea..000000000 --- a/doc/source/netscript/hacknetnodeapi/upgradeCache.rst +++ /dev/null @@ -1,16 +0,0 @@ -upgradeCache() Netscript Function -================================= - -.. warning:: This page contains spoilers for the game - -.. js:function:: upgradeCache(i, n) - - :RAM cost: 0 GB - :param number i: Index of Hacknet Node. :ref:`See here for details ` - :param number n: Number of cache levels to purchase. Must be positive. Rounded to nearest integer - :returns: ``true`` if the upgrade was successful. - - .. note:: This function is only applicable for Hacknet Servers (the upgraded version of - a Hacknet Node). - - Tries to upgrade the specified Hacknet Server's cache ``n`` times. diff --git a/doc/source/netscript/netscript1.rst b/doc/source/netscript/netscript1.rst index 59e9a70a6..0ae07c5b5 100644 --- a/doc/source/netscript/netscript1.rst +++ b/doc/source/netscript/netscript1.rst @@ -21,16 +21,12 @@ Which ES6+ features are supported? Netscript 1.0 is a ES5 interpreter, but the following features from versions ES6 and above are supported as well. -If there is an additional ES6+ feature you would like to see implemented with a polyfill, -feel free to `open an issue `_ (and provide -the polyfill if possible). - * import - See :ref:`netscriptimporting` * `Array `_ - * `find() `_ - * `findIndex() `_ - * `includes() `_ +* `Array find() `_ +* `Array findIndex() `_ +* `Array includes() `_ * `String `_ - * `endsWith() `_ - * `includes() `_ - * `startsWith() `_ +* `String endsWith() `_ +* `String includes() `_ +* `String startsWith() `_ diff --git a/doc/source/netscript/netscriptadvancedfunctions.rst b/doc/source/netscript/netscriptadvancedfunctions.rst index 31454253e..0b32a5491 100644 --- a/doc/source/netscript/netscriptadvancedfunctions.rst +++ b/doc/source/netscript/netscriptadvancedfunctions.rst @@ -8,8 +8,5 @@ they contain spoilers for the game. .. toctree:: - getBitNodeMultipliers() - getServer() autocomplete() - atExit() Injecting HTML diff --git a/doc/source/netscript/netscriptbladeburnerapi.rst b/doc/source/netscript/netscriptbladeburnerapi.rst deleted file mode 100644 index 988fbfe12..000000000 --- a/doc/source/netscript/netscriptbladeburnerapi.rst +++ /dev/null @@ -1,260 +0,0 @@ -.. _netscript_bladeburnerapi: - -Netscript Bladeburner API -========================= -Netscript provides the following API for interacting with the game's Bladeburner mechanic. - -The Bladeburner API is **not** immediately available to the player and must be unlocked -later in the game. - -.. warning:: This page contains spoilers for the game - -The Bladeburner API is unlocked in BitNode-7. If you are in BitNode-7, you will -automatically gain access to this API. Otherwise, you must have Source-File 7 in -order to use this API in other BitNodes. - -**Bladeburner API functions must be accessed through the 'bladeburner' namespace** - -In :ref:`netscript1`:: - - bladeburner.getContractNames(); - bladeburner.startAction("general", "Training"); - -In :ref:`netscriptjs`:: - - ns.bladeburner.getContractNames(); - ns.bladeburner.startAction("general", "Training"); - -.. toctree:: - :caption: Functions: - - getContractNames() - getOperationNames() - getBlackOpNames() - getGeneralActionNames() - getSkillNames() - startAction() - stopBladeburnerAction() - getCurrentAction() - getActionTime() - getActionEstimatedSuccessChance() - getActionRepGain() - getActionCountRemaining() - getActionMaxLevel() - getActionCurrentLevel() - getActionAutolevel() - setActionAutolevel() - setActionLevel() - getRank() - getBlackOpRank() - getSkillPoints() - getSkillLevel() - getSkillUpgradeCost() - upgradeSkill() - getTeamSize() - setTeamSize() - getCityEstimatedPopulation() - getCityCommunities() - getCityChaos() - getCity() - switchCity() - getStamina() - joinBladeburnerFaction() - joinBladeburnerDivision() - getBonusTime() - - -.. _bladeburner_action_types: - -Bladeburner Action Types ------------------------- - -Several functions in the Bladeburner API require you to specify an action using -its type and name. The following are valid values when specifying the action's type: - -**Contracts** - * contract - * contracts - * contr - -**Operations** - * operation - * operations - * op - * ops - -**Black Ops** - * blackoperation - * black operation - * black operations - * black op - * black ops - * blackop - * blackops - -**General Actions (Training, Field Analysis, etc)** - * general - * general action - * gen - -Examples --------- - -**Basic example usage**:: - - tprint(bladeburner.getContractNames()); - tprint(bladeburner.getOperationNames()); - tprint(bladeburner.getBlackOpNames()); - tprint(bladeburner.getGeneralActionNames()); - tprint(bladeburner.getSkillNames()); - tprint(bladeburner.getActionTime("contract", "Tracking")); - tprint("Rank: " + bladeburner.getRank()); - tprint("Skill Points: " + bladeburner.getSkillPoints()); - tprint("Cloak Skill Level: " + bladeburner.getSkillLevel("Cloak")); - tprint("Trying to upgradeSkill: " + bladeburner.upgradeSkill("Cloak")); - tprint("Skill Points remaining: " + bladeburner.getSkillPoints()); - - tprint("Trying to switch to a nonexistent city: " + bladeburner.switchCity("lskgns")); - - var chongqing = "Chongqing"; - tprint("Trying to switch to Chongqing: " + bladeburner.switchCity(chongqing)); - tprint("Chongqing chaos: " + bladeburner.getCityChaos(chongqing)); - tprint("Chongqing estimated pop: " + bladeburner.getCityEstimatedPopulation(chongqing)); - tprint("Chonqging estimated communities: " + bladeburner.getCityEstimatedCommunities(chongqing)); - -**Bladeburner handler example**. Note that this avoids the need of using the *bladeburner* namespace -identifier by attaching the Bladeburner API functions to an object:: - - const FIELD_ANALYSIS_INTERVAL = 10; //Number of minutes between field analysis states - const FIELD_ANALYSIS_DURATION = 5; //Duration in minutes - - function BladeburnerHandler(ns, params) { - //Netscript environment becomes part of the instance - this.ns = ns; - - //Netscript bladeburner API becomes part of this instance - for (var bladeburnerFn in ns.bladeburner) { - this[bladeburnerFn] = ns.bladeburner[bladeburnerFn]; - } - - this.fieldAnalysis = { - inProgress: params.startFieldAnalysis ? true : false, - cyclesRemaining: params.startFieldAnalysis ? FIELD_ANALYSIS_DURATION : 0, - cyclesSince: params.startFieldAnalysis ? FIELD_ANALYSIS_INTERVAL : 0, - } - } - - - - BladeburnerHandler.prototype.getStaminaPercentage = function() { - var res = this.getStamina(); - return 100 * (res[0] / res[1]); - } - - BladeburnerHandler.prototype.hasSimulacrum = function() { - var augs = this.ns.getOwnedAugmentations(); - return augs.includes("The Blade's Simulacrum"); - } - - BladeburnerHandler.prototype.handle = function() { - //If we're doing something else manually (without Simulacrum), - //it overrides Bladeburner stuff - if (!this.hasSimulacrum() && this.ns.isBusy()) { - this.ns.print("Idling bc player is busy with some other action"); - return; - } - - if (this.fieldAnalysis.inProgress) { - --(this.fieldAnalysis.cyclesRemaining); - if (this.fieldAnalysis.cyclesRemaining < 0) { - this.fieldAnalysis.inProgress = false; - this.fieldAnalysis.cyclesSince = 0; - return this.handle(); - } else { - this.startAction("general", "Field Analysis"); - this.ns.print("handler is doing field analyis for " + - (this.fieldAnalysis.cyclesRemaining+1) + " more mins"); - return 31; //Field Analysis Time + 1 - } - } else { - ++(this.fieldAnalysis.cyclesSince); - if (this.fieldAnalysis.cyclesSince > FIELD_ANALYSIS_INTERVAL) { - this.fieldAnalysis.inProgress = true; - this.fieldAnalysis.cyclesRemaining = FIELD_ANALYSIS_DURATION; - return this.handle(); - } - } - - this.stopBladeburnerAction(); - - var staminaPerc = this.getStaminaPercentage(); - if (staminaPerc < 55) { - this.ns.print("handler is starting training due to low stamina percentage"); - this.startAction("general", "Training"); - return 31; //Training time + 1 - } else { - var action = this.chooseAction(); - this.ns.print("handler chose " + action.name + " " + action.type + " through chooseAction()"); - this.startAction(action.type, action.name); - return (this.getActionTime(action.type, action.name) + 1); - } - } - - BladeburnerHandler.prototype.chooseAction = function() { - //Array of all Operations - var ops = this.getOperationNames(); - - //Sort Operations in order of increasing success chance - ops.sort((a, b)=>{ - return this.getActionEstimatedSuccessChance("operation", a) - - this.getActionEstimatedSuccessChance("operation", b); - }); - - //Loop through until you find one with 99+% success chance - for (let i = 0; i < ops.length; ++i) { - let successChance = this.getActionEstimatedSuccessChance("operation", ops[i]); - let count = this.getActionCountRemaining("operation", ops[i]); - if (successChance >= 0.99 && count > 10) { - return {type: "operation", name: ops[i]}; - } - } - - //Repeat for Contracts - var contracts = this.getContractNames(); - contracts.sort((a, b)=>{ - return this.getActionEstimatedSuccessChance("contract", a) - - this.getActionEstimatedSuccessChance("contract", b); - }); - - for (let i = 0; i < contracts.length; ++i) { - let successChance = this.getActionEstimatedSuccessChance("contract", contracts[i]); - let count = this.getActionCountRemaining("contract", contracts[i]); - if (successChance >= 0.80 && count > 10) { - return {type: "contract", name: contracts[i]}; - } - } - - return {type:"general", name:"Training"}; - } - - - BladeburnerHandler.prototype.process = async function() { - await this.ns.sleep(this.handle() * 1000); - } - - export async function main(ns) { - //Check if Bladeburner is available. This'll throw a runtime error if it's not - ns.bladeburner.getContractNames(); - - var startFieldAnalysis = true; - if (ns.args.length >= 1 && ns.args[0] == "false") { - startFieldAnalysis = false; - } - - var handler = new BladeburnerHandler(ns, { - startFieldAnalysis: startFieldAnalysis - }); - while(true) { - await handler.process(); - } - } diff --git a/doc/source/netscript/netscriptcodingcontractapi.rst b/doc/source/netscript/netscriptcodingcontractapi.rst deleted file mode 100644 index 4b2e7ef3d..000000000 --- a/doc/source/netscript/netscriptcodingcontractapi.rst +++ /dev/null @@ -1,26 +0,0 @@ -.. _netscriptcodingcontractapi: - -Netscript Coding Contract API -============================= -Netscript provides the following API for interacting with -:ref:`codingcontracts`. - -**The Coding Contract API must be accessed through the 'codingcontract' namespace** - -In :ref:`netscript1`:: - - codingcontract.getDescription("foo.cct", "home"); - codingcontract.attempt(1, "foo.cct", "foodnstuff"); - -In :ref:`netscriptjs`:: - - ns.codingcontract.getDescription("foo.cct", "home"); - ns.codingcontract.attempt(1, "foo.cct", "foodnstuff"); - -.. toctree:: - - attempt() - getContractType() - getDescription() - getData() - getNumTriesRemaining() diff --git a/doc/source/netscript/netscriptformulasapi.rst b/doc/source/netscript/netscriptformulasapi.rst deleted file mode 100644 index 1e6a3ef55..000000000 --- a/doc/source/netscript/netscriptformulasapi.rst +++ /dev/null @@ -1,66 +0,0 @@ -.. _netscriptformulas: - -Netscript Formulas Functions -============================ - -.. warning:: This page contains spoilers for the game. - -The formulas API allow you to gain insight into the inner workings of the game. -These functions will allow you to make more informed decision. - -The formulas API is unlocked in BitNode-5. If you are in BitNode-5, you will -automatically gain access to this API. Otherwise, you must have Source-File 5-1 -in order to use this API in other BitNodes. Additionally, some functions need -another source file level 1 to use. - -All of these function cost 0 GB of ram to use. - - -basic formulas --------------- - -These functions are under the ``formulas.basic.`` name space and available as -soon as you enter BitNode-5 or acquire Source-File 5-1. - -.. toctree:: - calculateSkill() - calculateExp() - growTime() - hackTime() - weakenTime() - growPercent() - hackPercent() - hackChance() - hackExp() - - -hacknetNodes formulas ---------------------- - -These functions are under the ``formulas.hacknetNodes.`` namespace and available as -soon as you enter BitNode-5 or acquire Source-File 5-1. - -.. toctree:: - hacknetNodeCost() - moneyGainRate() - levelUpgradeCost() - ramUpgradeCost() - coreUpgradeCost() - constants() - -hacknetServers formulas ------------------------ - -These functions are under the ``formulas.hacknetServers.`` namespace. -These functions require either being in BitNode-5 or having Source-File 5-1, and -also require either being in BitNode-9 or having Source-File 9-1 to be invoked. - -.. toctree:: - hacknetServerCost() - hashGainRate() - levelUpgradeCost() - ramUpgradeCost() - coreUpgradeCost() - cacheUpgradeCost() - hashUpgradeCost() - constants() diff --git a/doc/source/netscript/netscriptfunctions.rst b/doc/source/netscript/netscriptfunctions.rst index ac2b98ef4..cc497caf7 100644 --- a/doc/source/netscript/netscriptfunctions.rst +++ b/doc/source/netscript/netscriptfunctions.rst @@ -12,20 +12,12 @@ This includes information such as function signatures, what they do, and their r hack() grow() weaken() - hackAnalyzeThreads() - hackAnalyzePercent() - hackChance() - growthAnalyze() sleep() print() tprint() - tprintf() - clearLog() disableLog() enableLog() isLogEnabled() - getScriptLogs() - tail() scan() nuke() brutessh() @@ -38,21 +30,16 @@ This includes information such as function signatures, what they do, and their r spawn() kill() killall() - exit() scp() ls() ps() hasRootAccess() - getHostname() getHackingLevel() getHackingMultipliers() getHacknetMultipliers() - getPlayer() getServerMoneyAvailable() getServerMaxMoney() - getServerGrowth() getServerSecurityLevel() - getServerBaseSecurityLevel() getServerMinSecurityLevel() getServerRequiredHackingLevel() getServerNumPortsRequired() @@ -67,37 +54,6 @@ This includes information such as function signatures, what they do, and their r getPurchasedServers() getPurchasedServerLimit() getPurchasedServerMaxRam() - write() - tryWrite() - read() - peek() - clear() - getPortHandle() - rm() scriptRunning() scriptKill() - getScriptName() - getScriptRam() - getRunningScript() - getHackTime() - getGrowTime() - getWeakenTime() - getScriptIncome() - getScriptExpGain() - getTimeSinceLastAug() - sprintf() - vsprintf() - nFormat() - tFormat() - prompt() - wget() - getFavorToDonate() - flags() - alert() - toast() - tprintf() - -.. toctree:: - :caption: Deprecated: - - getServerRam() \ No newline at end of file + getScriptRam() \ No newline at end of file diff --git a/doc/source/netscript/netscriptgangapi.rst b/doc/source/netscript/netscriptgangapi.rst deleted file mode 100644 index df26529c1..000000000 --- a/doc/source/netscript/netscriptgangapi.rst +++ /dev/null @@ -1,47 +0,0 @@ -Netscript Gang API -================== - -Netscript provides the following API for interacting with the game's Gang mechanic. - -The Gang API is **not** immediately available to the player and must be unlocked -later in the game - -.. warning:: This page contains spoilers for the game - -The Gang mechanic and the Gang API are unlocked in BitNode-2. - -**Gang API functions must be accessed through the 'gang' namespace** - -In :ref:`netscript1`:: - - gang.getMemberNames(); - gang.recruitMember("Fry"); - -In :ref:`netscriptjs`:: - - ns.gang.getMemberNames(); - ns.gang.recruitMember("Fry"); - -.. toctree:: - :caption: API Functions: - - createGang() - inGang() - getMemberNames() - getGangInformation() - getOtherGangInformation() - getMemberInformation() - canRecruitMember() - recruitMember() - getTaskNames() - setMemberTask() - getTaskStats() - getEquipmentNames() - getEquipmentCost() - getEquipmentType() - getEquipmentStats() - purchaseEquipment() - ascendMember() - setTerritoryWarfare() - getChanceToWinClash() - getBonusTime() diff --git a/doc/source/netscript/netscripthacknetnodeapi.rst b/doc/source/netscript/netscripthacknetnodeapi.rst index 25b09b4b7..a67975019 100644 --- a/doc/source/netscript/netscripthacknetnodeapi.rst +++ b/doc/source/netscript/netscripthacknetnodeapi.rst @@ -29,7 +29,6 @@ In :ref:`netscriptjs`:: :caption: Hacknet Nodes API Functions: numNodes() - maxNumNodes() purchaseNode() getPurchaseNodeCost() getNodeStats() @@ -40,19 +39,6 @@ In :ref:`netscriptjs`:: getRamUpgradeCost() getCoreUpgradeCost() -.. toctree:: - :caption: Hacknet Servers API Functions: - - upgradeCache() - getCacheUpgradeCost() - numHashes() - hashCapacity() - hashCost() - spendHashes() - getHashUpgradeLevel() - getTrainingMult() - getStudyMult() - .. _netscript_hacknetnodeapi_referencingahacknetnode: Referencing a Hacknet Node diff --git a/doc/source/netscript/netscriptixapi.rst b/doc/source/netscript/netscriptixapi.rst deleted file mode 100644 index 256dcae92..000000000 --- a/doc/source/netscript/netscriptixapi.rst +++ /dev/null @@ -1,39 +0,0 @@ -.. _netscript_tixapi: - -Netscript Trade Information eXchange (TIX) API -============================================== - -The Trade Information eXchange (TIX) is the communications protocol supported by the World Stock Exchange (WSE). -The WSE provides an API that allows you to automatically communicate with the -:ref:`Stock Market `. -This API lets you write code using Netscript -to build automated trading systems and create your own algorithmic trading strategies. Access to this -TIX API can be purchased by visiting the World Stock Exchange in-game. - -Access to the TIX API currently costs $5 billion. After you purchase it, you will retain this -access even after you 'reset' by installing Augmentations - -**TIX API functions must be accessed through the stock namespace** - -.. toctree:: - :caption: API Functions: - - getSymbols() - getPrice() - getAskPrice() - getBidPrice() - getPosition() - getMaxShares() - getPurchaseCost() - getSaleGain() - buy() - sell() - short() - sellShort() - placeOrder() - cancelOrder() - getOrders() - getVolatility() - getForecast() - purchase4SMarketData() - purchase4SMarketDataTixApi() diff --git a/doc/source/netscript/netscriptsingularityfunctions.rst b/doc/source/netscript/netscriptsingularityfunctions.rst deleted file mode 100644 index 44cb42218..000000000 --- a/doc/source/netscript/netscriptsingularityfunctions.rst +++ /dev/null @@ -1,73 +0,0 @@ -.. _netscript_singularityfunctions: - -Netscript Singularity Functions -=============================== - -.. warning:: This page contains spoilers for the game. - -The Singularity Functions are a special set of Netscript functions that allow the player to control additional aspects of the game such as working for factions/companies, purchasing/installing Augmentations, and creating programs. - -The Singularity Functions are **not** immediately available to the player and must be unlocked later in the game. - -The player has access to all of these functions while in BitNode-4. Completing BitNode-4 and gaining its source-file unlocks certain Singularity Functions for use in other BitNodes, with all functions accessible at level 3. - -.. toctree:: - :caption: Level 1 Functions - - universityCourse() - gymWorkout() - travelToCity() - purchaseTor() - purchaseProgram() - getCurrentServer() - connect() - manualHack() - installBackdoor() - hospitalize() - isBusy() - -.. toctree:: - :caption: Level 2 Functions - - stopAction() - upgradeHomeRam() - getUpgradeHomeRamCost() - workForCompany() - applyToCompany() - getCompanyRep() - getCompanyFavor() - getCompanyFavorGain() - checkFactionInvitations() - joinFaction() - workForFaction() - getFactionRep() - getFactionFavor() - getFactionFavorGain() - upgradeHomeCores() - -.. toctree:: - :caption: Level 3 Functions - - donateToFaction() - createProgram() - commitCrime() - getCrimeChance() - getCrimeStats() - getOwnedAugmentations() - getOwnedSourceFiles() - getAugmentationsFromFaction() - getAugmentationCost() - getAugmentationPrereq() - getAugmentationPrice() - getAugmentationRepReq() - getAugmentationStats() - purchaseAugmentation() - installAugmentations() - softReset() - - -.. toctree:: - :caption: Deprecated: - - getStats() - getCharacterInformation() diff --git a/doc/source/netscript/netscriptsleeveapi.rst b/doc/source/netscript/netscriptsleeveapi.rst deleted file mode 100644 index 6ddcff634..000000000 --- a/doc/source/netscript/netscriptsleeveapi.rst +++ /dev/null @@ -1,79 +0,0 @@ -.. _netscript_sleeveapi: - -Netscript Sleeve API -========================= -Netscript provides the following API for interacting with the game's -:ref:`Duplicate Sleeve ` mechanic. - -The Sleeve API is **not** immediately available to the player and must be unlocked -later in the game. - -.. warning:: This page contains spoilers for the game - -The Sleeve API is unlocked in BitNode-10. If you are in BitNode-10, you will -automatically gain access to this API. Otherwise, you must have Source-File 10 in -order to use this API in other BitNodes - -**Sleeve API functions must be accessed through the 'sleeve' namespace** - -In :ref:`netscript1`:: - - sleeve.synchronize(0); - sleeve.commitCrime(0, "shoplift"); - -In :ref:`netscriptjs`:: - - ns.sleeve.synchronize(0); - ns.sleeve.commitCrime(0, "shoplift"); - -.. toctree:: - :caption: API Functions: - - getNumSleeves() - getSleeveStats() - getInformation() - getTask() - setToShockRecovery() - setToSynchronize() - setToCommitCrime() - setToFactionWork() - setToCompanyWork() - setToUniversityCourse() - setToGymWorkout() - travel() - getSleeveAugmentations() - getSleevePurchasableAugs() - purchaseSleeveAug() - -.. _netscript_sleeveapi_referencingaduplicatesleeve: - -Referencing a Duplicate Sleeve ------------------------------- -Most of the functions in the Sleeve API perform an operation on a single Duplicate -Sleeve. In order to specify which Sleeve the operation should be performed on, -a numeric index is used as an identifier. The index should follow array-notation, such -that the first Duplicate Sleeve has an index of 0, the second Duplicate Sleeve has -an index of 1, and so on. - -The order of the Duplicate Sleeves matches the order on the UI page. - -Examples --------- - -**Basic example usage**:: - - for (var i = 0; i < sleeve.getNumSleeves(); i++) { - sleeve.setToShockRecovery(i); - } - - sleep(10 * 60 * 60); // wait 10h - - for (var i = 0; i < sleeve.getNumSleeves(); i++) { - sleeve.setToSynchronize(i); - } - - sleep(10*60*60); // wait 10h - - for (var i = 0; i < sleeve.getNumSleeves(); i++) { - sleeve.setToCommitCrime(i, 'shoplift'); - } diff --git a/doc/source/netscript/singularityfunctions/applyToCompany.rst b/doc/source/netscript/singularityfunctions/applyToCompany.rst deleted file mode 100644 index c8aee245e..000000000 --- a/doc/source/netscript/singularityfunctions/applyToCompany.rst +++ /dev/null @@ -1,30 +0,0 @@ -applyToCompany() Netscript Function -=================================== - -.. js:function:: applyToCompany(companyName, field) - - :RAM cost: 3 GB - :param string companyName: Name of company to apply to. CASE-SENSITIVE. - :param string field: - Field to which you want to apply. Not case-sensitive - - * software - * software consultant - * it - * security engineer - * network engineer - * business - * business consultant - * security - * agent - * employee - * part-time employee - * waiter - * part-time waiter - :returns: ``true`` if you got the job. - - If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function. - - This function will automatically try to apply to the specified company for a position in the specified - field. This function can also be used to apply for promotions by specifying the company and field you - are already employed at. \ No newline at end of file diff --git a/doc/source/netscript/singularityfunctions/checkFactionInvitations.rst b/doc/source/netscript/singularityfunctions/checkFactionInvitations.rst deleted file mode 100644 index 4edd9c53a..000000000 --- a/doc/source/netscript/singularityfunctions/checkFactionInvitations.rst +++ /dev/null @@ -1,10 +0,0 @@ -checkFactionInvitations() Netscript Function -============================================ - -.. js:function:: checkFactionInvitations() - - :RAM cost: 3 GB - :returns: Array with the name of all Factions with whom you have oustanding invitations. - - If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function. - diff --git a/doc/source/netscript/singularityfunctions/commitCrime.rst b/doc/source/netscript/singularityfunctions/commitCrime.rst deleted file mode 100644 index e60ee7df9..000000000 --- a/doc/source/netscript/singularityfunctions/commitCrime.rst +++ /dev/null @@ -1,35 +0,0 @@ -commitCrime() Netscript Function -================================ - -.. js:function:: commitCrime(crime) - - :RAM cost: 5 GB - :param string crime: - Name of crime to attempt. Not case-sensitive. This argument is fairly lenient in terms of what inputs it accepts. - Here is a list of valid inputs for all of the crimes: - - * shoplift - * rob store - * mug - * larceny - * deal drugs - * bond forgery - * traffick arms - * homicide - * grand theft auto - * kidnap - * assassinate - * heist - - If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function. - - This function is used to automatically attempt to commit crimes. If you are already in the middle of some 'working' action - (such as working for a company or training at a gym), then running this function will automatically cancel that action and give you your earnings. - - This function returns the number of milliseconds it takes to attempt the specified crime (e.g It takes 60 seconds to attempt the 'Rob Store' crime, - so running ``commitCrime('rob store')`` will return 60000). - - Warning: I do not recommend using the time returned from this function to try and schedule your crime attempts. - Instead, I would use the :doc:`isBusy` Singularity function to check whether you have finished attempting a crime. - This is because although the game sets a certain crime to be X amount of seconds, there is no guarantee that your - browser will follow that time limit. diff --git a/doc/source/netscript/singularityfunctions/connect.rst b/doc/source/netscript/singularityfunctions/connect.rst deleted file mode 100644 index 974996363..000000000 --- a/doc/source/netscript/singularityfunctions/connect.rst +++ /dev/null @@ -1,20 +0,0 @@ -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"); diff --git a/doc/source/netscript/singularityfunctions/createProgram.rst b/doc/source/netscript/singularityfunctions/createProgram.rst deleted file mode 100644 index 7bfa657f7..000000000 --- a/doc/source/netscript/singularityfunctions/createProgram.rst +++ /dev/null @@ -1,30 +0,0 @@ -createProgram() Netscript Function -================================== - -.. js:function:: createProgram(programName) - - :RAM cost: 5 GB - :param string programName: Name of program to create. Not case-sensitive - :returns: ``true`` if you successfully start working on the specified program. - - If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function. - - This function will automatically set you to start working on creating the specified program. If you are - already in the middle of some "working" action (such as working for a company, training at a gym, or taking a course), - then running this function will automatically cancel that action and give you your earnings. - - Example: - - createProgram("relaysmtp.exe"); - - Note that creating a program using this function has the same hacking level requirements as it normally would. These level requirements are: - - * BruteSSH.exe: 50 - * FTPCrack.exe: 100 - * relaySMTP.exe: 250 - * HTTPWorm.exe: 500 - * SQLInject.exe: 750 - * DeepscanV1.exe: 75 - * DeepscanV2.exe: 400 - * ServerProfiler.exe: 75 - * AutoLink.exe: 25 diff --git a/doc/source/netscript/singularityfunctions/donateToFaction.rst b/doc/source/netscript/singularityfunctions/donateToFaction.rst deleted file mode 100644 index ef0da9ce1..000000000 --- a/doc/source/netscript/singularityfunctions/donateToFaction.rst +++ /dev/null @@ -1,13 +0,0 @@ -donateToFaction() Netscript Function -==================================== - -.. js:function:: donateToFaction(factionName, donateAmt) - - :RAM cost: 5 GB - :param string factionName: Name of faction to donate to. CASE-SENSITIVE - :param number donateAmt: Amount of money to donate - :returns: ``true`` if you successfully donate the money. - - If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function. - - Attempts to donate money to the specified faction in exchange for reputation. \ No newline at end of file diff --git a/doc/source/netscript/singularityfunctions/getAugmentationCost.rst b/doc/source/netscript/singularityfunctions/getAugmentationCost.rst deleted file mode 100644 index cc1e694f5..000000000 --- a/doc/source/netscript/singularityfunctions/getAugmentationCost.rst +++ /dev/null @@ -1,19 +0,0 @@ -getAugmentationCost() Netscript Function -======================================== - -.. js:function:: getAugmentationCost(augName) - - .. warning:: This function is deprecated. It still functions, but new - scripts should prefer :doc:`getAugmentationPrice` - and :doc:`getAugmentationRepReq` instead. - - :RAM cost: 5 GB - - :param string augName: Name of Augmentation. CASE-SENSITIVE - - If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function. - - This function returns an array with two elements that gives the cost for the specified Augmentation. - The first element in the returned array is the reputation requirement of the Augmentation, and the second element is the money cost. - - If an invalid Augmentation name is passed in for the ``augName`` argument, this function will throw a runtime error. diff --git a/doc/source/netscript/singularityfunctions/getAugmentationPrereq.rst b/doc/source/netscript/singularityfunctions/getAugmentationPrereq.rst deleted file mode 100644 index 266544473..000000000 --- a/doc/source/netscript/singularityfunctions/getAugmentationPrereq.rst +++ /dev/null @@ -1,15 +0,0 @@ -getAugmentationPrereq() Netscript Function -========================================== - -.. js:function:: getAugmentationPrereq(augName) - - :RAM cost: 5 GB - - :param string augName: Name of Augmentation. CASE-SENSITIVE - - If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function. - - This function returns an array with the names of the prerequisite Augmentation(s) for the specified Augmentation. - If there are no prerequisites, a blank array is returned. - - If an invalid Augmentation name is passed in for the *augName* argument, this function will throw a runtime error. diff --git a/doc/source/netscript/singularityfunctions/getAugmentationPrice.rst b/doc/source/netscript/singularityfunctions/getAugmentationPrice.rst deleted file mode 100644 index 87a9ad27d..000000000 --- a/doc/source/netscript/singularityfunctions/getAugmentationPrice.rst +++ /dev/null @@ -1,14 +0,0 @@ -getAugmentationPrice() Netscript Function -========================================== - -.. js:function:: getAugmentationPrice(augName) - - :RAM cost: 2.5 GB - - :param string augName: Name of Augmentation. CASE-SENSITIVE - - If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function. - - This function returns the money cost for the specified Augmentation. - - If an invalid Augmentation name is passed in for the *augName* argument, this function will throw a runtime error. diff --git a/doc/source/netscript/singularityfunctions/getAugmentationRepReq.rst b/doc/source/netscript/singularityfunctions/getAugmentationRepReq.rst deleted file mode 100644 index 3f9a3c069..000000000 --- a/doc/source/netscript/singularityfunctions/getAugmentationRepReq.rst +++ /dev/null @@ -1,14 +0,0 @@ -getAugmentationRepReq() Netscript Function -========================================== - -.. js:function:: getAugmentationRepReq(augName) - - :RAM cost: 2.5 GB - - :param string augName: Name of Augmentation. CASE-SENSITIVE - - If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function. - - This function returns the reputation requirement for the specified Augmentation. - - If an invalid Augmentation name is passed in for the *augName* argument, this function will throw a runtime error. diff --git a/doc/source/netscript/singularityfunctions/getAugmentationStats.rst b/doc/source/netscript/singularityfunctions/getAugmentationStats.rst deleted file mode 100644 index a73a073a4..000000000 --- a/doc/source/netscript/singularityfunctions/getAugmentationStats.rst +++ /dev/null @@ -1,20 +0,0 @@ -getAugmentationStats() Netscript Function -========================================= - -.. js:function:: getAugmentationStats(name) - - :RAM cost: 5 GB - - :param string name: Name of Augmentation. CASE-SENSITIVE - - If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function. - - Examples: - - .. code-block:: javascript - - ns.getAugmentationStats("Synfibril Muscle") - { - strength_mult: 1.3, - defense_mult: 1.3, - } diff --git a/doc/source/netscript/singularityfunctions/getAugmentationsFromFaction.rst b/doc/source/netscript/singularityfunctions/getAugmentationsFromFaction.rst deleted file mode 100644 index 938611b8e..000000000 --- a/doc/source/netscript/singularityfunctions/getAugmentationsFromFaction.rst +++ /dev/null @@ -1,12 +0,0 @@ -getAugmentationsFromFaction() Netscript Function -================================================ - -.. js:function:: getAugmentationsFromFaction(facName) - - :RAM cost: 5 GB - - :param string facName: Name of faction. CASE-SENSITIVE - - If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function. - - Returns an array containing the names (as strings) of all Augmentations that are available from the specified faction. diff --git a/doc/source/netscript/singularityfunctions/getCharacterInformation.rst b/doc/source/netscript/singularityfunctions/getCharacterInformation.rst deleted file mode 100644 index e94de8bee..000000000 --- a/doc/source/netscript/singularityfunctions/getCharacterInformation.rst +++ /dev/null @@ -1,60 +0,0 @@ -getCharacterInformation() Netscript Function -============================================ - -.. js:function:: getCharacterInformation() - - .. warning:: This function is deprecated. - - :RAM cost: 0.5 GB - - If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to run this function. - - Returns an object with various information about your character. The object has the following properties:: - - { - bitnode: Current BitNode number - city: Name of city you are currently in - factions: Array of factions you are currently a member of - hp: Current health points - jobs: Array of all companies at which you have jobs - jobTitle: Array of job positions for all companies you are employed at. Same order as 'jobs' - maxHp: Maximum health points - tor: Boolean indicating whether or not you have a tor router - - // The following is an object with many of the player's multipliers from Augmentations/Source Files - mult: { - agility: Agility stat - agilityExp: Agility exp - companyRep: Company reputation - crimeMoney: Money earned from crimes - crimeSuccess: Crime success chance - defense: Defense stat - defenseExp: Defense exp - dexterity: Dexterity stat - dexterityExp: Dexterity exp - factionRep: Faction reputation - hacking: Hacking stat - hackingExp: Hacking exp - strength: Strength stat - strengthExp: Strength exp - workMoney: Money earned from jobs - }, - - // The following apply only to when the character is performing - // some type of working action, such as working for a company/faction - timeWorked: Timed worked in ms - workHackExpGain: Hacking experience earned so far from work - workStrExpGain: Str experience earned so far from work - workDefExpGain: Def experience earned so far from work - workDexExpGain: Dex experience earned so far from work - workAgiExpGain: Agi experience earned so far from work - workChaExpGain: Cha experience earned so far from work - workRepGain: Reputation earned so far from work, if applicable - workMoneyGain: Money earned so far from work, if applicable - hackingExp: Total hacking experience - strengthExp: Total strength experience - defenseExp: Total defense experience - dexterityExp: Total dexterity experience - agilityExp: Total agility experience - charismaExp: Total charisma experience - } diff --git a/doc/source/netscript/singularityfunctions/getCompanyFavor.rst b/doc/source/netscript/singularityfunctions/getCompanyFavor.rst deleted file mode 100644 index 2340d6e8f..000000000 --- a/doc/source/netscript/singularityfunctions/getCompanyFavor.rst +++ /dev/null @@ -1,13 +0,0 @@ -getCompanyFavor() Netscript Function -==================================== - -.. js:function:: getCompanyFavor(companyName) - - :RAM cost: 1 GB - - :param string companyName: Name of the company. CASE-SENSITIVE - - If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function. - - This function will return the amount of favor you have at the specified company. - If the company passed in as an argument is invalid, -1 will be returned. diff --git a/doc/source/netscript/singularityfunctions/getCompanyFavorGain.rst b/doc/source/netscript/singularityfunctions/getCompanyFavorGain.rst deleted file mode 100644 index e544967ba..000000000 --- a/doc/source/netscript/singularityfunctions/getCompanyFavorGain.rst +++ /dev/null @@ -1,13 +0,0 @@ -getCompanyFavorGain() Netscript Function -======================================== - -.. js:function:: getCompanyFavorGain(companyName) - - :RAM cost: 0.75 GB - - :param string companyName: Name of the company. CASE-SENSITIVE - - If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function. - - This function will return the amount of favor you will gain for the specified company - when you reset by installing Augmentations. diff --git a/doc/source/netscript/singularityfunctions/getCompanyRep.rst b/doc/source/netscript/singularityfunctions/getCompanyRep.rst deleted file mode 100644 index 8b5a4cab8..000000000 --- a/doc/source/netscript/singularityfunctions/getCompanyRep.rst +++ /dev/null @@ -1,13 +0,0 @@ -getCompanyRep() Netscript Function -================================== - -.. js:function:: getCompanyRep(companyName) - - :RAM cost: 1 GB - - :param string companyName: Name of the company. CASE-SENSITIVE - - If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function. - - This function will return the amount of reputation you have at the specified company. - If the company passed in as an argument is invalid, -1 will be returned. diff --git a/doc/source/netscript/singularityfunctions/getCrimeChance.rst b/doc/source/netscript/singularityfunctions/getCrimeChance.rst deleted file mode 100644 index 7cbfa67be..000000000 --- a/doc/source/netscript/singularityfunctions/getCrimeChance.rst +++ /dev/null @@ -1,14 +0,0 @@ -getCrimeChance() Netscript Function -=================================== - -.. js:function:: getCrimeChance(crime) - - :RAM cost: 5 GB - - :param string crime: - Name of crime. Not case-sensitive. This argument is fairlyn lenient in terms of what inputs it accepts. - Check the documentation for the *commitCrime()* function for a list of example inputs. - - If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function. - - This function returns your chance of success at commiting the specified crime. The chance is returned as a decimal (i.e. 60% would be returned as 0.6). diff --git a/doc/source/netscript/singularityfunctions/getCrimeStats.rst b/doc/source/netscript/singularityfunctions/getCrimeStats.rst deleted file mode 100644 index 46a22d4b6..000000000 --- a/doc/source/netscript/singularityfunctions/getCrimeStats.rst +++ /dev/null @@ -1,37 +0,0 @@ -getCrimeStats() Netscript Function -=================================== - -.. js:function:: getCrimeStats(crime) - - :RAM cost: 5 GB - - :param string crime: - Name of crime. Not case-sensitive. This argument is fairlyn lenient in terms of what inputs it accepts. - Check the documentation for the *commitCrime()* function for a list of example inputs. - - If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function. - - :return The stats of the crime - - { - "difficulty": 0.2, - "karma": 0.25, - "kills": 0, - "money": 36000, - "name": "Mug", - "time": 4000, - "type": "mug someone", - "hacking_success_weight": 0, - "strength_success_weight": 1.5, - "defense_success_weight": 0.5, - "dexterity_success_weight": 1.5, - "agility_success_weight": 0.5, - "charisma_success_weight": 0, - "hacking_exp": 0, - "strength_exp": 3, - "defense_exp": 3, - "dexterity_exp": 3, - "agility_exp": 3, - "charisma_exp": 0, - "intelligence_exp": 0 - } diff --git a/doc/source/netscript/singularityfunctions/getCurrentServer.rst b/doc/source/netscript/singularityfunctions/getCurrentServer.rst deleted file mode 100644 index 337aebc71..000000000 --- a/doc/source/netscript/singularityfunctions/getCurrentServer.rst +++ /dev/null @@ -1,10 +0,0 @@ -getCurrentServer() Netscript Function -===================================== - -.. js:function:: getCurrentServer() - - :RAM cost: 2 GB - :returns: The hostname of the server the player is currently connected to. - - If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function. - diff --git a/doc/source/netscript/singularityfunctions/getFactionFavor.rst b/doc/source/netscript/singularityfunctions/getFactionFavor.rst deleted file mode 100644 index f368b941c..000000000 --- a/doc/source/netscript/singularityfunctions/getFactionFavor.rst +++ /dev/null @@ -1,12 +0,0 @@ -getFactionFavor() Netscript Function -==================================== - -.. js:function:: getFactionFavor(factionName) - - :RAM cost: 1 GB - - :param string factionName: Name of faction. CASE-SENSITIVE - - If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function. - - This function returns the amount of favor you have for the specified faction. diff --git a/doc/source/netscript/singularityfunctions/getFactionFavorGain.rst b/doc/source/netscript/singularityfunctions/getFactionFavorGain.rst deleted file mode 100644 index b7677208c..000000000 --- a/doc/source/netscript/singularityfunctions/getFactionFavorGain.rst +++ /dev/null @@ -1,12 +0,0 @@ -getFactionFavorGain() Netscript Function -======================================== - -.. js:function:: getFactionFavorGain(factionName) - - :RAM cost: 0.75 GB - - :param string factionName: Name of faction. CASE-SENSITIVE - - If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function. - - This function returns the amount of favor you will gain for the specified faction when you reset by installing Augmentations. diff --git a/doc/source/netscript/singularityfunctions/getFactionRep.rst b/doc/source/netscript/singularityfunctions/getFactionRep.rst deleted file mode 100644 index a256b09a3..000000000 --- a/doc/source/netscript/singularityfunctions/getFactionRep.rst +++ /dev/null @@ -1,12 +0,0 @@ -getFactionRep() Netscript Function -================================== - -.. js:function:: getFactionRep(factionName) - - :RAM cost: 1 GB - - :param string factionName: Name of faction. CASE-SENSITIVE - - If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function. - - This function returns the amount of reputation you have for the specified faction. diff --git a/doc/source/netscript/singularityfunctions/getOwnedAugmentations.rst b/doc/source/netscript/singularityfunctions/getOwnedAugmentations.rst deleted file mode 100644 index ecd26f5d5..000000000 --- a/doc/source/netscript/singularityfunctions/getOwnedAugmentations.rst +++ /dev/null @@ -1,14 +0,0 @@ -getOwnedAugmentations() Netscript Function -========================================== - -.. js:function:: getOwnedAugmentations(purchased=false) - - :RAM cost: 5 GB - - :param boolean purchase: - Specifies whether the returned array should include Augmentations you have purchased but not yet installed. - By default, this argument is false which means that the return value will NOT have the purchased Augmentations. - - If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function. - - This function returns an array containing the names (as strings) of all Augmentations you have. diff --git a/doc/source/netscript/singularityfunctions/getOwnedSourceFiles.rst b/doc/source/netscript/singularityfunctions/getOwnedSourceFiles.rst deleted file mode 100644 index e5cbdeca8..000000000 --- a/doc/source/netscript/singularityfunctions/getOwnedSourceFiles.rst +++ /dev/null @@ -1,11 +0,0 @@ -getOwnedSourceFiles() Netscript Function -======================================== - -.. js:function:: getOwnedSourceFiles() - - :RAM cost: 5 GB - - If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function. - - Returns an array of source files - [{n: 1, lvl: 3}, {n: 4, lvl: 3}] diff --git a/doc/source/netscript/singularityfunctions/getStats.rst b/doc/source/netscript/singularityfunctions/getStats.rst deleted file mode 100644 index 6bbb4b817..000000000 --- a/doc/source/netscript/singularityfunctions/getStats.rst +++ /dev/null @@ -1,29 +0,0 @@ -getStats() Netscript Function -============================= - -.. js:function:: getStats() - - .. warning:: This function is deprecated. - - :RAM cost: 0.5 GB - - If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to run this function. - - Returns an object with the Player's stats. The object has the following properties:: - - { - hacking - strength - defense - dexterity - agility - charisma - intelligence - } - - Example:: - - res = getStats(); - print('My charisma level is: ' + res.charisma); - - :RAM cost: 0.5 GB diff --git a/doc/source/netscript/singularityfunctions/getUpgradeHomeRamCost.rst b/doc/source/netscript/singularityfunctions/getUpgradeHomeRamCost.rst deleted file mode 100644 index 102e1fcc2..000000000 --- a/doc/source/netscript/singularityfunctions/getUpgradeHomeRamCost.rst +++ /dev/null @@ -1,10 +0,0 @@ -getUpgradeHomeRamCost() Netscript Function -========================================== - -.. js:function:: getUpgradeHomeRamCost() - - :RAM cost: 1.5 GB - - If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function. - - Returns the cost of upgrading the player's home computer RAM. diff --git a/doc/source/netscript/singularityfunctions/gymWorkout.rst b/doc/source/netscript/singularityfunctions/gymWorkout.rst deleted file mode 100644 index 2f50bbf19..000000000 --- a/doc/source/netscript/singularityfunctions/gymWorkout.rst +++ /dev/null @@ -1,32 +0,0 @@ -gymWorkout() Netscript Function -=============================== - -.. js:function:: gymWorkout(gymName, stat) - - :RAM cost: 2 GB - - :param string gymName: - Name of gym. Not case-sensitive. You must be in the correct city for whatever gym you specify. - - * Crush Fitness Gym - * Snap Fitness Gym - * Iron Gym - * Powerhouse Gym - * Millenium Fitness Gym - :param string stat: - The stat you want to train. Not case-sensitive. - - * strength OR str - * defense OR def - * dexterity OR dex - * agility OR agi - - 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 automatically set you to start working out at a gym to train a particular stat. If you are - already in the middle of some "working" action (such as working at a company, for a faction, or on a program), - then running this function will automatically cancel that action and give you your earnings. - - The cost and experience gains for all of these gyms are the same as if you were to manually visit these gyms and train - - This function will return true if you successfully start working out at the gym, and false otherwise. diff --git a/doc/source/netscript/singularityfunctions/hospitalize.rst b/doc/source/netscript/singularityfunctions/hospitalize.rst deleted file mode 100644 index 391aa8b88..000000000 --- a/doc/source/netscript/singularityfunctions/hospitalize.rst +++ /dev/null @@ -1,11 +0,0 @@ -hospitalize() Netscript Function -=================================== - -.. js:function:: hospitalize() - - :RAM cost: 1 GB - :returns: The cost of your visit to the hospital. - - If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to use this function. - - Hospitalize yourself. Recovering all lost hp. \ No newline at end of file diff --git a/doc/source/netscript/singularityfunctions/installAugmentations.rst b/doc/source/netscript/singularityfunctions/installAugmentations.rst deleted file mode 100644 index 4938e82c5..000000000 --- a/doc/source/netscript/singularityfunctions/installAugmentations.rst +++ /dev/null @@ -1,19 +0,0 @@ -installAugmentations() Netscript Function -========================================= - -.. js:function:: installAugmentations(cbScript) - - :RAM cost: 5 GB - - :param string cbScript: - Optional callback script. This is a script that will automatically be run after Augmentations are installed (after the reset). - This script will be run with no arguments and 1 thread. It must be located on your home computer. - - If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function. - - This function will automatically install your Augmentations, resetting the game as usual. - - This function will return false if it was not able to install Augmentations. - - If this function successfully installs Augmentations, then it has no return value because - all scripts are immediately terminated. diff --git a/doc/source/netscript/singularityfunctions/installBackdoor.rst b/doc/source/netscript/singularityfunctions/installBackdoor.rst deleted file mode 100644 index e0d754721..000000000 --- a/doc/source/netscript/singularityfunctions/installBackdoor.rst +++ /dev/null @@ -1,22 +0,0 @@ -installBackdoor() Netscript Function -==================================== - -.. js:function:: installBackdoor() - - :RAM cost: 2 GB - - 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 install a backdoor on the server you are currently connected to. - - Examples: - - .. code-block:: javascript - - connect("foodnstuff"); - installBackdoor(); - - .. warning:: - For NS2 users: - - This function is async. \ No newline at end of file diff --git a/doc/source/netscript/singularityfunctions/isBusy.rst b/doc/source/netscript/singularityfunctions/isBusy.rst deleted file mode 100644 index d661b3549..000000000 --- a/doc/source/netscript/singularityfunctions/isBusy.rst +++ /dev/null @@ -1,18 +0,0 @@ -isBusy() Netscript Function -=========================== - -.. js:function:: isBusy() - - :RAM cost: 0.5 GB - - If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to run this function. - - Returns a boolean indicating whether or not the player is currently performing an 'action'. - These actions include: - - * Working for a company/faction - * Studying at a univeristy - * Working out at a gym - * Creating a program - * Committing a crime - * Carrying out a Hacking Mission diff --git a/doc/source/netscript/singularityfunctions/joinFaction.rst b/doc/source/netscript/singularityfunctions/joinFaction.rst deleted file mode 100644 index 71d547cac..000000000 --- a/doc/source/netscript/singularityfunctions/joinFaction.rst +++ /dev/null @@ -1,12 +0,0 @@ -joinFaction() Netscript Function -================================ - -.. js:function:: joinFaction(name) - - :RAM cost: 3 GB - - :param string name: Name of faction to join. CASE-SENSITIVE - - If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function. - - This function will automatically accept an invitation from a faction and join it. diff --git a/doc/source/netscript/singularityfunctions/manualHack.rst b/doc/source/netscript/singularityfunctions/manualHack.rst deleted file mode 100644 index f3fc43c66..000000000 --- a/doc/source/netscript/singularityfunctions/manualHack.rst +++ /dev/null @@ -1,23 +0,0 @@ -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. - - Examples: - - .. code-block:: javascript - - connect("foodnstuff"); - manualHack(); - - .. warning:: - For NS2 users: - - This function is async. \ No newline at end of file diff --git a/doc/source/netscript/singularityfunctions/purchaseAugmentation.rst b/doc/source/netscript/singularityfunctions/purchaseAugmentation.rst deleted file mode 100644 index 5291bd92c..000000000 --- a/doc/source/netscript/singularityfunctions/purchaseAugmentation.rst +++ /dev/null @@ -1,16 +0,0 @@ -purchaseAugmentation() Netscript Function -========================================= - -.. js:function:: purchaseAugmentation(factionName, augName) - - :RAM cost: 5 GB - - :param string factionName: Name of faction to purchase Augmentation from. CASE-SENSITIVE - :param string augName: Name of Augmentation to purchase. CASE-SENSITIVE - - - If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function. - - This function will try to purchase the specified Augmentation through the given Faction. - - This function will return true if the Augmentation is successfully purchased, and false otherwise. diff --git a/doc/source/netscript/singularityfunctions/purchaseProgram.rst b/doc/source/netscript/singularityfunctions/purchaseProgram.rst deleted file mode 100644 index 59c70ad40..000000000 --- a/doc/source/netscript/singularityfunctions/purchaseProgram.rst +++ /dev/null @@ -1,22 +0,0 @@ -purchaseProgram() Netscript Function -==================================== - -.. js:function:: purchaseProgram(programName) - - :RAM cost: 2 GB - - :param string programName: Name of program to purchase. Must include '.exe' extension. Not case-sensitive. - - 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 allows you to automatically purchase programs. You MUST have a TOR router in order to use this function. - The cost of purchasing programs using this function is the same as if you were purchasing them through the Dark Web using the - Terminal *buy* command. - - Example:: - - purchaseProgram("brutessh.exe"); - - This function will return true if the specified program is purchased, and false otherwise. - - :RAM cost: 2 GB diff --git a/doc/source/netscript/singularityfunctions/purchaseTor.rst b/doc/source/netscript/singularityfunctions/purchaseTor.rst deleted file mode 100644 index d9076ae9d..000000000 --- a/doc/source/netscript/singularityfunctions/purchaseTor.rst +++ /dev/null @@ -1,15 +0,0 @@ -purchaseTor() Netscript Function -================================ - -.. js:function:: purchaseTor() - - :RAM cost: 2 GB - - 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 allows you to automatically purchase a TOR router. The cost for purchasing a TOR router using this - function is the same as if you were to manually purchase one. - - This function will return true if it successfully purchased a TOR router and false otherwise. - - :RAM cost: 2 GB diff --git a/doc/source/netscript/singularityfunctions/softReset.rst b/doc/source/netscript/singularityfunctions/softReset.rst deleted file mode 100644 index c027b1944..000000000 --- a/doc/source/netscript/singularityfunctions/softReset.rst +++ /dev/null @@ -1,14 +0,0 @@ -softReset() Netscript Function -=================================== - -.. js:function:: softReset([callbackScript]) - - :RAM cost: 5 GB - :param string cbScript: - Optional callback script. This is a script that will automatically be - run after the soft reset. This script will be run with no arguments and - 1 thread. It must be located on your home computer. - - If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function. - - This function will perform a reset even if you don't have any augmentation installed. diff --git a/doc/source/netscript/singularityfunctions/stopAction.rst b/doc/source/netscript/singularityfunctions/stopAction.rst deleted file mode 100644 index 7f5f10fa0..000000000 --- a/doc/source/netscript/singularityfunctions/stopAction.rst +++ /dev/null @@ -1,20 +0,0 @@ -stopAction() Netscript Function -=============================== - -.. js:function:: stopAction() - - :RAM cost: 1 GB - - If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to run this function. - This function is used to end whatever 'action' the player is currently performing. The player - will receive whatever money/experience/etc. he has earned from that action. - - The actions that can be stopped with this function are: - - * Studying at a university - * Working for a company/faction - * Creating a program - * Committing a Crime - - This function will return true if the player's action was ended. It will return false if the player was not - performing an action when this function was called. diff --git a/doc/source/netscript/singularityfunctions/travelToCity.rst b/doc/source/netscript/singularityfunctions/travelToCity.rst deleted file mode 100644 index 7b58eba33..000000000 --- a/doc/source/netscript/singularityfunctions/travelToCity.rst +++ /dev/null @@ -1,22 +0,0 @@ -travelToCity() Netscript Function -================================= - -.. js:function:: travelToCity(cityName) - - :RAM cost: 2 GB - - :param string cityName: - City to travel to. CASE-SENSITIVE. - - * Aevum - * Chongqing - * Sector-12 - * New Tokyo - * Ishima - * Volhaven - - 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 allows the player to travel to any city. The cost for using this function is the same as the cost for traveling through the Travel Agency. - - This function will return true if you successfully travel to the specified city and false otherwise. diff --git a/doc/source/netscript/singularityfunctions/universityCourse.rst b/doc/source/netscript/singularityfunctions/universityCourse.rst deleted file mode 100644 index d48ad152c..000000000 --- a/doc/source/netscript/singularityfunctions/universityCourse.rst +++ /dev/null @@ -1,32 +0,0 @@ -universityCourse() Netscript Function -===================================== - -.. js:function:: universityCourse(universityName, courseName) - - :RAM cost: 2 GB - - :param string universityName: - Name of university. Not case-sensitive. You must be in the correct city for whatever university you specify. - - * Summit University - * Rothman University - * ZB Institute Of Technology - :param string courseName: - Name of course. Not case-sensitive. - - * Study Computer Science - * Data Strucures - * Networks - * Algorithms - * Management - * Leadership - - 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 automatically set you to start taking a course at a university. If you are already in the middle of some - "working" action (such as working at a company, for a faction, or on a program), then running this function will automatically - cancel that action and give you your earnings. - - The cost and experience gains for all of these universities and classes are the same as if you were to manually visit and take these classes. - - This function will return true if you successfully start taking the course, and false otherwise. diff --git a/doc/source/netscript/singularityfunctions/upgradeHomeCores.rst b/doc/source/netscript/singularityfunctions/upgradeHomeCores.rst deleted file mode 100644 index eb1a76c81..000000000 --- a/doc/source/netscript/singularityfunctions/upgradeHomeCores.rst +++ /dev/null @@ -1,12 +0,0 @@ -upgradeHomeRam() Netscript Function -=================================== - -.. js:function:: upgradeHomeCores() - - :RAM cost: 3 GB - - If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function. - - This function will upgrade amount of CORES on the player's home computer. The cost is the same as if you were to do it manually. - - This function will return true if the player's home computer core count is successfully upgraded, and false otherwise. diff --git a/doc/source/netscript/singularityfunctions/upgradeHomeRam.rst b/doc/source/netscript/singularityfunctions/upgradeHomeRam.rst deleted file mode 100644 index 6088acdb0..000000000 --- a/doc/source/netscript/singularityfunctions/upgradeHomeRam.rst +++ /dev/null @@ -1,12 +0,0 @@ -upgradeHomeRam() Netscript Function -=================================== - -.. js:function:: upgradeHomeRam() - - :RAM cost: 3 GB - - If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function. - - This function will upgrade amount of RAM on the player's home computer. The cost is the same as if you were to do it manually. - - This function will return true if the player's home computer RAM is successfully upgraded, and false otherwise. diff --git a/doc/source/netscript/singularityfunctions/workForCompany.rst b/doc/source/netscript/singularityfunctions/workForCompany.rst deleted file mode 100644 index 40e5a8e26..000000000 --- a/doc/source/netscript/singularityfunctions/workForCompany.rst +++ /dev/null @@ -1,30 +0,0 @@ -workForCompany() Netscript Function -=================================== - -.. js:function:: workForCompany(companyName=lastCompany) - - :RAM cost: 3 GB - - :param string companyName: Name of company to work for. Must be an exact match. - Optional. If not specified, this argument defaults to - the last job that you worked - - If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function. - - This function will automatically set you to start working at the company at which you are employed. - If you are already in the middle of some "working" action (such as working for a faction, training at - a gym, or creating a program), then running this function will automatically cancel that action and give you your earnings. - - This function will return true if the player starts working, and false otherwise. - - Note that when you are working for a company, you will not actually receive your earnings - (reputation, money, experience) until you FINISH the action. This can be an issue if, for example, - you only want to work until you get 100,000 company reputation. One small hack to get around this is to - continuously restart the action to receive your earnings:: - - while (getCompanyRep(COMPANY HERE) < VALUE) { - workForCompany(); - sleep(60000); - } - - This way, your company reputation will be updated every minute. diff --git a/doc/source/netscript/singularityfunctions/workForFaction.rst b/doc/source/netscript/singularityfunctions/workForFaction.rst deleted file mode 100644 index b8d6dfd5b..000000000 --- a/doc/source/netscript/singularityfunctions/workForFaction.rst +++ /dev/null @@ -1,34 +0,0 @@ -workForFaction() Netscript Function -=================================== - -.. js:function:: workForFaction(factionName, workType) - - :RAM cost: 3 GB - - :param string factionName: Name of faction to work for. CASE-SENSITIVE - :param string workType: - Type of work to perform for the faction: - - * hacking/hacking contracts/hackingcontracts - * field/fieldwork/field work - * security/securitywork/security work - - If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function. - - This function will automatically set you to start working for the specified faction. - Obviously, you must be a member of the faction or else this function will fail. If you are already in - the middle of some "working" action (such as working for a company, training at a gym, or creating a program), - then running this function will automatically cancel that action and give you your earnings. - - This function will return true if you successfully start working for the specified faction, and false otherwise. - - Note that when you are working for a faction, you will not actually receive your earnings (reputation, experience) - until you FINISH the action. This can be an issue if, for example, you only want to work until you get 100,000 faction - reputation. One small hack to get around this is to continuously restart the action to receive your earnings:: - - while (getFactionRep(FACTION NAME) < VALUE) { - workForFaction(FACNAME, WORKTYPE); - sleep(60000); - } - - This way, your faction reputation will be updated every minute. diff --git a/doc/source/netscript/sleeveapi/getInformation.rst b/doc/source/netscript/sleeveapi/getInformation.rst deleted file mode 100644 index ca39034fb..000000000 --- a/doc/source/netscript/sleeveapi/getInformation.rst +++ /dev/null @@ -1,67 +0,0 @@ -getInformation() Netscript Function -======================================= - -.. js:function:: getInformation(sleeveNumber) - - :RAM cost: 4 GB - - :param int sleeveNumber: Index of the sleeve to retrieve information. See :ref:`here ` - - Return a struct containing tons of information about this sleeve - -.. code-block:: javascript - - { - city: location of the sleeve, - hp: current hp of the sleeve, - maxHp: max hp of the sleeve, - jobs: jobs available to the sleeve, - jobTitle: job titles available to the sleeve, - - mult: { - agility: agility multiplier, - agilityExp: agility exp multiplier, - companyRep: company reputation multiplier, - crimeMoney: crime money multiplier, - crimeSuccess: crime success chance multiplier, - defense: defense multiplier, - defenseExp: defense exp multiplier, - dexterity: dexterity multiplier, - dexterityExp: dexterity exp multiplier, - factionRep: faction reputation multiplier, - hacking: hacking skill multiplier, - hackingExp: hacking exp multiplier, - strength: strength multiplier, - strengthExp: strength exp multiplier, - workMoney: work money multiplier, - }, - timeWorked: time spent on the current task in milliseconds, - earningsForSleeves : { earnings synchronized to other sleeves - workHackExpGain: hacking exp gained from work, - workStrExpGain: strength exp gained from work, - workDefExpGain: defense exp gained from work, - workDexExpGain: dexterity exp gained from work, - workAgiExpGain: agility exp gained from work, - workChaExpGain: charisma exp gained from work, - workMoneyGain: money gained from work, - }, - earningsForPlayer : { earnings synchronized to the player - workHackExpGain: hacking exp gained from work, - workStrExpGain: strength exp gained from work, - workDefExpGain: defense exp gained from work, - workDexExpGain: dexterity exp gained from work, - workAgiExpGain: agility exp gained from work, - workChaExpGain: charisma exp gained from work, - workMoneyGain: money gained from work, - }, - earningsForTask : { earnings for this sleeve - workHackExpGain: hacking exp gained from work, - workStrExpGain: strength exp gained from work, - workDefExpGain: defense exp gained from work, - workDexExpGain: dexterity exp gained from work, - workAgiExpGain: agility exp gained from work, - workChaExpGain: charisma exp gained from work, - workMoneyGain: money gained from work, - }, - workRepGain: Reputation gain rate when working for factions or companies - } diff --git a/doc/source/netscript/sleeveapi/getNumSleeves.rst b/doc/source/netscript/sleeveapi/getNumSleeves.rst deleted file mode 100644 index de9153b5c..000000000 --- a/doc/source/netscript/sleeveapi/getNumSleeves.rst +++ /dev/null @@ -1,8 +0,0 @@ -getNumSleeves() Netscript Function -======================================= - -.. js:function:: getNumSleeves() - - :RAM cost: 4 GB - - Return the number of duplicate sleeves the player has. diff --git a/doc/source/netscript/sleeveapi/getSleeveAugmentations.rst b/doc/source/netscript/sleeveapi/getSleeveAugmentations.rst deleted file mode 100644 index 1bb17d366..000000000 --- a/doc/source/netscript/sleeveapi/getSleeveAugmentations.rst +++ /dev/null @@ -1,10 +0,0 @@ -getSleeveAugmentations() Netscript Function -=========================================== - -.. js:function:: getSleeveAugmentations(sleeveNumber) - - :RAM cost: 4 GB - - :param int sleeveNumber: Index of the sleeve to retrieve augmentations from. See :ref:`here ` - - Return a list of augmentation names that this sleeve has installed. diff --git a/doc/source/netscript/sleeveapi/getSleevePurchasableAugs.rst b/doc/source/netscript/sleeveapi/getSleevePurchasableAugs.rst deleted file mode 100644 index 6a0773463..000000000 --- a/doc/source/netscript/sleeveapi/getSleevePurchasableAugs.rst +++ /dev/null @@ -1,19 +0,0 @@ -getSleevePurchasableAugs() Netscript Function -============================================= - -.. js:function:: getSleevePurchasableAugs(sleeveNumber) - - :RAM cost: 4 GB - - :param int sleeveNumber: Index of the sleeve to retrieve purchasable augmentations from. See :ref:`here ` - - Return a list of augmentations that the player can buy for this sleeve. - -.. code-block:: javascript - - [ - { - name: string, // augmentation name - cost: number, // augmentation cost - } - ] diff --git a/doc/source/netscript/sleeveapi/getSleeveStats.rst b/doc/source/netscript/sleeveapi/getSleeveStats.rst deleted file mode 100644 index f51f10846..000000000 --- a/doc/source/netscript/sleeveapi/getSleeveStats.rst +++ /dev/null @@ -1,23 +0,0 @@ -getSleeveStats() Netscript Function -=================================== - -.. js:function:: getSleeveStats(sleeveNumber) - - :RAM cost: 4 GB - - :param int sleeveNumber: Index of the sleeve to get stats of. See :ref:`here ` - - Return a structure containing the stats of the sleeve - -.. code-block:: javascript - - { - shock: current shock of the sleeve [0-100], - sync: current sync of the sleeve [0-100], - hacking_skill: current hacking skill of the sleeve, - strength: current strength of the sleeve, - defense: current defense of the sleeve, - dexterity: current dexterity of the sleeve, - agility: current agility of the sleeve, - charisma: current charisma of the sleeve, - } diff --git a/doc/source/netscript/sleeveapi/getTask.rst b/doc/source/netscript/sleeveapi/getTask.rst deleted file mode 100644 index 9c5171fd8..000000000 --- a/doc/source/netscript/sleeveapi/getTask.rst +++ /dev/null @@ -1,20 +0,0 @@ -getTask() Netscript Function -======================================= - -.. js:function:: getTask(sleeveNumber) - - :RAM cost: 4 GB - - :param int sleeveNumber: Index of the sleeve to retrieve task from. See :ref:`here ` - - Return the current task that the sleeve is performing. type is set to "Idle" if the sleeve isn't doing anything - -.. code-block:: javascript - - { - task: string, // task type - crime: string, // crime currently attempting, if any - location: string, // location of the task, if any - gymStatType: string, // stat being trained at the gym, if any - factionWorkType: string, // faction work type being performed, if any - } diff --git a/doc/source/netscript/sleeveapi/purchaseSleeveAug.rst b/doc/source/netscript/sleeveapi/purchaseSleeveAug.rst deleted file mode 100644 index b52651313..000000000 --- a/doc/source/netscript/sleeveapi/purchaseSleeveAug.rst +++ /dev/null @@ -1,11 +0,0 @@ -purchaseSleeveAug() Netscript Function -======================================= - -.. js:function:: purchaseSleeveAug(sleeveNumber, augName) - - :RAM cost: 4 GB - - :param int sleeveNumber: Index of the sleeve to buy an aug for. See :ref:`here ` - :param string augName: Name of the aug to buy. Must be an exact match - - Return true if the aug was purchased and installed on the sleeve. diff --git a/doc/source/netscript/sleeveapi/setToCommitCrime.rst b/doc/source/netscript/sleeveapi/setToCommitCrime.rst deleted file mode 100644 index 871ce2140..000000000 --- a/doc/source/netscript/sleeveapi/setToCommitCrime.rst +++ /dev/null @@ -1,13 +0,0 @@ -setToCommitCrime() Netscript Function -===================================== - -.. js:function:: setToCommitCrime(sleeveNumber, name) - - :RAM cost: 4 GB - - :param int sleeveNumber: Index of the sleeve to start commiting crime. See :ref:`here ` - :param string name: Name of the crime. Must be an exact match. - - Return a boolean indicating whether or not this action was set successfully. - - Returns false if an invalid action is specified. diff --git a/doc/source/netscript/sleeveapi/setToCompanyWork.rst b/doc/source/netscript/sleeveapi/setToCompanyWork.rst deleted file mode 100644 index a865ed765..000000000 --- a/doc/source/netscript/sleeveapi/setToCompanyWork.rst +++ /dev/null @@ -1,11 +0,0 @@ -setToCompanyWork() Netscript Function -===================================== - -.. js:function:: setToCompanyWork(sleeveNumber, companyName) - - :RAM cost: 4 GB - - :param int sleeveNumber: Index of the sleeve to work for the company. See :ref:`here ` - :param string companyName: Name of the company to work for. - - Return a boolean indicating whether or not the sleeve started working or this company. diff --git a/doc/source/netscript/sleeveapi/setToFactionWork.rst b/doc/source/netscript/sleeveapi/setToFactionWork.rst deleted file mode 100644 index 628b64a79..000000000 --- a/doc/source/netscript/sleeveapi/setToFactionWork.rst +++ /dev/null @@ -1,12 +0,0 @@ -setToFactionWork() Netscript Function -===================================== - -.. js:function:: setToFactionWork(sleeveNumber, factionName, factionWorkType) - - :RAM cost: 4 GB - - :param int sleeveNumber: Index of the sleeve to work for the faction. See :ref:`here ` - :param string factionName: Name of the faction to work for. - :param string factionWorkType: Name of the action to perform for this faction. - - Return a boolean indicating whether or not the sleeve started working or this faction. diff --git a/doc/source/netscript/sleeveapi/setToGymWorkout.rst b/doc/source/netscript/sleeveapi/setToGymWorkout.rst deleted file mode 100644 index 34ecf357f..000000000 --- a/doc/source/netscript/sleeveapi/setToGymWorkout.rst +++ /dev/null @@ -1,12 +0,0 @@ -setToGymWorkout() Netscript Function -==================================== - -.. js:function:: setToGymWorkout(sleeveNumber, gymName, stat) - - :RAM cost: 4 GB - - :param int sleeveNumber: Index of the sleeve to workout at the gym. See :ref:`here ` - :param string gymName: Name of the gym. - :param string stat: Name of the stat to train. - - Return a boolean indicating whether or not the sleeve started working out. diff --git a/doc/source/netscript/sleeveapi/setToShockRecovery.rst b/doc/source/netscript/sleeveapi/setToShockRecovery.rst deleted file mode 100644 index 56d06f5fe..000000000 --- a/doc/source/netscript/sleeveapi/setToShockRecovery.rst +++ /dev/null @@ -1,10 +0,0 @@ -setToShockRecovery() Netscript Function -======================================= - -.. js:function:: setToShockRecovery(sleeveNumber) - - :RAM cost: 4 GB - - :param int sleeveNumber: Index of the sleeve to start recovery. See :ref:`here ` - - Return a boolean indicating whether or not this action was set successfully. diff --git a/doc/source/netscript/sleeveapi/setToSynchronize.rst b/doc/source/netscript/sleeveapi/setToSynchronize.rst deleted file mode 100644 index 292c7b0f7..000000000 --- a/doc/source/netscript/sleeveapi/setToSynchronize.rst +++ /dev/null @@ -1,10 +0,0 @@ -setToSynchronize() Netscript Function -===================================== - -.. js:function:: setToSynchronize(sleeveNumber) - - :RAM cost: 4 GB - - :param int sleeveNumber: Index of the sleeve to start synchronizing. See :ref:`here ` - - Return a boolean indicating whether or not this action was set successfully. diff --git a/doc/source/netscript/sleeveapi/setToUniversityCourse.rst b/doc/source/netscript/sleeveapi/setToUniversityCourse.rst deleted file mode 100644 index 7820d735a..000000000 --- a/doc/source/netscript/sleeveapi/setToUniversityCourse.rst +++ /dev/null @@ -1,12 +0,0 @@ -setToUniversityCourse() Netscript Function -========================================== - -.. js:function:: setToUniversityCourse(sleeveNumber, university, className) - - :RAM cost: 4 GB - - :param int sleeveNumber: Index of the sleeve to start taking class. See :ref:`here ` - :param string university: Name of the university to attend. - :param string className: Name of the class to follow. - - Return a boolean indicating whether or not this action was set successfully. diff --git a/doc/source/netscript/sleeveapi/travel.rst b/doc/source/netscript/sleeveapi/travel.rst deleted file mode 100644 index 8d11754ff..000000000 --- a/doc/source/netscript/sleeveapi/travel.rst +++ /dev/null @@ -1,11 +0,0 @@ -travel() Netscript Function -======================================= - -.. js:function:: travel(sleeveNumber, cityName) - - :RAM cost: 4 GB - - :param int sleeveNumber: Index of the sleeve to travel. See :ref:`here ` - :param string cityName: Name of the destination city. - - Return a boolean indicating whether or not the sleeve reached destination. diff --git a/doc/source/netscript/tixapi/buy.rst b/doc/source/netscript/tixapi/buy.rst deleted file mode 100644 index eb3706181..000000000 --- a/doc/source/netscript/tixapi/buy.rst +++ /dev/null @@ -1,17 +0,0 @@ -buy() Netscript Function -============================= - -.. js:function:: buy(sym, shares) - - :RAM cost: 2.5 GB - :param string sym: Symbol of stock to purchase - :param number shares: Number of shares to purchased. Must be positive. Will be rounded to nearest integer - - - Attempts to purchase shares of a stock using a `Market Order `_. - - If the player does not have enough money to purchase the specified number of shares, then no shares will be purchased. Remember - that every transaction on the stock exchange costs a certain commission fee. - - If this function successfully purchases the shares, it will return the stock price at which each share was purchased. Otherwise, - it will return 0. diff --git a/doc/source/netscript/tixapi/cancelOrder.rst b/doc/source/netscript/tixapi/cancelOrder.rst deleted file mode 100644 index 2271fb7c7..000000000 --- a/doc/source/netscript/tixapi/cancelOrder.rst +++ /dev/null @@ -1,24 +0,0 @@ -cancelOrder() Netscript Function -================================ - -.. js:function:: cancelOrder(sym, shares, price, type, pos) - - :RAM cost: 2.5 GB - :param string sym: Symbol of stock to player order for - :param number shares: Number of shares for order. Must be positive. Will be rounded to nearest integer - :param number price: Execution price for the order - :param string type: Type of order. It must specify "limit" or "stop", and must also specify "buy" or "sell". This is NOT - case-sensitive. Here are four examples that will work: - - * limitbuy - * limitsell - * stopbuy - * stopsell - - :param string pos: - Specifies whether the order is a "Long" or "Short" position. The Values "L" or "S" can also be used. This is - NOT case-sensitive. - - Cancels an oustanding Limit or Stop order on the stock market. - - The ability to use limit and stop orders is **not** immediately available to the player and must be unlocked later on in the game. diff --git a/doc/source/netscript/tixapi/getAskPrice.rst b/doc/source/netscript/tixapi/getAskPrice.rst deleted file mode 100644 index 651e2cb61..000000000 --- a/doc/source/netscript/tixapi/getAskPrice.rst +++ /dev/null @@ -1,13 +0,0 @@ -getAskPrice() Netscript Function -===================================== - -.. js:function:: getAskPrice(sym) - - :RAM cost: 2 GB - :param string sym: Stock symbol - - - Given a stock's symbol, returns the ask price of that stock (the symbol is a sequence - of two to four capital letters, **not** the name of the company to which that stock belongs). - - See :ref:`gameplay_stock_market_spread` for details on what the ask price is. diff --git a/doc/source/netscript/tixapi/getBidPrice.rst b/doc/source/netscript/tixapi/getBidPrice.rst deleted file mode 100644 index 11bce4c15..000000000 --- a/doc/source/netscript/tixapi/getBidPrice.rst +++ /dev/null @@ -1,13 +0,0 @@ -getBidPrice() Netscript Function -===================================== - -.. js:function:: getBidPrice(sym) - - :RAM cost: 2 GB - :param string sym: Stock symbol - - - Given a stock's symbol, returns the bid price of that stock (the symbol is a sequence - of two to four capital letters, **not** the name of the company to which that stock belongs). - - See :ref:`gameplay_stock_market_spread` for details on what the bid price is. diff --git a/doc/source/netscript/tixapi/getForecast.rst b/doc/source/netscript/tixapi/getForecast.rst deleted file mode 100644 index ae39e3b29..000000000 --- a/doc/source/netscript/tixapi/getForecast.rst +++ /dev/null @@ -1,22 +0,0 @@ -getForecast() Netscript Function -===================================== - -.. js:function:: getForecast(sym) - - :RAM cost: 2.5 GB - :param string sym: Symbol of stock - - - Returns the probability that the specified stock's price will increase - (as opposed to decrease) during the next tick. - - The probability is returned as a decimal value, NOT a percentage (e.g. if a - stock has a 60% chance of increasing, then this function will return 0.6, - NOT 60). - - In other words, if this function returned 0.30 for a stock, then this means - that the stock's price has a 30% chance of increasing and a 70% chance of - decreasing during the next tick. - - In order to use this function, you must first purchase access to the Four Sigma (4S) - Market Data TIX API. diff --git a/doc/source/netscript/tixapi/getMaxShares.rst b/doc/source/netscript/tixapi/getMaxShares.rst deleted file mode 100644 index 3e29dd49f..000000000 --- a/doc/source/netscript/tixapi/getMaxShares.rst +++ /dev/null @@ -1,12 +0,0 @@ -getMaxShares() Netscript Function -====================================== - -.. js:function:: getMaxShares(sym) - - :RAM cost: 2 GB - :param string sym: Stock symbol - - - Returns the maximum number of shares that the stock has. This is the maximum - amount of the stock that can be purchased in both the Long and Short - positions combined diff --git a/doc/source/netscript/tixapi/getOrders.rst b/doc/source/netscript/tixapi/getOrders.rst deleted file mode 100644 index 46ffd2b60..000000000 --- a/doc/source/netscript/tixapi/getOrders.rst +++ /dev/null @@ -1,72 +0,0 @@ -getOrders() Netscript Function -============================== - -.. js:function:: getOrders() - - :RAM cost: 2.5 GB - - Returns your order book for the stock market. This is an object containing information - for all the :ref:`Limit and Stop Orders ` - you have in the stock market. - - .. note:: This function isn't accessible until you have unlocked the ability to use - Limit and Stop Orders. - - The object has the following structure:: - - { - StockSymbol1: [ // Array of orders for this stock - { - shares: Order quantity - price: Order price - type: Order type - position: Either "L" or "S" for Long or Short position - }, - { - ... - }, - ... - ], - StockSymbol2: [ // Array of orders for this stock - ... - ], - ... - } - - The "Order type" property can have one of the following four values: - - * "Limit Buy Order" - * "Limit Sell Order" - * "Stop Buy Order" - * "Stop Sell Order" - - **Note that the order book will only contain information for stocks that you actually - have orders in**. For example, if you do not have orders in Nova Medical (NVMD), then the returned - object will not have a "NVMD" property. - - Example:: - - { - ECP: [ - { - shares: 5, - price: 100,000 - type: "Stop Buy Order", - position: "S", - }, - { - shares: 25, - price: 125,000 - type: "Limit Sell Order", - position: "L", - }, - ], - SYSC: [ - { - shares: 100, - price: 10,000 - type: "Limit Buy Order", - position: "L", - }, - ], - } diff --git a/doc/source/netscript/tixapi/getPosition.rst b/doc/source/netscript/tixapi/getPosition.rst deleted file mode 100644 index e046536e3..000000000 --- a/doc/source/netscript/tixapi/getPosition.rst +++ /dev/null @@ -1,28 +0,0 @@ -getPosition() Netscript Function -===================================== - -.. js:function:: getPosition(sym) - - :RAM cost: 2 GB - :param string sym: Stock symbol - - - Returns an array of four elements that represents the player's position in a stock. - - The first element is the returned array is the number of shares the player owns of the stock in the - `Long position `_. The second - element in the array is the average price of the player's shares in the Long position. - - The third element in the array is the number of shares the player owns of the stock in the - `Short position `_. The fourth - element in the array is the average price of the player's Short position. - - All elements in the returned array are numeric. - - Example:: - - pos = getPosition("ECP"); - shares = pos[0]; - avgPx = pos[1]; - sharesShort = pos[2]; - avgPxShort = pos[3]; diff --git a/doc/source/netscript/tixapi/getPrice.rst b/doc/source/netscript/tixapi/getPrice.rst deleted file mode 100644 index 7121f46ec..000000000 --- a/doc/source/netscript/tixapi/getPrice.rst +++ /dev/null @@ -1,18 +0,0 @@ -getPrice() Netscript Function -================================== - -.. js:function:: getPrice(sym) - - :RAM cost: 2 GB - :param string sym: Stock symbol - - - Given a stock's symbol, returns the price of that stock (the symbol is a sequence - of two to four capital letters, **not** the name of the company to which that stock belongs). - - .. note:: The stock's price is the average of its bid and ask price. - See :ref:`gameplay_stock_market_spread` for details on what this means. - - Example:: - - getPrice("FSIG"); diff --git a/doc/source/netscript/tixapi/getPurchaseCost.rst b/doc/source/netscript/tixapi/getPurchaseCost.rst deleted file mode 100644 index 812061567..000000000 --- a/doc/source/netscript/tixapi/getPurchaseCost.rst +++ /dev/null @@ -1,15 +0,0 @@ -getPurchaseCost() Netscript Function -========================================= - -.. js:function:: getPurchaseCost(sym, shares, posType) - - :RAM cost: 2 GB - :param string sym: Stock symbol - :param number shares: Number of shares to purchase - :param string posType: Specifies whether the order is a "Long" or "Short" position. - The values "L" or "S" can also be used. - - - Calculates and returns how much it would cost to buy a given number of - shares of a stock. This takes into account :ref:`spread ` - and commission fees. diff --git a/doc/source/netscript/tixapi/getSaleGain.rst b/doc/source/netscript/tixapi/getSaleGain.rst deleted file mode 100644 index dcc8de8e0..000000000 --- a/doc/source/netscript/tixapi/getSaleGain.rst +++ /dev/null @@ -1,15 +0,0 @@ -getSaleGain() Netscript Function -===================================== - -.. js:function:: getSaleGain(sym, shares, posType) - - :RAM cost: 2 GB - :param string sym: Stock symbol - :param number shares: Number of shares to sell - :param string posType: Specifies whether the order is a "Long" or "Short" position. - The values "L" or "S" can also be used. - - - Calculates and returns how much you would gain from selling a given number of - shares of a stock. This takes into account :ref:`spread ` - and commission fees. diff --git a/doc/source/netscript/tixapi/getSymbols.rst b/doc/source/netscript/tixapi/getSymbols.rst deleted file mode 100644 index 635e21a21..000000000 --- a/doc/source/netscript/tixapi/getSymbols.rst +++ /dev/null @@ -1,8 +0,0 @@ -getSymbols() Netscript Function() -====================================== - -.. js:function:: getSymbols() - - :RAM cost: 2 GB - - Returns an array of the symbols of the tradable stocks diff --git a/doc/source/netscript/tixapi/getVolatility.rst b/doc/source/netscript/tixapi/getVolatility.rst deleted file mode 100644 index b15602126..000000000 --- a/doc/source/netscript/tixapi/getVolatility.rst +++ /dev/null @@ -1,18 +0,0 @@ -getStockVolatility() Netscript Function -======================================= - -.. js:function:: getStockVolatility(sym) - - :RAM cost: 2.5 GB - :param string sym: Symbol of stock - - - Returns the volatility of the specified stock. - - Volatility represents the maximum percentage by which a stock's price can - change every tick. The volatility is returned as a decimal value, NOT - a percentage (e.g. if a stock has a volatility of 3%, then this function will - return 0.03, NOT 3). - - In order to use this function, you must first purchase access to the Four Sigma (4S) - Market Data TIX API. diff --git a/doc/source/netscript/tixapi/placeOrder.rst b/doc/source/netscript/tixapi/placeOrder.rst deleted file mode 100644 index 7bcda6cfe..000000000 --- a/doc/source/netscript/tixapi/placeOrder.rst +++ /dev/null @@ -1,28 +0,0 @@ -placeOrder() Netscript Function -=============================== - -.. js:function:: placeOrder(sym, shares, price, type, pos) - - :RAM cost: 2.5 GB - :param string sym: Symbol of stock to player order for - :param number shares: Number of shares for order. Must be positive. Will be rounded to nearest integer - :param number price: Execution price for the order - :param string type: Type of order. It must specify "limit" or "stop", and must also specify "buy" or "sell". This is NOT - case-sensitive. Here are four examples that will work: - - * limitbuy - * limitsell - * stopbuy - * stopsell - - :param string pos: - Specifies whether the order is a "Long" or "Short" position. The Values "L" or "S" can also be used. This is - NOT case-sensitive. - - Places an order on the stock market. This function only works - for :ref:`Limit and Stop Orders `. - - Returns true if the order is successfully placed, and false otherwise. - - .. note:: The ability to place limit and stop orders is **not** immediately available to - the player and must be unlocked later on in the game. diff --git a/doc/source/netscript/tixapi/purchase4SMarketData.rst b/doc/source/netscript/tixapi/purchase4SMarketData.rst deleted file mode 100644 index 841cb4517..000000000 --- a/doc/source/netscript/tixapi/purchase4SMarketData.rst +++ /dev/null @@ -1,11 +0,0 @@ -purchase4SMarketData() Netscript Function -========================================= - -.. js:function:: purchase4SMarketData() - - :RAM cost: 2.5 GB - - Purchase 4S Market Data Access. - - Returns true if you successfully purchased it or if you already have access. - Returns false otherwise. diff --git a/doc/source/netscript/tixapi/purchase4SMarketDataTixApi.rst b/doc/source/netscript/tixapi/purchase4SMarketDataTixApi.rst deleted file mode 100644 index 119988f05..000000000 --- a/doc/source/netscript/tixapi/purchase4SMarketDataTixApi.rst +++ /dev/null @@ -1,11 +0,0 @@ -purchase4SMarketDataTixApi() Netscript Function -=============================================== - -.. js:function:: purchase4SMarketDataTixApi() - - :RAM cost: 2.5 GB - - Purchase 4S Market Data TIX API Access. - - Returns true if you successfully purchased it or if you already have access. - Returns false otherwise. diff --git a/doc/source/netscript/tixapi/sell.rst b/doc/source/netscript/tixapi/sell.rst deleted file mode 100644 index 5bace94d6..000000000 --- a/doc/source/netscript/tixapi/sell.rst +++ /dev/null @@ -1,21 +0,0 @@ -sell() Netscript Function -============================== - -.. js:function:: sell(sym, shares) - - :RAM cost: 2.5 GB - :param string sym: Symbol of stock to sell - :param number shares: Number of shares to sell. Must be positive. Will be rounded to nearest integer - - - Attempts to sell shares of a stock using a `Market Order `_. - - If the specified number of shares in the function exceeds the amount that the player actually owns, then this function will - sell all owned shares. Remember that every transaction on the stock exchange costs a certain commission fee. - - The net profit made from selling stocks with this function is reflected in the script's statistics. - This net profit is calculated as:: - - shares * (sell price - average price of purchased shares) - - If the sale is successful, this function will return the stock price at which each share was sold. Otherwise, it will return 0. diff --git a/doc/source/netscript/tixapi/sellShort.rst b/doc/source/netscript/tixapi/sellShort.rst deleted file mode 100644 index ca339f235..000000000 --- a/doc/source/netscript/tixapi/sellShort.rst +++ /dev/null @@ -1,19 +0,0 @@ -sellShort() Netscript Function -============================== - -.. js:function:: sellShort(sym, shares) - - :RAM cost: 2.5 GB - :param string sym: Symbol of stock to sell - :param number shares: Number of shares to sell. Must be positive. Will be rounded to nearest integer - - - Attempts to sell a `short `_ position of a stock - using a `Market Order `_. - - The ability to short a stock is **not** immediately available to the player and must be unlocked later on in the game. - - If the specified number of shares exceeds the amount that the player actually owns, then this function will sell all owned - shares. Remember that every transaction on the stock exchange costs a certain commission fee. - - If the sale is successful, this function will return the stock price at which each share was sold. Otherwise it will return 0. diff --git a/doc/source/netscript/tixapi/short.rst b/doc/source/netscript/tixapi/short.rst deleted file mode 100644 index fc5d72b86..000000000 --- a/doc/source/netscript/tixapi/short.rst +++ /dev/null @@ -1,19 +0,0 @@ -short() Netscript Function -=============================== - -.. js:function:: short(sym, shares) - - :RAM cost: 2.5 GB - :param string sym: Symbol of stock to short - :param number shares: Number of shares to short. Must be positive. Will be rounded to nearest integer - - - Attempts to purchase a `short `_ position of a stock - using a `Market Order `_. - - The ability to short a stock is **not** immediately available to the player and must be unlocked later on in the game. - - If the player does not have enough money to purchase the specified number of shares, then no shares will be purchased. - Remember that every transaction on the stock exchange costs a certain commission fee. - - If the purchase is successful, this function will return the stock price at which each share was purchased. Otherwise, it will return 0. diff --git a/doc/source/shortcuts.rst b/doc/source/shortcuts.rst index 80f690f5e..492f0d867 100644 --- a/doc/source/shortcuts.rst +++ b/doc/source/shortcuts.rst @@ -35,10 +35,6 @@ Alt + g Switch to 'Gang' page Alt + b Switch to 'Bladeburner' page ========== =========================================================================== -Script Editor -------------- -See the :ref:`Script Editor ` documentation for more details. - Terminal Shortcuts ------------------ These shortcuts are available only in the :ref:`terminal` diff --git a/src/Constants.ts b/src/Constants.ts index 2af547a2a..64582fa37 100644 --- a/src/Constants.ts +++ b/src/Constants.ts @@ -115,8 +115,8 @@ export const CONSTANTS: { TotalNumBitNodes: number; LatestUpdate: string; } = { - VersionString: "1.0.0", - VersionNumber: 3, + VersionString: "1.0.1", + VersionNumber: 4, // Speed (in ms) at which the main loop is updated _idleSpeed: 200, @@ -283,11 +283,55 @@ export const CONSTANTS: { TotalNumBitNodes: 24, LatestUpdate: ` - v1.0.0 - 2021-11-10 Breaking the API :( - ----------------------------- + v1.0.1 - 2021-11-17 New documentation (hydroflame) + -------------------------------------------------- - This update is very important. Please see the patch notes at - https://bitburner.readthedocs.io/en/latest/changelog.html + ** Documentation ** + * The new documentation for the netscript API is available at + https://github.com/danielyxie/bitburner/blob/dev/markdown/bitburner.ns.md + This documentation is used in-game to validate the code, in-editor to autocomplete, and + for users to reference. This is a huge quality of life improvements for me. + + ** Reputation ** + + * Fixed favor not affecting faction work reputation gain (Yeah, I know right?) + + ** Hacknet ** + + * Servers are now considerd "purchasedByPlayers" + + ** Script Editor ** + + * solarized themes now work. + + ** Corporation ** + + * Dividends are now much more taxed. + * The 2 upgrades that reduced taxes are now much stronger. + + ** Misc. ** + + * Starting / Stopping scripts on hashnet servers immediately updates their hash rate (instead of on the next tick) + * Hacknet has tooltip showing what the result of the upgrade would be. + * Augmentations page displayes current price multiplier as well as explains the mechanic. + * Terminal now is 25x stronger. + * Tail boxes use pre-wrap for it's lines. + * Tail boxes allow you to rerun dead scripts. + * Tail boxes can no longer open the same one twice. + * Terminal now autocompletes through aliases. + * Make alter reality harder. + * Fix bladeburner cancelling actions when manually starting anything with Simulacrum. + * Buying hash upgrade to increase uni class or gym training will apply to current class. + * Internally the game no longer uses the decimal library. + * Fix an issue where 'download *' would generate weird windows files. + * Timestamps can be set to any format in the options. + * Fix typo in documentation share popup. + * Remove bunch of debug log. + * Fix typo in corporation handbook literature. + * Fix typo in documentation + * Fix duplicate SF -1 exploit. (Yeah, an exploit of exploits, now were meta) + * Fix offline hacking earning being attributed to hacknet. + * nerf noodle bar `, }; diff --git a/src/SaveObject.tsx b/src/SaveObject.tsx index f216525dc..88250e0f1 100755 --- a/src/SaveObject.tsx +++ b/src/SaveObject.tsx @@ -316,8 +316,6 @@ function loadGame(saveString: string): boolean { createBetaUpdateText(); } else if (ver !== CONSTANTS.VersionNumber) { createNewUpdateText(); - createNewUpdateText(); - createNewUpdateText(); } } catch (e) { createNewUpdateText(); @@ -325,10 +323,6 @@ function loadGame(saveString: string): boolean { } else { createNewUpdateText(); } - - createNewUpdateText(); - createNewUpdateText(); - createNewUpdateText(); return true; } diff --git a/src/ScriptEditor/ui/ScriptEditorRoot.tsx b/src/ScriptEditor/ui/ScriptEditorRoot.tsx index f71defd19..25defee39 100644 --- a/src/ScriptEditor/ui/ScriptEditorRoot.tsx +++ b/src/ScriptEditor/ui/ScriptEditorRoot.tsx @@ -405,9 +405,17 @@ export function Root(props: IProps): React.ReactElement { {ram} - - Netscript Documentation - + + {" "} + Documentation:{" "} + + Basic + {" "} + | + + Full + +