diff --git a/css/menupages.css b/css/menupages.css
index 12f948013..0fc5c0adb 100644
--- a/css/menupages.css
+++ b/css/menupages.css
@@ -607,21 +607,7 @@ div.faction-clear {
.stock-market-position-text {
color:white;
- white-space: pre;
- display:block;
-}
-
-.stock-market-buy-sell-button {
- color: #aaa;
- font-size: 16px;
- font-weight: bold;
-}
-
-.stock-market-buy-sell-button:hover,
-.stock-market-buy-sell-button:focus {
- color: var(--my-font-color);
- text-decoration: none;
- cursor: pointer;
+ display:inline-block;
}
.stock-market-order-list {
@@ -629,6 +615,14 @@ div.faction-clear {
max-height: 100px;
}
+.stock-market-order-cancel-btn {
+ background-color: black;
+ border: 1px solid white;
+ color: var(--my-font-color);
+ margin: 2px;
+ padding: 0px;
+}
+
/* Gang */
#gang-container {
position: fixed;
diff --git a/css/styles.css b/css/styles.css
index 4eabfe0c0..c93a5c088 100644
--- a/css/styles.css
+++ b/css/styles.css
@@ -445,7 +445,8 @@ a:link, a:visited {
margin-left: 5%;
display: none;
background-color: #555;
- overflow:auto;
+ overflow-y:auto;
+ overflow-x:none;
}
.accordion-panel div,
diff --git a/dist/bundle.js b/dist/bundle.js
index c56157077..883339f9f 100644
--- a/dist/bundle.js
+++ b/dist/bundle.js
@@ -455,6 +455,13 @@ PlayerObject.prototype.prestigeSourceFile = function() {
this.hasWseAccount = false;
this.hasTixApiAccess = false;
+ //BitNode 8: Ghost of Wall Street
+ if (this.bitNodeN === 8) {this.money = new __WEBPACK_IMPORTED_MODULE_14__utils_decimal_js___default.a(100000000);}
+ if (this.bitNodeN === 8 || __WEBPACK_IMPORTED_MODULE_10__NetscriptFunctions_js__["d" /* hasWallStreetSF */]) {
+ this.hasWseAccount = true;
+ this.hasTixApiAccess = true;
+ }
+
this.playtimeSinceLastAug = 0;
this.scriptProdSinceLastAug = 0;
}
@@ -2563,7 +2570,7 @@ function powerOfTwo(n) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CONSTANTS; });
let CONSTANTS = {
- Version: "0.31.0",
+ Version: "0.32.0",
//Max level for any skill, assuming no multipliers. Determined by max numerical value in javascript for experience
//and the skill level formula in Player.js. Note that all this means it that when experience hits MAX_INT, then
@@ -3004,18 +3011,18 @@ let CONSTANTS = {
" Functions
" +
"You can NOT define you own functions in Netscript (yet), but there are several built in functions that " +
"you may use:
" +
- "hack(hostname/ip)
Core function that is used to try and hack servers to steal money and gain hacking experience. The argument passed in must be a string with " +
+ "hack(hostname/ip)
Core function that is used to try and hack servers to steal money and gain hacking experience. The argument passed in must be a string with " +
"either the IP or hostname of the server you want to hack. The runtime for this command depends on your hacking level and the target server's security level. " +
" A script can hack a server from anywhere. It does not need to be running on the same server to hack that server. " +
"For example, you can create a script that hacks the 'foodnstuff' server and run that script on any server in the game. A successful hack() on " +
"a server will raise that server's security level by 0.002. Returns true if the hack is successful and " +
"false otherwise.
" +
"Examples: hack('foodnstuff'); or hack('148.192.0.12');
" +
- "sleep(n, log=true)
Suspends the script for n milliseconds. The second argument is an optional boolean that indicates " +
+ "sleep(n, log=true)
Suspends the script for n milliseconds. The second argument is an optional boolean that indicates " +
"whether or not the function should log the sleep action. If this argument is true, then calling this function will write " +
"'Sleeping for N milliseconds' to the script's logs. If it's false, then this function will not log anything. " +
"If this argument is not specified then it will be true by default.
Example: sleep(5000);
" +
- "grow(hostname/ip)
Use your hacking skills to increase the amount of money available on a server. The argument passed in " +
+ "grow(hostname/ip)
Use your hacking skills to increase the amount of money available on a server. The argument passed in " +
"must be a string with either the IP or hostname of the target server. The runtime for this command depends on your hacking level and the target server's security level. " +
"When grow() completes, the money available on a target server will be increased by a certain, fixed percentage. This percentage " +
"is determined by the server's growth rate and varies between servers. Generally, higher-level servers have higher growth rates.
" +
@@ -3024,28 +3031,28 @@ let CONSTANTS = {
"It also raises the security level of the target server by 0.004. " +
"Returns the number by which the money on the server was multiplied for the growth. " +
"Works offline at a slower rate.
Example: grow('foodnstuff');
" +
- "weaken(hostname/ip)
Use your hacking skills to attack a server's security, lowering the server's security level. The argument passed " +
+ "weaken(hostname/ip)
Use your hacking skills to attack a server's security, lowering the server's security level. The argument passed " +
"in must be a string with either the IP or hostname of the target server. The runtime for this command depends on your " +
"hacking level and the target server's security level. This function lowers the security level of the target server by " +
"0.05.
Like hack() and grow(), weaken() can be called on " +
"any server, regardless of where the script is running. This command requires root access to the target server, but " +
"there is no required hacking level to run the command. Returns " +
"0.1. Works offline at a slower rate
Example: weaken('foodnstuff');
" +
- "print(x)
Prints a value or a variable to the scripts logs (which can be viewed with the 'tail [script]' terminal command ).
" +
- "tprint(x)
Prints a value or a variable to the Terminal
" +
- "clearLog()
Clears the script's logs.
" +
- "scan(hostname/ip, [hostnames=true])
Returns an array containing the hostnames or IPs of all servers that are one node away from the specified server. " +
+ "print(x)
Prints a value or a variable to the scripts logs (which can be viewed with the 'tail [script]' terminal command ).
" +
+ "tprint(x)
Prints a value or a variable to the Terminal
" +
+ "clearLog()
Clears the script's logs.
" +
+ "scan(hostname/ip, [hostnames=true])
Returns an array containing the hostnames or IPs of all servers that are one node away from the specified server. " +
"The argument must be a string containing the IP or hostname of the target server. The second argument is a boolean that specifies whether " +
"the hostnames or IPs of the scanned servers should be output. If it is true then hostnames will be returned, and if false then IP addresses will. " +
"This second argument is optional and, if ommitted, the function will output " +
"the hostnames of the scanned servers. The hostnames/IPs in the returned array are strings.
" +
- "nuke(hostname/ip)
Run NUKE.exe on the target server. NUKE.exe must exist on your home computer.
Example: nuke('foodnstuff');
" +
- "brutessh(hostname/ip)
Run BruteSSH.exe on the target server. BruteSSH.exe must exist on your home computer.
Example: brutessh('foodnstuff');
" +
- "ftpcrack(hostname/ip)
Run FTPCrack.exe on the target server. FTPCrack.exe must exist on your home computer.
Example: ftpcrack('foodnstuff');
" +
- "relaysmtp(hostname/ip)
Run relaySMTP.exe on the target server. relaySMTP.exe must exist on your home computer.
Example: relaysmtp('foodnstuff');
" +
- "httpworm(hostname/ip)
Run HTTPWorm.exe on the target server. HTTPWorm.exe must exist on your home computer.
Example: httpworm('foodnstuff');
" +
- "sqlinject(hostname/ip)
Run SQLInject.exe on the target server. SQLInject.exe must exist on your home computer.
Example: sqlinject('foodnstuff');
" +
- "run(script, [numThreads], [args...])
Run a script as a separate process. The first argument that is passed in is the name of the script as a string. This function can only " +
+ "nuke(hostname/ip)
Run NUKE.exe on the target server. NUKE.exe must exist on your home computer.
Example: nuke('foodnstuff');
" +
+ "brutessh(hostname/ip)
Run BruteSSH.exe on the target server. BruteSSH.exe must exist on your home computer.
Example: brutessh('foodnstuff');
" +
+ "ftpcrack(hostname/ip)
Run FTPCrack.exe on the target server. FTPCrack.exe must exist on your home computer.
Example: ftpcrack('foodnstuff');
" +
+ "relaysmtp(hostname/ip)
Run relaySMTP.exe on the target server. relaySMTP.exe must exist on your home computer.
Example: relaysmtp('foodnstuff');
" +
+ "httpworm(hostname/ip)
Run HTTPWorm.exe on the target server. HTTPWorm.exe must exist on your home computer.
Example: httpworm('foodnstuff');
" +
+ "sqlinject(hostname/ip)
Run SQLInject.exe on the target server. SQLInject.exe must exist on your home computer.
Example: sqlinject('foodnstuff');
" +
+ "run(script, [numThreads], [args...])
Run a script as a separate process. The first argument that is passed in is the name of the script as a string. This function can only " +
"be used to run scripts located on the current server (the server running the script that calls this function). The second argument " +
"is optional, and it specifies how many threads to run the script with. This argument must be a number greater than 0. If it is omitted, then the script will be run single-threaded. Any additional arguments will specify " +
"arguments to pass into the new script that is being run. If arguments are specified for the new script, then the second argument numThreads argument must be filled in with a value.
" +
@@ -3057,7 +3064,7 @@ let CONSTANTS = {
"run('foo.script', 5);
" +
"The following example will run 'foo.script' single-threaded, and will pass the string 'foodnstuff' into the script as an argument:
" +
"run('foo.script', 1, 'foodnstuff');
" +
- "exec(script, hostname/ip, [numThreads], [args...])
Run a script as a separate process on another server. The first argument is the name of the script as a string. The " +
+ "exec(script, hostname/ip, [numThreads], [args...])
Run a script as a separate process on another server. The first argument is the name of the script as a string. The " +
"second argument is a string with the hostname or IP of the 'target server' on which to run the script. The specified script must exist on the target server. " +
"The third argument is optional, and it specifies how many threads to run the script with. If it is omitted, then the script will be run single-threaded. " +
"This argument must be a number that is greater than 0. Any additional arguments will specify arguments to pass into the new script that is being run. If " +
@@ -3071,7 +3078,7 @@ let CONSTANTS = {
"The following example will try to run the script 'foo.script' on the 'foodnstuff' server with 5 threads. It will also pass the number 1 and the string 'test' in as arguments " +
"to the script.
" +
"exec('foo.script', 'foodnstuff', 5, 1, 'test');
" +
- "kill(script, hostname/ip, [args...])
Kills the script on the target server specified by the script's name and arguments. Remember that " +
+ "kill(script, hostname/ip, [args...])
Kills the script on the target server specified by the script's name and arguments. Remember that " +
"scripts are uniquely identified by both their name and arguments. For example, if 'foo.script' is run with the argument 1, then this is not the " +
"same as 'foo.script' run with the argument 2, even though they have the same code.
" +
"The first argument must be a string with the name of the script. The name is case-sensitive. " +
@@ -3086,9 +3093,9 @@ let CONSTANTS = {
"kill('foo.script', getHostname());
" +
"If you are trying to kill a script named 'foo.script' on the current server that was ran with the arguments 1 and 'foodnstuff', use this:
" +
"kill('foo.script', getHostname(), 1, 'foodnstuff');
" +
- "killall(hostname/ip)
Kills all running scripts on the specified server. This function takes a single argument which " +
+ "killall(hostname/ip)
Kills all running scripts on the specified server. This function takes a single argument which " +
"must be a string containing the hostname or IP of the target server. This function will always return true.
" +
- "scp(script, [source], destination)
Copies a script or literature (.lit) file to another server. The first argument is a string with " +
+ "scp(script, [source], destination)
Copies a script or literature (.lit) file to another server. The first argument is a string with " +
"the filename of the script or literature file " +
"to be copied, or an array of filenames to be copied. The next two arguments are strings containing the hostname/IPs of the source and target server. " +
"The source refers to the server from which the script/literature file will be copied, while the destination " +
@@ -3098,15 +3105,15 @@ let CONSTANTS = {
"will return if at least one of the files in the array is successfully copied over.
" +
"Example: scp('hack-template.script', 'foodnstuff'); //Copies hack-template.script from the current server to foodnstuff
" +
"Example: scp('foo.lit', 'helios', 'home'); //Copies foo.lit from the helios server to the home computer
" +
- "ls(hostname/ip)
Returns an array containing the names of all files on the specified server. The argument must be a " +
+ "ls(hostname/ip)
Returns an array containing the names of all files on the specified server. The argument must be a " +
"string with the hostname or IP of the target server.
" +
- "hasRootAccess(hostname/ip)
Returns a boolean (true or false) indicating whether or not the Player has root access to a server. " +
+ "hasRootAccess(hostname/ip)
Returns a boolean (true or false) indicating whether or not the Player has root access to a server. " +
"The argument passed in must be a string with either the hostname or IP of the target server.
" +
"Example:
if (hasRootAccess('foodnstuff') == false) {
nuke('foodnstuff');
}
" +
- "getIp()
Returns a string with the IP Address of the server that the script is running on
" +
- "getHostname()
Returns a string with the hostname of the server that the script is running on
" +
- "getHackingLevel()
Returns the Player's current hacking level.
" +
- "getHackingMultipliers()
Returns an object containing the Player's hacking related multipliers. " +
+ "getIp()
Returns a string with the IP Address of the server that the script is running on
" +
+ "getHostname()
Returns a string with the hostname of the server that the script is running on
" +
+ "getHackingLevel()
Returns the Player's current hacking level.
" +
+ "getHackingMultipliers()
Returns an object containing the Player's hacking related multipliers. " +
"These multipliers are returned in integer forms, not percentages (e.g. 1.5 instead of 150%). " +
"The object has the following structure:
" +
"{
" +
@@ -3118,7 +3125,7 @@ let CONSTANTS = {
"mults = getHackingMultipliers();
" +
"print(mults.chance);
" +
"print(mults.growth);
" +
- "getBitNodeMultipliers()
Returns an object containing the current BitNode multipliers. " +
+ "getBitNodeMultipliers()
Returns an object containing the current BitNode multipliers. " +
"This function requires Source-File 5 in order to run. The multipliers are returned in integer forms, not percentages " +
"(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 " +
@@ -3148,33 +3155,33 @@ let CONSTANTS = {
"mults = getBitNodeMultipliers();
" +
"print(mults.ServerMaxMoney);
" +
"print(mults.HackExpGain);
" +
- "getServerMoneyAvailable(hostname/ip)
Returns the amount of money available on a server. The argument passed in must be a string with either the " +
+ "getServerMoneyAvailable(hostname/ip)
Returns the amount of money available on a server. The argument passed in must be a string with either the " +
"hostname or IP of the target server.
Example: getServerMoneyAvailable('foodnstuff');
" +
- "getServerMaxMoney(hostname/ip)
Returns the maximum amount of money that can be available on a server. The argument passed in must be a string with " +
+ "getServerMaxMoney(hostname/ip)
Returns the maximum amount of money that can be available on a server. The argument passed in must be a string with " +
"the hostname or IP of the target server.
Example: getServerMaxMoney('foodnstuff');
" +
- "getServerGrowth(hostname/ip)
Returns the server's intrinsic 'growth parameter'. This growth parameter is a number " +
+ "getServerGrowth(hostname/ip)
Returns the server's intrinsic 'growth parameter'. This growth parameter is a number " +
"between 1 and 100 that represents how quickly the server's money grows. This parameter affects the percentage by which this server's " +
"money is increased when using the grow() function. A higher growth parameter will result in a higher percentage from grow().
" +
"The argument passed in must be a string with the hostname or IP of the target server.
" +
- "getServerSecurityLevel(hostname/ip)
Returns the security level of a server. The argument passed in must be a string with either the " +
+ "getServerSecurityLevel(hostname/ip)
Returns the security level of a server. The argument passed in must be a string with either the " +
"hostname or IP of the target server. A server's security is denoted by a number, typically between 1 and 100.
" +
- "getServerBaseSecurityLevel(hostname/ip)
Returns the base security level of a server. This is the security level that the server starts out with. " +
+ "getServerBaseSecurityLevel(hostname/ip)
Returns the base security level of a server. This is the security level that the server starts out with. " +
"This is different than getServerSecurityLevel() because getServerSecurityLevel() returns the current security level of a server, which can constantly change " +
"due to hack(), grow(), and weaken() calls on that server. The base security level will stay the same until you reset by installing an Augmentation.
" +
"The argument passed in must be a string with either the hostname or IP of the target server. A server's base security is denoted by a number, typically between 1 and 100. " +
"
" +
- "getServerMinSecurityLevel(hostname/ip)Returns the minimum security level of a server. The argument passed in must be a string with " +
+ "getServerMinSecurityLevel(hostname/ip)Returns the minimum security level of a server. The argument passed in must be a string with " +
"either the hostname or IP of the target server.
" +
- "getServerRequiredHackingLevel(hostname/ip)
Returns the required hacking level of a server. The argument passed in must be a string with either the " +
+ "getServerRequiredHackingLevel(hostname/ip)
Returns the required hacking level of a server. The argument passed in must be a string with either the " +
"hostname or IP or the target server.
" +
- "getServerNumPortsRequired(hostname/ip)
Returns the number of open ports required to successfully run NUKE.exe on a server. The argument " +
+ "getServerNumPortsRequired(hostname/ip)
Returns the number of open ports required to successfully run NUKE.exe on a server. The argument " +
"passed in must be a string with either the hostname or IP of the target server.
" +
- "getServerRam(hostname/ip)
Returns an array with two elements that gives information about the target server's RAM. The first " +
+ "getServerRam(hostname/ip)
Returns an array with two elements that gives information about the target server's RAM. The first " +
"element in the array is the amount of RAM that the server has (in GB). The second element in the array is the amount of RAM that " +
"is currently being used on the server.
" +
- "serverExists(hostname/ip)
Returns a boolean denoting whether or not the specified server exists. The argument " +
+ "serverExists(hostname/ip)
Returns a boolean denoting whether or not the specified server exists. The argument " +
"must be a string with the hostname or IP of the target server.
" +
- "fileExists(filename, [hostname/ip])
Returns a boolean (true or false) indicating whether the specified file exists on a server. " +
+ "fileExists(filename, [hostname/ip])
Returns a boolean (true or false) indicating whether the specified file exists on a server. " +
"The first argument must be a string with the name of the file. A file can either be a script, program, or literature file. A script name is case-sensitive, but a " +
"program/literature file is not. For example, fileExists('brutessh.exe') will work fine, even though the actual program is named BruteSSH.exe.
" +
"The second argument is a string with the hostname or IP of the server on which to search for the program. This second argument is optional. " +
@@ -3183,7 +3190,7 @@ let CONSTANTS = {
"Example: fileExists('ftpcrack.exe');
" +
"The first example above will return true if the script named 'foo.script' exists on the 'foodnstuff' server, and false otherwise. The second example above will " +
"return true if the current server (the server on which this function runs) contains the FTPCrack.exe program, and false otherwise.
" +
- "isRunning(filename, hostname/ip, [args...])
Returns a boolean (true or false) indicating whether the specified script is running on a server. " +
+ "isRunning(filename, hostname/ip, [args...])
Returns a boolean (true or false) indicating whether the specified script is running on a server. " +
"Remember that a script is uniquely identified by both its name and its arguments.
" +
"The first argument must be a string with the name of the script. The script name is case sensitive. The second argument is a string with the " +
"hostname or IP of the target server. Any additional arguments passed to the function will specify the arguments passed into the target script. " +
@@ -3195,45 +3202,45 @@ let CONSTANTS = {
"example above will return true if there is a script named 'foo.script' with no arguments running on the current server, and false otherwise. " +
"The third example above will return true if there is a script named 'foo.script' with the arguments 1, 5, and 'test' running on the 'joesguns' server, and " +
"false otherwise.
" +
- "getNextHacknetNodeCost()
Returns the cost of purchasing a new Hacknet Node
" +
- "purchaseHacknetNode()
Purchases a new Hacknet Node. Returns a number with the index of the Hacknet Node. This index is equivalent to the number " +
+ "getNextHacknetNodeCost()
Returns the cost of purchasing a new Hacknet Node
" +
+ "purchaseHacknetNode()
Purchases a new Hacknet Node. Returns a number with the index of the Hacknet Node. This index is equivalent to the number " +
"at the end of the Hacknet Node's name (e.g The Hacknet Node named 'hacknet-node-4' will have an index of 4). If the player cannot afford to purchase " +
"a new Hacknet Node then the function will return false. Does NOT work offline
" +
- "purchaseServer(hostname, ram)
Purchases a server with the specified hostname and amount of RAM. The first argument can be any data type, " +
+ "purchaseServer(hostname, ram)
Purchases a server with the specified hostname and amount of RAM. The first argument can be any data type, " +
"but it will be converted to a string using Javascript's String function. Anything that resolves to an empty string will cause the function to fail. " +
"The second argument specified the amount of RAM (in GB) for the server. This argument must resolve to a numeric and it must be a power of 2 " +
"(2, 4, 8, etc...).
" +
"This function returns the hostname of the newly purchased server as a string. If the function fails to purchase a server, then it will return " +
"an empty string. The function will fail if the arguments passed in are invalid or if the player does not have enough money to purchase the specified server.
" +
- "deleteServer(hostname)
Deletes one of the servers you've purchased with the specified hostname. The function will fail if " +
+ "deleteServer(hostname)
Deletes one of the servers you've purchased with the specified hostname. The function will fail if " +
"there are any scripts running on the specified server. Returns true if successful and false otherwise
" +
- "getPurchasedServers([hostname=true])
Returns an array with either the hostname or IPs of all of the servers you " +
+ "getPurchasedServers([hostname=true])
Returns an array with either the hostname or IPs of all of the servers you " +
"have purchased. It takes an optional parameter specifying whether the hostname or IP addresses will be returned. If this " +
"parameter is not specified, it is true by default and hostnames will be returned
" +
- "round(n)
Rounds the number n to the nearest integer. If the argument passed in is not a number, then the function will return 0.
" +
- "write(port, data)
Writes data to a port. The first argument must be a number between 1 and 10 that specifies the port. The second " +
+ "round(n)
Rounds the number n to the nearest integer. If the argument passed in is not a number, then the function will return 0.
" +
+ "write(port, data)
Writes data to a port. The first argument must be a number between 1 and 10 that specifies the port. The second " +
"argument defines the data to write to the port. If the second argument is not specified then it will write an empty string to the port.
" +
- "read(port)
Reads data from a port. The first argument must be a number between 1 and 10 that specifies the port. A port is a serialized queue. " +
+ "read(port)
Reads data from a port. The first argument must be a number between 1 and 10 that specifies the port. A port is a serialized queue. " +
"This function will remove the first element from the queue and return it. If the queue is empty, then the string 'NULL PORT DATA' will be returned.
" +
- "scriptRunning(scriptname, hostname/ip)
Returns a boolean indicating whether any instance of the specified script is running " +
+ "scriptRunning(scriptname, hostname/ip)
Returns a boolean indicating whether any instance of the specified script is running " +
"on a server, regardless of its arguments. This is different than the isRunning() function because it does not " +
"try to identify a specific instance of a running script by its arguments.
" +
"The first argument must be a string with the name of the script. The script name is case sensitive. The second argument is " +
"a string with the hostname or IP of the target server. Both arguments are required.
" +
- "scriptKill(scriptname, hostname/ip)
Kills all scripts with the specified filename that are running on the server specified by the " +
+ "scriptKill(scriptname, hostname/ip)
Kills all scripts with the specified filename that are running on the server specified by the " +
"hostname/ip, regardless of arguments. Returns true if one or more scripts were successfully killed, and false if there were none.
" +
"The first argument must be a string with the name of the script. The script name is case sensitive. The second argument is " +
"a string with the hostname or IP of the target server. Both arguments are required.
" +
- "getScriptRam(scriptname, hostname/ip)
Returns the amount of RAM required to run the specified script on the " +
+ "getScriptRam(scriptname, hostname/ip)
Returns the amount of RAM required to run the specified script on the " +
"target server. The first argument must be a string with the name of the script. The script name is case sensitive. " +
"The second argument is a string with the hostname or IP of the server where that script is. Both arguments are required.
" +
- "getHackTime(hostname/ip)
Returns the amount of time in seconds it takes to execute the hack() Netscript function " +
+ "getHackTime(hostname/ip)
Returns the amount of time in seconds it takes to execute the hack() Netscript function " +
"on the server specified by the hostname/ip. The argument must be a string with the hostname/ip of the target server.
" +
- "getGrowTime(hostname/ip)
Returns the amount of time in seconds it takes to execute the grow() Netscript function " +
+ "getGrowTime(hostname/ip)
Returns the amount of time in seconds it takes to execute the grow() Netscript function " +
"on the server specified by the hostname/ip. The argument must be a string with the hostname/ip of the target server.
" +
- "getWeakenTime(hostname/ip)
Returns the amount of time in seconds it takes to execute the weaken() Netscript function " +
+ "getWeakenTime(hostname/ip)
Returns the amount of time in seconds it takes to execute the weaken() Netscript function " +
"on the server specified by the hostname/ip. The argument must be a string with the hostname/ip of the target server.
" +
- "getScriptIncome([scriptname], [hostname/ip], [args...])
" +
+ "getScriptIncome([scriptname], [hostname/ip], [args...])
" +
"Returns the amount of income the specified script generates while online (when the game is open, does not apply for " +
"offline income). This function can also be called with no arguments. If called with no arguments, then this function " +
"will return an array of two values. The first value is the total income ($/sec) of all of your active scripts (currently running). " +
@@ -3245,7 +3252,7 @@ let CONSTANTS = {
"The second argument must be a string with the hostname/IP of the target server. If the first argument is specified " +
"then the second argument must be specified as well. Any additional arguments passed to the function will specify " +
"the arguments passed into the target script.
" +
- "getScriptExpGain([scriptname], [hostname/ip], [args...])
" +
+ "getScriptExpGain([scriptname], [hostname/ip], [args...])
" +
"Returns the amount of hacking experience the specified script generates while online (when the game is open, does not apply for " +
"offline experience gains). This function can also return the total experience gain rate of all of your active scripts by running the function " +
"with no arguments.
" +
@@ -3256,26 +3263,28 @@ let CONSTANTS = {
"The second argument must be a string with the hostname/IP of the target server. If the first argument is specified " +
"then the second argument must be specified as well. Any additional arguments passed to the function will specify " +
"the arguments passed into the target script.
" +
- "getTimeSinceLastAug()
" +
+ "getTimeSinceLastAug()
" +
"Returns the amount of time in milliseconds that have passed since you last installed Augmentations (or destroyed a BitNode).
" +
+ "sprintf()/vsprintf()
" +
+ "See this link for details
" +
"Hacknet Nodes API
" +
"Netscript provides the following API for accessing and upgrading your Hacknet Nodes through scripts. This API does NOT work offline.
" +
- "hacknetnodes
A special variable. This is an array that maps to the Player's Hacknet Nodes. The Hacknet Nodes are accessed through " +
+ "hacknetnodes
A special variable. This is an array that maps to the Player's Hacknet Nodes. The Hacknet Nodes are accessed through " +
"indexes. These indexes correspond to the number at the end of the name of the Hacknet Node. For example, the first Hacknet Node you purchase " +
"will have the same 'hacknet-node-0' and can be accessed with hacknetnodes[0]. The fourth Hacknet Node you purchase will have the name " +
"'hacknet-node-3' and can be accessed with hacknetnodes[3].
" +
- "hacknetnodes.length
Returns the number of Hacknet Nodes that the player owns
" +
- "hacknetnodes[i].level
Returns the level of the corresponding Hacknet Node
" +
- "hacknetnodes[i].ram
Returns the amount of RAM on the corresponding Hacknet Node
" +
- "hacknetnodes[i].cores
Returns the number of cores on the corresponding Hacknet Node
" +
- "hacknetnodes[i].totalMoneyGenerated
Returns the total amount of money that the corresponding Hacknet Node has earned
" +
- "hacknetnodes[i].onlineTimeSeconds
Returns the total amount of time that the corresponding Hacknet Node has existed
" +
- "hacknetnodes[i].moneyGainRatePerSecond
Returns the income ($ / sec) that the corresponding Hacknet Node earns
" +
- "hacknetnodes[i].upgradeLevel(n)
Tries to upgrade the level of the corresponding Hacknet Node n times. The argument n must be a " +
+ "hacknetnodes.length
Returns the number of Hacknet Nodes that the player owns
" +
+ "hacknetnodes[i].level
Returns the level of the corresponding Hacknet Node
" +
+ "hacknetnodes[i].ram
Returns the amount of RAM on the corresponding Hacknet Node
" +
+ "hacknetnodes[i].cores
Returns the number of cores on the corresponding Hacknet Node
" +
+ "hacknetnodes[i].totalMoneyGenerated
Returns the total amount of money that the corresponding Hacknet Node has earned
" +
+ "hacknetnodes[i].onlineTimeSeconds
Returns the total amount of time that the corresponding Hacknet Node has existed
" +
+ "hacknetnodes[i].moneyGainRatePerSecond
Returns the income ($ / sec) that the corresponding Hacknet Node earns
" +
+ "hacknetnodes[i].upgradeLevel(n)
Tries to upgrade the level of the corresponding Hacknet Node n times. The argument n must be a " +
"positive integer. Returns true if the Hacknet Node's level is successfully upgraded n times or up to the max level (200), and false otherwise.
" +
- "hacknetnodes[i].upgradeRam()
Tries to upgrade the amount of RAM on the corresponding Hacknet Node. Returns true if the " +
+ "hacknetnodes[i].upgradeRam()
Tries to upgrade the amount of RAM on the corresponding Hacknet Node. Returns true if the " +
"RAM is successfully upgraded, and false otherwise.
" +
- "hacknetnodes[i].upgradeCore()
Attempts to purchase an additional core for the corresponding Hacknet Node. Returns true if the " +
+ "hacknetnodes[i].upgradeCore()
Attempts to purchase an additional core for the corresponding Hacknet Node. Returns true if the " +
"additional core is successfully purchase, and false otherwise.
" +
"Example: The following is an example of one way a script can be used to automate the purchasing and upgrading of Hacknet Nodes. " +
"This script purchases new Hacknet Nodes until the player has four. Then, it iteratively upgrades each of those four Hacknet Nodes " +
@@ -3302,25 +3311,53 @@ let CONSTANTS = {
" }
" +
"}
" +
"Trade Information eXchange (TIX) API
" +
- "getStockPrice(sym)
Returns the price of a stock. The argument passed in must be the stock's symbol (NOT THE COMPANY NAME!). The symbol " +
+ "getStockPrice(sym)
Returns the price of a stock. The argument passed in must be the stock's symbol (NOT THE COMPANY NAME!). The symbol " +
"is a sequence of two to four capital letters. The symbol argument must be a string.
" +
"Example: getStockPrice('FSIG');
" +
- "getStockPosition(sym)
Returns an array of two elements that represents the player's position in a stock. The first element " +
+ "getStockPosition(sym)
Returns an array of two elements that represents the player's position in a stock. The first element " +
"in the array is the number of shares the player owns of the specified stock. The second element in the array is the average price of the player's " +
"shares. Both elements are numbers. The argument passed in must be the stock's symbol, which is a sequence of two to four capital letters.
" +
"Example:
pos = getStockPosition('ECP');
shares = pos[0];
avgPx = pos[1];
"+
- "buyStock(sym, shares)
Attempts to purchase shares of a stock. The first argument must be a string with the stock's symbol. The second argument " +
+ "buyStock(sym, shares)
Attempts to purchase shares of a stock using a Market Order. The first argument must be a string with the stock's symbol. The second argument " +
"must be the number of shares to purchase.
" +
"If the player does not have enough money to purchase specified number of shares, then no shares will be purchased (it will not purchase the most you can afford). " +
"Remember that every transaction on the stock exchange costs a certain commission fee.
" +
"The function will return true if it successfully purchases the specified number of shares of stock, and false otherwise.
" +
- "sellStock(sym, shares)
Attempts to sell shares of a stock. The first argument must be a string with the stock's symbol. The second argument " +
+ "sellStock(sym, shares)
Attempts to sell shares of a stock using a Market Order. The first argument must be a string with the stock's symbol. The second argument " +
"must be the number of shares to sell.
" +
"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)
" +
"This function will return true if the shares of stock are successfully sold and false otherwise.
" +
+ "shortStock(sym, shares)
" +
+ "Attempts to purchase a short position of a stock using a Market Order. The first argument must be a string with the stock's symbol. The second argument " +
+ "must be the number of shares to purchase.
" +
+ "In order to use this function the player must be in BitNode-8 or must have Level 2 of Source-File 8.
" +
+ "If the player does not have enough money to purchase the specified number of shares, then no shares will be purchased. Remember that every " +
+ "every transaction on the stock exchange costs a certain commission fee.
" +
+ "Returns true if it successfully shorts the stock with the specified number of shares, and false otherwise.
" +
+ "sellShort(sym, shares)
" +
+ "Attempts to sell a short position of a stock using a Market Order. The first argument must be a string with the stock's symbol. The second argument must be the " +
+ "number of shares to sell.
" +
+ "In order to use this function the player must be in BitNode-8 or must have Level 2 of Source-File 8.
" +
+ "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.
" +
+ "This function returns true if it successfully sells any number of shares, and false otherwise.
" +
+ "placeOrder(sym, shares, price, type, pos)
" +
+ "Places an order on the stock market. This function only works for Limit and Stop Orders. Use the buyStock/sellStock/shortStock/sellShort functions " +
+ "to place Market Orders. In order to use this function the player must be in BitNode-8 or must have Level 3 of Source-File 8.
" +
+ "The 'sym' argument must be a string with the symbol of the stock. The 'shares' and 'price' arguments " +
+ "specify the number of shares and the execution price for the order. They must be numeric.
" +
+ "The 'type' argument is a string that specifies the type of order. It must specify either 'limit' or 'stop', and must " +
+ "also specify 'buy' or 'sell'. This argument is NOT case-sensitive. Here are four examples that will work:
" +
+ "limitbuy, limitsell, stopbuy, stopsell
" +
+ "The last argument, 'pos', is a string that specifies whether the order is a 'Long' or 'Short' position. The values 'L' and " +
+ "'S' can also be used. This argument is NOT case-sensitive.
" +
+ "Returns true if the order is successfully placed, and false otherwise.
" +
+ "cancelOrder(sym, shares, price, type, pos)
" +
+ "Cancels an oustanding order on the stock market. In order to use this function the player must be in BitNode-8 or must have " +
+ "Level 3 of Source-File 8. This function uses the same arguments as placeOrder()
" +
"While loops
" +
"A while loop is a control flow statement that repeatedly executes code as long as a condition is met.
" +
"while ([cond]) {
[code]
}
" +
@@ -3364,7 +3401,7 @@ let CONSTANTS = {
"then you will be able to access all of the Singularity Functions.
" +
"Note that Singularity Functions require a lot of RAM outside of BitNode-4 (their RAM costs are multiplied by " +
"10 if you are not in BitNode-4).
" +
- "universityCourse(universityName, courseName)
" +
+ "universityCourse(universityName, courseName)
" +
"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), " +
@@ -3378,7 +3415,7 @@ let CONSTANTS = {
"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.
" +
- "gymWorkout(gymName, stat)
" +
+ "gymWorkout(gymName, stat)
" +
"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 " +
@@ -3390,18 +3427,18 @@ let CONSTANTS = {
"The valid stats are:
strength OR str
defense OR def
dexterity OR dex
agility OR agi
" +
"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.
" +
- "travelToCity(cityname)
" +
+ "travelToCity(cityname)
" +
"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.
" +
"The argument passed into this must be a string with the name of the city to travel to. Note that this argument IS CASE SENSITIVE. The valid cities are:
" +
"Aevum
Chongqing
Sector-12
New Tokyo
Ishima
Volhaven
" +
"This function will return true if you successfully travel to the specified city and false otherwise.
" +
- "purchaseTor()
" +
+ "purchaseTor()
" +
"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 purchase a TOR router and false otherwise.
" +
- "purchaseProgram(programName)
" +
+ "purchaseProgram(programName)
" +
"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 argument passed in must be a string with the name of the program (including the '.exe' extension). This argument is " +
@@ -3410,29 +3447,29 @@ let CONSTANTS = {
"The cost of purchasing programs using this function is the same as if you were purchasing them through the Dark Web (using " +
"the buy Terminal command).
" +
"This function will return true if the specified program is purchased, and false otherwise.
" +
- "getStats()
If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to run this " +
+ "getStats()
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:
" +
"Player.hacking
Player.strength
Player.defense
Player.dexterity
Player.agility
Player.charisma
Player.intelligence
" +
"Example:
" +
"res = getStats();
print('My charisma level is: ' + res.charisma);
" +
- "isBusy()
If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to run this " +
+ "isBusy()
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, or committing a crime.
" +
- "upgradeHomeRam()
" +
+ "upgradeHomeRam()
" +
"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.
" +
- "getUpgradeHomeRamCost()
" +
+ "getUpgradeHomeRamCost()
" +
"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.
" +
- "workForCompany()
" +
+ "workForCompany()
" +
"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.
" +
- "applyToCompany(companyName, field)
" +
+ "applyToCompany(companyName, field)
" +
"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.
" +
@@ -3443,19 +3480,19 @@ let CONSTANTS = {
"security
agent
employee
part-time employee
waiter
part-time waiter
" +
"This function will return true if you successfully get a job/promotion, and false otherwise. Note " +
"that if you are trying to use this function to apply for a promotion and you don't get one, it will return false.
" +
- "getCompanyRep(companyName)
" +
+ "getCompanyRep(companyName)
" +
"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.
" +
"The argument passed in must be a string with the name of the company. This argument IS CASE-SENSITIVE.
" +
- "checkFactionInvitations()
" +
+ "checkFactionInvitations()
" +
"If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function.
" +
"Returns an array with the name of all Factions you currently have oustanding invitations from.
" +
- "joinFaction(name)
" +
+ "joinFaction(name)
" +
"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.
" +
"The argument must be a string with the name of the faction. This name IS CASE-SENSITIVE.
" +
- "workForFaction(factionName, workType)
" +
+ "workForFaction(factionName, workType)
" +
"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 " +
@@ -3465,11 +3502,11 @@ let CONSTANTS = {
"must be a string with the type of work you want to perform for the faction. The valid values for this argument are:
" +
"
hacking/hacking contracts/hackingcontracts
field/fieldwork/field work
security/securitywork/security work
" +
"This function will return true if you successfully start working for the specified faction, and false otherwise.
" +
- "getFactionRep(factionName)
" +
+ "getFactionRep(factionName)
" +
"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. The argument must be a " +
"string with the name of the Faction. The argument IS CASE-SENSITIVE.
" +
- "createProgram(programName)
" +
+ "createProgram(programName)
" +
"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 " +
@@ -3480,7 +3517,7 @@ let CONSTANTS = {
"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
" +
"This function returns true if you successfully start working on the specified program, and false otherwise.
" +
- "commitCrime(crime)
" +
+ "commitCrime(crime)
" +
"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 " +
@@ -3489,40 +3526,41 @@ let CONSTANTS = {
"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
" +
+ "Crimes committed using this function will have all of their earnings halved (this applies for both money and experience!)
" +
"This function returns the number of seconds 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 60). Warning: I do not recommend using the time " +
"returned from this function to try and schedule your crime attempts. Instead, I would use the 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.
" +
- "getCrimeChance(crime)
If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to " +
+ "getCrimeChance(crime)
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). The argument for this function is a string. It is not case-sensitive and is fairly " +
"lenient in terms of what inputs it accepts. Check the documentation for the commitCrime() Singularity Function to see " +
"examples of valid inputs.
" +
- "getOwnedAugmentations(purchased=false)
" +
+ "getOwnedAugmentations(purchased=false)
" +
"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 of the names of all Augmentations you own as strings. It takes a single optional " +
"boolean argument that specifies whether the returned array should include Augmentations you have purchased " +
"but not yet installed. If it is true, then the returned array will include these Augmentations. By default, " +
"this argument is false.
" +
- "getAugmentationsFromFaction(facName)
" +
+ "getAugmentationsFromFaction(facName)
" +
"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. " +
"The argument must be a string with the faction's name. This argument is case-sensitive.
" +
- "getAugmentationCost(augName)
" +
+ "getAugmentationCost(augName)
" +
"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.
" +
"The argument passed in must be a string with the name of the Augmentation. This argument IS CASE-SENSITIVE. " +
"If an invalid Augmentation name is passed in, this function will return the array [-1, -1].
" +
- "purchaseAugmentation(factionName, augName)
" +
+ "purchaseAugmentation(factionName, augName)
" +
"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.
" +
"The two arguments must be strings specifying the name of the Faction and Augmentation, respectively. These arguments are both CASE-SENSITIVE.
" +
"This function will return true if the Augmentation is successfully purchased, and false otherwise.
" +
- "installAugmentations(cbScript)
" +
+ "installAugmentations(cbScript)
" +
"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.
" +
"It will return true if successful, and false otherwise.
" +
@@ -3629,27 +3667,10 @@ let CONSTANTS = {
"World Stock Exchange account and TIX API Access
",
LatestUpdate:
- "v0.31.0
" +
- "-Game now saves to IndexedDb (if your browser supports it). This means you should " +
- "no longer have trouble saving the game when your save file gets too big (from running " +
- "too many scripts). " +
- "The game will still be saved to localStorage as well
" +
- "-New file type: text files (.txt). You can read or write to text files using the read()/write() Netscript commands. " +
- "You can view text files in Terminal using 'cat'. Eventually I will make it so you can edit them in the editor " +
- "but that's not available yet. You can also download files to your real computer using the 'download' Terminal command
" +
- "-Added a new Crime: Bond Forgery. This crime takes 5 minutes to attempt " +
- "and gives $4,500,000 if successful. It is meant for mid game.
" +
- "-Added commitCrime(), getCrimeChance(), isBusy(), and getStats() Singularity Functions.
" +
- "-Removed getIntelligence() Netscript function
" +
- "-Added sprintf and vsprintf to Netscript. See this Github page for details
" +
- "-Increased the amount of money gained from Infiltration by 20%, and the amount of faction reputation by 12%
" +
- "-Rebalanced BitNode-2 so that Crime and Infiltration are more profitable but hacking is less profitable. Infiltration also gives more faction rep
" +
- "-Rebalanced BitNode-4 so that hacking is slightly less profitable
" +
- "-Rebalanced BitNode-5 so that Infiltration is more profitable and gives more faction rep
" +
- "-Rebalanced BitNode-11 so that Crime and Infiltration are more profitable. Infiltration also gives more faction rep.
" +
- "-Fixed an annoying issue in Hacking Missions where sometimes you would click a Node but it wouldnt actually get selected
" +
- "-Made the Hacking Mission gameplay a bit slower by lowering the effect of Scan and reducing Attack damage
" +
- "-Slightly increased the base reputation gain rate for factions when doing Field Work and Security Work
"
+ "v0.32.0
" +
+ "-Released BitNode-8: Ghost of Wall Street
" +
+ "-Re-designed Stock Market UI
" +
+ "-Minor bugfixes
"
}
@@ -4214,8 +4235,8 @@ let Engine = {
loadStockMarketContent: function() {
Engine.hideAllContent();
Engine.Display.stockMarketContent.style.visibility = "visible";
- Object(__WEBPACK_IMPORTED_MODULE_31__StockMarket_js__["c" /* displayStockMarketContent */])();
Engine.currentPage = Engine.Page.StockMarket;
+ Object(__WEBPACK_IMPORTED_MODULE_31__StockMarket_js__["f" /* displayStockMarketContent */])();
},
loadGangContent: function() {
@@ -4820,15 +4841,14 @@ let Engine = {
if (Engine.Counters.stockTick <= 0) {
if (__WEBPACK_IMPORTED_MODULE_22__Player_js__["a" /* Player */].hasWseAccount) {
- Object(__WEBPACK_IMPORTED_MODULE_31__StockMarket_js__["k" /* updateStockPrices */])();
+ Object(__WEBPACK_IMPORTED_MODULE_31__StockMarket_js__["q" /* updateStockPrices */])();
}
Engine.Counters.stockTick = 30;
}
if (Engine.Counters.sCr <= 0) {
- //Assume 4Sig will always indicate state of market
if (__WEBPACK_IMPORTED_MODULE_22__Player_js__["a" /* Player */].hasWseAccount) {
- Object(__WEBPACK_IMPORTED_MODULE_31__StockMarket_js__["i" /* stockMarketCycle */])();
+ Object(__WEBPACK_IMPORTED_MODULE_31__StockMarket_js__["o" /* stockMarketCycle */])();
}
Engine.Counters.sCr = 1500;
}
@@ -4977,9 +4997,9 @@ let Engine = {
__WEBPACK_IMPORTED_MODULE_9__Company_js__["d" /* CompanyPositions */].init();
Object(__WEBPACK_IMPORTED_MODULE_7__Augmentations_js__["g" /* initAugmentations */])(); //Also calls Player.reapplyAllAugmentations()
__WEBPACK_IMPORTED_MODULE_22__Player_js__["a" /* Player */].reapplyAllSourceFiles();
- Object(__WEBPACK_IMPORTED_MODULE_31__StockMarket_js__["e" /* initStockSymbols */])();
+ Object(__WEBPACK_IMPORTED_MODULE_31__StockMarket_js__["h" /* initStockSymbols */])();
if (__WEBPACK_IMPORTED_MODULE_22__Player_js__["a" /* Player */].hasWseAccount) {
- Object(__WEBPACK_IMPORTED_MODULE_31__StockMarket_js__["f" /* initSymbolToStockMap */])();
+ Object(__WEBPACK_IMPORTED_MODULE_31__StockMarket_js__["i" /* initSymbolToStockMap */])();
}
Object(__WEBPACK_IMPORTED_MODULE_17__Literature_js__["a" /* initLiterature */])();
Object(__WEBPACK_IMPORTED_MODULE_20__NetscriptFunctions_js__["e" /* initSingularitySFFlags */])();
@@ -5065,7 +5085,7 @@ let Engine = {
__WEBPACK_IMPORTED_MODULE_9__Company_js__["d" /* CompanyPositions */].init();
Object(__WEBPACK_IMPORTED_MODULE_7__Augmentations_js__["g" /* initAugmentations */])();
Object(__WEBPACK_IMPORTED_MODULE_18__Message_js__["d" /* initMessages */])();
- Object(__WEBPACK_IMPORTED_MODULE_31__StockMarket_js__["e" /* initStockSymbols */])();
+ Object(__WEBPACK_IMPORTED_MODULE_31__StockMarket_js__["h" /* initStockSymbols */])();
Object(__WEBPACK_IMPORTED_MODULE_17__Literature_js__["a" /* initLiterature */])();
Object(__WEBPACK_IMPORTED_MODULE_20__NetscriptFunctions_js__["e" /* initSingularitySFFlags */])();
@@ -6464,7 +6484,21 @@ function initBitNodes() {
"Level 3: 7%");
BitNodes["BitNode6"] = new BitNode(6, "Do Androids Dream?", "COMING SOON"); //Build androids for automation
BitNodes["BitNode7"] = new BitNode(7, "Waste Runner", "COMING SOON"); //Postapocalyptic wasteland + blade runner
- BitNodes["BitNode8"] = new BitNode(8, "Ghost of Wall Street", "COMING SOON"); //Trading only viable strategy
+ BitNodes["BitNode8"] = new BitNode(8, "Ghost of Wall Street", "Money never sleeps",
+ "You are trying to make a name for yourself as an up-and-coming hedge fund manager on Wall Street.
" +
+ "In this BitNode:
" +
+ "You start with $100 million
" +
+ "The only way to earn money is by trading on the stock market
" +
+ "You start with a WSE membership and access to the TIX API
" +
+ "You are able to short stocks and place different types of orders (limit/stop)
" +
+ "You can immediately donate to factions to gain reputation
" +
+ "Destroying this BitNode will give you Source-File 8, or if you already have this Source-File it will " +
+ "upgrade its level up to a maximum of 3. This Source-File grants the following benefits:
" +
+ "Level 1: Permanent access to WSE and TIX API
" +
+ "Level 2: Ability to short stocks in other BitNodes
" +
+ "Level 3: Ability to use limit/stop orders in other BitNodes
" +
+ "This Source-File also increases your hacking growth multipliers by: " +
+ "
Level 1: 8%
Level 2: 12%
Level 3: 14%");
BitNodes["BitNode9"] = new BitNode(9, "Hacktocracy", "COMING SOON"); //Healthy Hacknet balancing mechanic
BitNodes["BitNode10"] = new BitNode(10, "MegaCorp", "COMING SOON"); //Not sure yet
BitNodes["BitNode11"] = new BitNode(11, "The Big Crash", "Okay. Sell it all.",
@@ -6535,6 +6569,7 @@ let BitNodeMultipliers = {
FactionWorkRepGain: 1,
FactionPassiveRepGain: 1,
+ RepToDonateToFaction: 1,
AugmentationRepCost: 1,
AugmentationMoneyCost: 1,
@@ -6590,6 +6625,15 @@ function initBitNodeMultipliers() {
BitNodeMultipliers.AugmentationMoneyCost = 2;
BitNodeMultipliers.HackExpGain = 0.5;
break;
+ case 8: //Ghost of Wall Street
+ BitNodeMultipliers.ScriptHackMoney = 0;
+ BitNodeMultipliers.ManualHackMoney = 0;
+ BitNodeMultipliers.CompanyWorkMoney = 0;
+ BitNodeMultipliers.CrimeMoney = 0;
+ BitNodeMultipliers.HacknetNodeMoney = 0;
+ BitNodeMultipliers.InfiltrationMoney = 0;
+ BitNodeMultipliers.RepToDonateToFaction = 0
+ break;
case 11: //The Big Crash
BitNodeMultipliers.ServerMaxMoney = 0.1;
BitNodeMultipliers.ServerStartingMoney = 0.1;
@@ -17587,7 +17631,7 @@ function displayFactionContent(factionName) {
}
if (faction.isMember) {
- if (faction.favor >= 150) {
+ if (faction.favor >= (150 * __WEBPACK_IMPORTED_MODULE_1__BitNode_js__["a" /* BitNodeMultipliers */].RepToDonateToFaction)) {
donateDiv.style.display = "inline";
} else {
donateDiv.style.display = "none";
@@ -21047,7 +21091,11 @@ function calculateRamUsage(codeCopy) {
var scriptGetStockCount = Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getStockPrice(") +
Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getStockPosition(");
var scriptBuySellStockCount = Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "buyStock(") +
- Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "sellStock(");
+ Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "sellStock(") +
+ Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "shortStock(") +
+ Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "sellShort(") +
+ Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "placeOrder(") +
+ Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "cancelOrder(");
var scriptPurchaseServerCount = Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "purchaseServer(") +
Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "deleteServer(") +
Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getPurchasedServers(");
@@ -21068,7 +21116,8 @@ function calculateRamUsage(codeCopy) {
Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "travelToCity(") +
Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "purchaseTor(") +
Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "purchaseProgram(") +
- Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getStats(");
+ Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getStats(") +
+ Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "isBusy(");
var singFn2Count = Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "upgradeHomeRam(") +
Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getUpgradeHomeRamCost(") +
Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "workForCompany(") +
@@ -21080,6 +21129,7 @@ function calculateRamUsage(codeCopy) {
Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getFactionRep(");
var singFn3Count = Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "createProgram(") +
Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "commitCrime(") +
+ Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getCrimeChance(") +
Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getOwnedAugmentations(") +
Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getAugmentationsFromFaction(") +
Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getAugmentationCost(") +
@@ -22324,7 +22374,7 @@ function NetscriptFunctions(workerScript) {
if (!__WEBPACK_IMPORTED_MODULE_13__Player_js__["a" /* Player */].hasTixApiAccess) {
throw Object(__WEBPACK_IMPORTED_MODULE_22__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "You don't have TIX API Access! Cannot use getStockPrice()");
}
- var stock = __WEBPACK_IMPORTED_MODULE_18__StockMarket_js__["b" /* SymbolToStockMap */][symbol];
+ var stock = __WEBPACK_IMPORTED_MODULE_18__StockMarket_js__["d" /* SymbolToStockMap */][symbol];
if (stock == null) {
throw Object(__WEBPACK_IMPORTED_MODULE_22__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Invalid stock symbol passed into getStockPrice()");
}
@@ -22334,21 +22384,21 @@ function NetscriptFunctions(workerScript) {
if (!__WEBPACK_IMPORTED_MODULE_13__Player_js__["a" /* Player */].hasTixApiAccess) {
throw Object(__WEBPACK_IMPORTED_MODULE_22__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "You don't have TIX API Access! Cannot use getStockPosition()");
}
- var stock = __WEBPACK_IMPORTED_MODULE_18__StockMarket_js__["b" /* SymbolToStockMap */][symbol];
+ var stock = __WEBPACK_IMPORTED_MODULE_18__StockMarket_js__["d" /* SymbolToStockMap */][symbol];
if (stock == null) {
throw Object(__WEBPACK_IMPORTED_MODULE_22__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Invalid stock symbol passed into getStockPrice()");
}
- return [stock.playerShares, stock.playerAvgPx];
+ return [stock.playerShares, stock.playerAvgPx, stock.playerShortShares, stock.playerAvgShortPx];
},
buyStock : function(symbol, shares) {
if (!__WEBPACK_IMPORTED_MODULE_13__Player_js__["a" /* Player */].hasTixApiAccess) {
throw Object(__WEBPACK_IMPORTED_MODULE_22__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "You don't have TIX API Access! Cannot use buyStock()");
}
- var stock = __WEBPACK_IMPORTED_MODULE_18__StockMarket_js__["b" /* SymbolToStockMap */][symbol];
+ var stock = __WEBPACK_IMPORTED_MODULE_18__StockMarket_js__["d" /* SymbolToStockMap */][symbol];
if (stock == null) {
- throw Object(__WEBPACK_IMPORTED_MODULE_22__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Invalid stock symbol passed into getStockPrice()");
+ throw Object(__WEBPACK_IMPORTED_MODULE_22__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Invalid stock symbol passed into buyStock()");
}
- if (stock == null || shares < 0 || isNaN(shares)) {
+ if (shares < 0 || isNaN(shares)) {
workerScript.scriptRef.log("Error: Invalid 'shares' argument passed to buyStock()");
return false;
}
@@ -22369,7 +22419,7 @@ function NetscriptFunctions(workerScript) {
stock.playerShares += shares;
stock.playerAvgPx = newTotal / stock.playerShares;
if (__WEBPACK_IMPORTED_MODULE_8__engine_js__["Engine"].currentPage == __WEBPACK_IMPORTED_MODULE_8__engine_js__["Engine"].Page.StockMarket) {
- Object(__WEBPACK_IMPORTED_MODULE_18__StockMarket_js__["j" /* updateStockPlayerPosition */])(stock);
+ Object(__WEBPACK_IMPORTED_MODULE_18__StockMarket_js__["p" /* updateStockPlayerPosition */])(stock);
}
workerScript.scriptRef.log("Bought " + Object(__WEBPACK_IMPORTED_MODULE_28__utils_StringHelperFunctions_js__["c" /* formatNumber */])(shares, 0) + " shares of " + stock.symbol + " at $" +
Object(__WEBPACK_IMPORTED_MODULE_28__utils_StringHelperFunctions_js__["c" /* formatNumber */])(stock.price, 2) + " per share");
@@ -22379,12 +22429,11 @@ function NetscriptFunctions(workerScript) {
if (!__WEBPACK_IMPORTED_MODULE_13__Player_js__["a" /* Player */].hasTixApiAccess) {
throw Object(__WEBPACK_IMPORTED_MODULE_22__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "You don't have TIX API Access! Cannot use sellStock()");
}
- var stock = __WEBPACK_IMPORTED_MODULE_18__StockMarket_js__["b" /* SymbolToStockMap */][symbol];
+ var stock = __WEBPACK_IMPORTED_MODULE_18__StockMarket_js__["d" /* SymbolToStockMap */][symbol];
if (stock == null) {
- throw Object(__WEBPACK_IMPORTED_MODULE_22__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Invalid stock symbol passed into getStockPrice()");
+ throw Object(__WEBPACK_IMPORTED_MODULE_22__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Invalid stock symbol passed into sellStock()");
}
-
- if (stock == null || shares < 0 || isNaN(shares)) {
+ if (shares < 0 || isNaN(shares)) {
workerScript.scriptRef.log("Error: Invalid 'shares' argument passed to sellStock()");
return false;
}
@@ -22405,13 +22454,128 @@ function NetscriptFunctions(workerScript) {
stock.playerAvgPx = 0;
}
if (__WEBPACK_IMPORTED_MODULE_8__engine_js__["Engine"].currentPage == __WEBPACK_IMPORTED_MODULE_8__engine_js__["Engine"].Page.StockMarket) {
- Object(__WEBPACK_IMPORTED_MODULE_18__StockMarket_js__["j" /* updateStockPlayerPosition */])(stock);
+ Object(__WEBPACK_IMPORTED_MODULE_18__StockMarket_js__["p" /* updateStockPlayerPosition */])(stock);
}
workerScript.scriptRef.log("Sold " + Object(__WEBPACK_IMPORTED_MODULE_28__utils_StringHelperFunctions_js__["c" /* formatNumber */])(shares, 0) + " shares of " + stock.symbol + " at $" +
Object(__WEBPACK_IMPORTED_MODULE_28__utils_StringHelperFunctions_js__["c" /* formatNumber */])(stock.price, 2) + " per share. Gained " +
"$" + Object(__WEBPACK_IMPORTED_MODULE_28__utils_StringHelperFunctions_js__["c" /* formatNumber */])(gains, 2));
return true;
},
+ shortStock(symbol, shares) {
+ if (!__WEBPACK_IMPORTED_MODULE_13__Player_js__["a" /* Player */].hasTixApiAccess) {
+ throw Object(__WEBPACK_IMPORTED_MODULE_22__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "You don't have TIX API Access! Cannot use shortStock()");
+ }
+ if (__WEBPACK_IMPORTED_MODULE_13__Player_js__["a" /* Player */].bitNodeN !== 8) {
+ if (!(hasWallStreetSF && wallStreetSFLvl >= 2)) {
+ throw Object(__WEBPACK_IMPORTED_MODULE_22__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "ERROR: Cannot use shortStock(). You must either be in BitNode-8 or you must have Level 2 of Source-File 8");
+ }
+ }
+ var stock = __WEBPACK_IMPORTED_MODULE_18__StockMarket_js__["d" /* SymbolToStockMap */][symbol];
+ if (stock == null) {
+ throw Object(__WEBPACK_IMPORTED_MODULE_22__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "ERROR: Invalid stock symbol passed into shortStock()");
+ }
+ return Object(__WEBPACK_IMPORTED_MODULE_18__StockMarket_js__["n" /* shortStock */])(stock, shares, workerScript);
+ },
+ sellShort(symbol, shares) {
+ if (!__WEBPACK_IMPORTED_MODULE_13__Player_js__["a" /* Player */].hasTixApiAccess) {
+ throw Object(__WEBPACK_IMPORTED_MODULE_22__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "You don't have TIX API Access! Cannot use sellShort()");
+ }
+ if (__WEBPACK_IMPORTED_MODULE_13__Player_js__["a" /* Player */].bitNodeN !== 8) {
+ if (!(hasWallStreetSF && wallStreetSFLvl >= 2)) {
+ throw Object(__WEBPACK_IMPORTED_MODULE_22__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "ERROR: Cannot use sellShort(). You must either be in BitNode-8 or you must have Level 2 of Source-File 8");
+ }
+ }
+ var stock = __WEBPACK_IMPORTED_MODULE_18__StockMarket_js__["d" /* SymbolToStockMap */][symbol];
+ if (stock == null) {
+ throw Object(__WEBPACK_IMPORTED_MODULE_22__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "ERROR: Invalid stock symbol passed into sellShort()");
+ }
+ return Object(__WEBPACK_IMPORTED_MODULE_18__StockMarket_js__["l" /* sellShort */])(stock, shares, workerScript);
+ },
+ placeOrder(symbol, shares, price, type, pos) {
+ if (!__WEBPACK_IMPORTED_MODULE_13__Player_js__["a" /* Player */].hasTixApiAccess) {
+ throw Object(__WEBPACK_IMPORTED_MODULE_22__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "You don't have TIX API Access! Cannot use placeOrder()");
+ }
+ if (__WEBPACK_IMPORTED_MODULE_13__Player_js__["a" /* Player */].bitNodeN !== 8) {
+ if (!(hasWallStreetSF && wallStreetSFLvl >= 3)) {
+ throw Object(__WEBPACK_IMPORTED_MODULE_22__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "ERROR: Cannot use placeOrder(). You must either be in BitNode-8 or have Level 3 of Source-File 8");
+ }
+ }
+ var stock = __WEBPACK_IMPORTED_MODULE_18__StockMarket_js__["d" /* SymbolToStockMap */][symbol];
+ if (stock == null) {
+ throw Object(__WEBPACK_IMPORTED_MODULE_22__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "ERROR: Invalid stock symbol passed into placeOrder()");
+ }
+ var orderType, orderPos;
+ type = type.toLowerCase();
+ if (type.includes("limit") && type.includes("buy")) {
+ orderType = __WEBPACK_IMPORTED_MODULE_18__StockMarket_js__["a" /* OrderTypes */].LimitBuy;
+ } else if (type.includes("limit") && type.includes("sell")) {
+ orderType = __WEBPACK_IMPORTED_MODULE_18__StockMarket_js__["a" /* OrderTypes */].LimitSell;
+ } else if (type.includes("stop") && type.includes("buy")) {
+ orderType = __WEBPACK_IMPORTED_MODULE_18__StockMarket_js__["a" /* OrderTypes */].StopBuy;
+ } else if (type.includes("stop") && type.includes("sell")) {
+ orderType = __WEBPACK_IMPORTED_MODULE_18__StockMarket_js__["a" /* OrderTypes */].StopSell;
+ } else {
+ throw Object(__WEBPACK_IMPORTED_MODULE_22__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "ERROR: Invalid Order Type passed into placeOrder()");
+ }
+
+ pos = pos.toLowerCase();
+ if (pos.includes("l")) {
+ orderPos = __WEBPACK_IMPORTED_MODULE_18__StockMarket_js__["b" /* PositionTypes */].Long;
+ } else if (pos.includes('s')) {
+ orderPos = __WEBPACK_IMPORTED_MODULE_18__StockMarket_js__["b" /* PositionTypes */].Short;
+ } else {
+ throw Object(__WEBPACK_IMPORTED_MODULE_22__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "ERROR: Invalid Position Type passed into placeOrder()");
+ }
+
+ return Object(__WEBPACK_IMPORTED_MODULE_18__StockMarket_js__["k" /* placeOrder */])(stock, shares, price, orderType, orderPos, workerScript);
+ },
+ cancelOrder(symbol, shares, price, type, pos) {
+ if (!__WEBPACK_IMPORTED_MODULE_13__Player_js__["a" /* Player */].hasTixApiAccess) {
+ throw Object(__WEBPACK_IMPORTED_MODULE_22__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "You don't have TIX API Access! Cannot use cancelOrder()");
+ }
+ if (__WEBPACK_IMPORTED_MODULE_13__Player_js__["a" /* Player */].bitNodeN !== 8) {
+ if (!(hasWallStreetSF && wallStreetSFLvl >= 3)) {
+ throw Object(__WEBPACK_IMPORTED_MODULE_22__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "ERROR: Cannot use cancelOrder(). You must either be in BitNode-8 or have Level 3 of Source-File 8");
+ }
+ }
+ var stock = __WEBPACK_IMPORTED_MODULE_18__StockMarket_js__["d" /* SymbolToStockMap */][symbol];
+ if (stock == null) {
+ throw Object(__WEBPACK_IMPORTED_MODULE_22__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "ERROR: Invalid stock symbol passed into cancelOrder()");
+ }
+ if (isNaN(shares) || isNaN(price)) {
+ throw Object(__WEBPACK_IMPORTED_MODULE_22__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "ERROR: Invalid shares or price argument passed into cancelOrder(). Must be numeric");
+ }
+ var orderType, orderPos;
+ type = type.toLowerCase();
+ if (type.includes("limit") && type.includes("buy")) {
+ orderType = __WEBPACK_IMPORTED_MODULE_18__StockMarket_js__["a" /* OrderTypes */].LimitBuy;
+ } else if (type.includes("limit") && type.includes("sell")) {
+ orderType = __WEBPACK_IMPORTED_MODULE_18__StockMarket_js__["a" /* OrderTypes */].LimitSell;
+ } else if (type.includes("stop") && type.includes("buy")) {
+ orderType = __WEBPACK_IMPORTED_MODULE_18__StockMarket_js__["a" /* OrderTypes */].StopBuy;
+ } else if (type.includes("stop") && type.includes("sell")) {
+ orderType = OrderType.StopSell;
+ } else {
+ throw Object(__WEBPACK_IMPORTED_MODULE_22__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "ERROR: Invalid Order Type passed into placeOrder()");
+ }
+
+ pos = pos.toLowerCase();
+ if (pos.includes("l")) {
+ orderPos = __WEBPACK_IMPORTED_MODULE_18__StockMarket_js__["b" /* PositionTypes */].Long;
+ } else if (pos.includes('s')) {
+ orderPos = __WEBPACK_IMPORTED_MODULE_18__StockMarket_js__["b" /* PositionTypes */].Short;
+ } else {
+ throw Object(__WEBPACK_IMPORTED_MODULE_22__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "ERROR: Invalid Position Type passed into placeOrder()");
+ }
+ params = {
+ stock: stock,
+ shares: shares,
+ price: price,
+ type: orderType,
+ pos: orderPos
+ };
+ return Object(__WEBPACK_IMPORTED_MODULE_18__StockMarket_js__["e" /* cancelOrder */])(params, workerScript);
+ },
purchaseServer : function(hostname, ram) {
var hostnameStr = String(hostname);
hostnameStr = hostnameStr.replace(/\s\s+/g, '');
@@ -34757,24 +34921,28 @@ var __WEBPACK_AMD_DEFINE_RESULT__;/*! decimal.js v7.2.3 https://github.com/MikeM
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return StockMarket; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return StockMarket; });
/* unused harmony export StockSymbols */
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return SymbolToStockMap; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return initStockSymbols; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return initStockMarket; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return initSymbolToStockMap; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return stockMarketCycle; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return SymbolToStockMap; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return initStockSymbols; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return initStockMarket; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return initSymbolToStockMap; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return stockMarketCycle; });
/* unused harmony export buyStock */
/* unused harmony export sellStock */
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return updateStockPrices; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return displayStockMarketContent; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return shortStock; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return sellShort; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return updateStockPrices; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return displayStockMarketContent; });
/* unused harmony export updateStockTicker */
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return updateStockPlayerPosition; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return loadStockMarket; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return setStockMarketContentCreated; });
-/* unused harmony export placeOrder */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return updateStockPlayerPosition; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return loadStockMarket; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return setStockMarketContentCreated; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return placeOrder; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return cancelOrder; });
/* unused harmony export Order */
-/* unused harmony export OrderTypes */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return OrderTypes; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return PositionTypes; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Constants_js__ = __webpack_require__(3);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__engine_js__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Location_js__ = __webpack_require__(13);
@@ -34815,6 +34983,8 @@ function Stock(name, symbol, mv, b, otlkMag, initPrice=10000) {
this.mv = mv;
this.b = b;
this.otlkMag = otlkMag;
+
+ this.posTxtEl = null;
}
Stock.prototype.toJSON = function() {
@@ -34842,8 +35012,12 @@ var PositionTypes = {
function placeOrder(stock, shares, price, type, position, workerScript=null) {
var tixApi = (workerScript instanceof __WEBPACK_IMPORTED_MODULE_4__NetscriptWorker_js__["b" /* WorkerScript */]);
var order = new Order(stock, shares, price, type, position);
- if (isNaN(shares)) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("ERROR: Invalid number of shares specifies for order");
+ if (isNaN(shares) || isNaN(price)) {
+ if (tixApi) {
+ workerScript.scriptRef.log("ERROR: Invalid numeric value provided for either 'shares' or 'price' argument");
+ } else {
+ Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("ERROR: Invalid numeric value provided for either 'shares' or 'price' argument");
+ }
return false;
}
if (StockMarket["Orders"] === null) {
@@ -34857,24 +35031,71 @@ function placeOrder(stock, shares, price, type, position, workerScript=null) {
}
StockMarket["Orders"] = orders;
}
- StockMarket["Orders"].push(order);
+ StockMarket["Orders"][stock.symbol].push(order);
//Process to see if it should be executed immediately
processOrders(order.stock, order.type, order.pos);
+ updateStockOrderList(order.stock);
return true;
}
+//Returns true if successfully cancels an order, false otherwise
+function cancelOrder(params, workerScript=null) {
+ var tixApi = (workerScript instanceof __WEBPACK_IMPORTED_MODULE_4__NetscriptWorker_js__["b" /* WorkerScript */]);
+ if (StockMarket["Orders"] === null) {return false;}
+ if (params.order && params.order instanceof Order) {
+ var order = params.order;
+ //An 'Order' object is passed in
+ var stockOrders = StockMarket["Orders"][order.stock.symbol];
+ for (var i = 0; i < stockOrders.length; ++i) {
+ if (order == stockOrders[i]) {
+ stockOrders.splice(i, 1);
+ updateStockOrderList(order.stock);
+ return true;
+ }
+ }
+ return false;
+ } else if (params.stock && params.shares && params.price && params.type &&
+ params.pos && params.stock instanceof Stock) {
+ //Order properties are passed in. Need to look for the order
+ var stockOrders = StockMarket["Orders"][params.stock.symbol];
+ var orderTxt = params.stock.symbol + " - " + params.shares + " @ " +
+ __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(params.price).format('$0.000a');
+ for (var i = 0; i < stockOrders.length; ++i) {
+ var order = stockOrders[i];
+ if (params.shares === order.shares &&
+ params.price === order.price &&
+ params.type === order.type &&
+ params.pos === order.pos) {
+ stockOrders.splice(i, 1);
+ updateStockOrderList(order.stock);
+ if (tixApi) {
+ workerScript.scriptRef.log("Successfully cancelled order: " + orderTxt);
+ }
+ return true;
+ }
+ }
+ if (tixApi) {
+ workerScript.scriptRef.log("Failed to cancel order: " + orderTxt);
+ }
+ return false;
+ }
+ return false;
+}
+
function executeOrder(order) {
var stock = order.stock;
var orderBook = StockMarket["Orders"];
var stockOrders = orderBook[stock.symbol];
var res = true;
+ console.log("Executing the following order:");
+ console.log(order);
switch (order.type) {
case OrderTypes.LimitBuy:
case OrderTypes.StopBuy:
if (order.pos === PositionTypes.Long) {
res = buyStock(order.stock, order.shares) && res;
} else if (order.pos === PositionTypes.Short) {
- res = shortStock(oder.stock, order.shares) && res;
+ res = shortStock(order.stock, order.shares) && res;
}
break;
case OrderTypes.LimitSell:
@@ -34891,15 +35112,18 @@ function executeOrder(order) {
for (var i = 0; i < stockOrders.length; ++i) {
if (order == stockOrders[i]) {
stockOrders.splice(i, 1);
+ updateStockOrderList(order.stock);
return;
}
}
console.log("ERROR: Could not find the following Order in Order Book: ");
console.log(order);
+ } else {
+ console.log("Order failed to execute");
}
}
-function Order(stock, price, type, position) {
+function Order(stock, shares, price, type, position) {
this.stock = stock;
this.shares = shares;
this.price = price;
@@ -35056,7 +35280,7 @@ function initStockMarket() {
StockMarket[watchdog] = watchdogStk;
var lexocorp = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].VolhavenLexoCorp;
- var lexocorpStk = new Stock(lexocorp, StockSymbols[lexocorp], 1.25, true, 3, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["d" /* getRandomInt */])(5000, 7500));
+ var lexocorpStk = new Stock(lexocorp, StockSymbols[lexocorp], 1.25, true, 6, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["d" /* getRandomInt */])(5000, 7500));
StockMarket[lexocorp] = lexocorpStk;
var rho = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].AevumRhoConstruction;
@@ -35064,15 +35288,15 @@ function initStockMarket() {
StockMarket[rho] = rhoStk;
var alpha = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].Sector12AlphaEnterprises;
- var alphaStk = new Stock(alpha, StockSymbols[alpha], 1.05, true, 2, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["d" /* getRandomInt */])(5000, 7500));
+ var alphaStk = new Stock(alpha, StockSymbols[alpha], 2, true, 10, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["d" /* getRandomInt */])(5000, 7500));
StockMarket[alpha] = alphaStk;
var syscore = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].VolhavenSysCoreSecurities;
- var syscoreStk = new Stock(syscore, StockSymbols[syscore], 1.25, true, 0, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["d" /* getRandomInt */])(4000, 7000))
+ var syscoreStk = new Stock(syscore, StockSymbols[syscore], 1.25, true, 2, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["d" /* getRandomInt */])(4000, 7000))
StockMarket[syscore] = syscoreStk;
var computek = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].VolhavenCompuTek;
- var computekStk = new Stock(computek, StockSymbols[computek], 0.9, true, 0, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["d" /* getRandomInt */])(2000, 5000));
+ var computekStk = new Stock(computek, StockSymbols[computek], 0.9, true, 2, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["d" /* getRandomInt */])(2000, 5000));
StockMarket[computek] = computekStk;
var netlink = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].AevumNetLinkTechnologies;
@@ -35088,15 +35312,15 @@ function initStockMarket() {
StockMarket[fns] = fnsStk;
var sigmacosm = "Sigma Cosmetics";
- var sigmacosmStk = new Stock(sigmacosm, StockSymbols[sigmacosm], 0.9, true, 0, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["d" /* getRandomInt */])(2000, 3000));
+ var sigmacosmStk = new Stock(sigmacosm, StockSymbols[sigmacosm], 3, true, 0, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["d" /* getRandomInt */])(2000, 3000));
StockMarket[sigmacosm] = sigmacosmStk;
var joesguns = "Joes Guns";
- var joesgunsStk = new Stock(joesguns, StockSymbols[joesguns], 1, true, 1, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["d" /* getRandomInt */])(500, 1000));
+ var joesgunsStk = new Stock(joesguns, StockSymbols[joesguns], 4, true, 1, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["d" /* getRandomInt */])(500, 1000));
StockMarket[joesguns] = joesgunsStk;
var catalyst = "Catalyst Ventures";
- var catalystStk = new Stock(catalyst, StockSymbols[catalyst], 1.25, true, 0, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["d" /* getRandomInt */])(1000, 1500));
+ var catalystStk = new Stock(catalyst, StockSymbols[catalyst], 1.6, true, 20, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["d" /* getRandomInt */])(500, 1000));
StockMarket[catalyst] = catalystStk;
var microdyne = "Microdyne Technologies";
@@ -35137,8 +35361,8 @@ function stockMarketCycle() {
for (var name in StockMarket) {
if (StockMarket.hasOwnProperty(name)) {
var stock = StockMarket[name];
- var thresh = 0.62;
- if (stock.b) {thresh = 0.38;}
+ var thresh = 0.6;
+ if (stock.b) {thresh = 0.4;}
if (Math.random() < thresh) {
stock.b = !stock.b;
}
@@ -35295,8 +35519,8 @@ function updateStockPrices() {
var v = Math.random();
for (var name in StockMarket) {
if (StockMarket.hasOwnProperty(name)) {
- if (!(stock instanceof Stock)) {continue;}
var stock = StockMarket[name];
+ if (!(stock instanceof Stock)) {continue;}
var av = (v * stock.mv) / 100;
if (isNaN(av)) {av = .02;}
@@ -35451,6 +35675,51 @@ function displayStockMarketContent() {
return false;
});
+ var investopediaButton = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["b" /* clearEventListeners */])("stock-market-investopedia");
+ investopediaButton.addEventListener("click", function() {
+ var txt = "When making a transaction on the stock market, there are two " +
+ "types of positions: Long and Short. A Long position is the typical " +
+ "scenario where you buy a stock and earn a profit if the price of that " +
+ "stock increases. Meanwhile, a Short position is the exact opposite. " +
+ "In a Short position you purchase shares of a stock and earn a profit " +
+ "if the price of that stock decreases. This is also called 'shorting' a stock.
" +
+ "NOTE: Shorting stocks is not available immediately, and must be unlocked later on in the game.
" +
+ "There are three different types of orders you can make to buy or sell " +
+ "stocks on the exchange: Market Order, Limit Order, and Stop Order. " +
+ "Note that Limit Orders and Stop Orders are not available immediately, and must be unlocked " +
+ "later on in the game.
" +
+ "When you place a Market Order to buy or sell a stock, the order executes " +
+ "immediately at whatever the current price of the stock is. For example " +
+ "if you choose to short a stock with 5000 shares using a Market Order, " +
+ "you immediately purchase those 5000 shares in a Short position at whatever " +
+ "the current market price is for that stock.
" +
+ "A Limit Order is an order that only executes under certain conditions. " +
+ "A Limit Order is used to buy or sell a stock at a specified price or better. " +
+ "For example, lets say you purchased a Long position of 100 shares of some stock " +
+ "at a price of $10 per share. You can place a Limit Order to sell those 100 shares " +
+ "at $50 or better. The Limit Order will execute when the price of the stock reaches a " +
+ "value of $50 or higher.
" +
+ "A Stop Order is the opposite of a Limit Order. It is used to buy or sell a stock " +
+ "at a specified price (before the price gets 'worse'). For example, lets say you purchased " +
+ "a Short position of 100 shares of some stock at a price of $100 per share. " +
+ "The current price of the stock is $80 (a profit of $20 per share). You can place a " +
+ "Stop Order to sell the Short position if the stock's price reaches $90 or higher. " +
+ "This can be used to lock in your profits and limit any losses.
" +
+ "Here is a summary of how each order works and when they execute:
" +
+ "In a LONG Position:
" +
+ "A Limit Order to buy will execute if the stock's price <= order's price
" +
+ "A Limit Order to sell will execute if the stock's price >= order's price
" +
+ "A Stop Order to buy will execute if the stock's price >= order's price
" +
+ "A Stop Order to sell will execute if the stock's price <= order's price
" +
+ "In a SHORT Position:
" +
+ "A Limit Order to buy will execute if the stock's price >= order's price
" +
+ "A Limit Order to sell will execute if the stock's price <= order's price
" +
+ "A Stop Order to buy will execute if the stock's price <= order's price
" +
+ "A Stop Order to sell will execute if the stock's price >= order's price.";
+ Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])(txt);
+ return false;
+ });
+
var stockList = document.getElementById("stock-market-list");
if (stockList == null) {return;}
@@ -35487,8 +35756,9 @@ function displayStockMarketContent() {
for (var name in StockMarket) {
if (StockMarket.hasOwnProperty(name)) {
var stock = StockMarket[name];
- updateStockTicker(stock, true);
+ updateStockTicker(stock, null);
updateStockPlayerPosition(stock);
+ updateStockOrderList(stock);
}
}
}
@@ -35519,6 +35789,7 @@ function createStockTicker(stock) {
orderList = document.createElement("ul");
qtyInput.classList.add("stock-market-input");
+ qtyInput.placeholder = "Quantity (Shares)";
qtyInput.setAttribute("id", tickerId + "-qty-input");
qtyInput.setAttribute("onkeydown", "return ( event.ctrlKey || event.altKey " +
" || (47Long Position: " +
"Shares in the long position will increase " +
"in value if the price of the corresponding stock increases
" +
"
Shares: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(stock.playerShares, 0) +
"
Average Price: " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(stock.playerAvgPx).format('$0.000a') +
+ " (Total Cost: " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(totalCost).format('$0.000a') + ")" +
"
Profit: " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(gains).format('$0.000a') +
- " (" + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(percentageGains, 2) + "%)
" +
- "Short Position: " +
- "Shares in short position will increase " +
- "in value if the price of the corresponding stock decreases
" +
- "
Shares: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(stock.playerShortShares, 0) +
- "
Average Price: " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(stock.playerAvgShortPx).format('$0.000a') +
- "
Profit: " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(shortGains).format('$0.000a') +
- " (" + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(shortPercentageGains, 2) + "%)";
+ " (" + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(percentageGains*100, 2) + "%)
";
+ if (__WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].bitNodeN === 8 || (__WEBPACK_IMPORTED_MODULE_3__NetscriptFunctions_js__["d" /* hasWallStreetSF */] && __WEBPACK_IMPORTED_MODULE_3__NetscriptFunctions_js__["f" /* wallStreetSFLvl */] >= 2)) {
+ stock.posTxtEl.innerHTML +=
+ "Short Position: " +
+ "Shares in short position will increase " +
+ "in value if the price of the corresponding stock decreases
" +
+ "
Shares: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(stock.playerShortShares, 0) +
+ "
Average Price: " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(stock.playerAvgShortPx).format('$0.000a') +
+ " (Total Cost: " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(shortTotalCost).format('$0.000a') + ")" +
+ "
Profit: " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(shortGains).format('$0.000a') +
+ " (" + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(shortPercentageGains*100, 2) + "%)" +
+ "Orders:
";
+ }
+
}
function updateStockOrderList(stock) {
+ if (__WEBPACK_IMPORTED_MODULE_1__engine_js__["Engine"].currentPage !== __WEBPACK_IMPORTED_MODULE_1__engine_js__["Engine"].Page.StockMarket) {return;}
var tickerId = "stock-market-ticker-" + stock.symbol;
var orderList = document.getElementById(tickerId + "-order-list");
if (orderList === null) {
@@ -35745,7 +36041,7 @@ function updateStockOrderList(stock) {
}
var stockOrders = orderBook[stock.symbol];
if (stockOrders === null) {
- console.log("ERROR: Could nto find orders for: " + stock.symbol);
+ console.log("ERROR: Could not find orders for: " + stock.symbol);
return;
}
@@ -35755,12 +36051,27 @@ function updateStockOrderList(stock) {
}
for (var i = 0; i < stockOrders.length; ++i) {
- var order = stockOrders[i];
- var li = document.createElement("li");
- var posText = (order.pos === PositionTypes.Long ? "Long Position" : "Short Position");
- li.innerText = order.type + " - " + posText + " - " +
- order.shares + " @ $" + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(order.price, 2);
- orderList.appendChild(li);
+ (function() {
+ var order = stockOrders[i];
+ var li = document.createElement("li");
+ li.style.padding = "4px";
+ var posText = (order.pos === PositionTypes.Long ? "Long Position" : "Short Position");
+ li.style.color = "white";
+ li.innerText = order.type + " - " + posText + " - " +
+ order.shares + " @ $" + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(order.price, 2);
+
+ var cancelButton = document.createElement("span");
+ cancelButton.classList.add("stock-market-order-cancel-btn");
+ cancelButton.classList.add("a-link-button");
+ cancelButton.innerHTML = "Cancel Order";
+ cancelButton.addEventListener("click", function() {
+ cancelOrder({order: order}, null);
+ return false;
+ });
+ li.appendChild(cancelButton);
+ orderList.appendChild(li);
+ }());
+
}
}
@@ -39087,7 +39398,12 @@ function initSourceFiles() {
"Level 3: 7%");
SourceFiles["SourceFile6"] = new SourceFile(6);
SourceFiles["SourceFile7"] = new SourceFile(7);
- SourceFiles["SourceFile8"] = new SourceFile(8);
+ SourceFiles["SourceFile8"] = new SourceFile(8, "This Source-File grants the following benefits:
" +
+ "Level 1: Permanent access to WSE and TIX API
" +
+ "Level 2: Ability to short stocks in other BitNodes
" +
+ "Level 3: Ability to use limit/stop orders in other BitNodes
" +
+ "This Source-File also increases your hacking growth multipliers by: " +
+ "
Level 1: 8%
Level 2: 12%
Level 3: 14%");
SourceFiles["SourceFile9"] = new SourceFile(9);
SourceFiles["SourceFile10"] = new SourceFile(10);
SourceFiles["SourceFile11"] = new SourceFile(11, "This Source-File makes it so that company favor increases BOTH the player's salary and reputation gain rate " +
@@ -39174,6 +39490,14 @@ function applySourceFile(srcFile) {
__WEBPACK_IMPORTED_MODULE_0__Player_js__["a" /* Player */].hacking_mult *= incMult;
__WEBPACK_IMPORTED_MODULE_0__Player_js__["a" /* Player */].hacking_exp_mult *= incMult;
break;
+ case 8: //Ghost of Wall Street
+ var mult = 0;
+ for (var i = 0; i < srcFile.lvl; ++i) {
+ mult += (8 / (Math.pow(2, i)));
+ }
+ var incMult = 1 + (mult / 100);
+ __WEBPACK_IMPORTED_MODULE_0__Player_js__["a" /* Player */].hacking_grow_mult *= incMult;
+ break;
case 11: //The Big Crash
var mult = 0;
for (var i = 0; i < srcFile.lvl; ++i) {
@@ -39310,9 +39634,9 @@ function prestigeAugmentation() {
//Reset Stock market
if (__WEBPACK_IMPORTED_MODULE_11__Player_js__["a" /* Player */].hasWseAccount) {
- Object(__WEBPACK_IMPORTED_MODULE_14__StockMarket_js__["d" /* initStockMarket */])();
- Object(__WEBPACK_IMPORTED_MODULE_14__StockMarket_js__["f" /* initSymbolToStockMap */])();
- Object(__WEBPACK_IMPORTED_MODULE_14__StockMarket_js__["h" /* setStockMarketContentCreated */])(false);
+ Object(__WEBPACK_IMPORTED_MODULE_14__StockMarket_js__["g" /* initStockMarket */])();
+ Object(__WEBPACK_IMPORTED_MODULE_14__StockMarket_js__["i" /* initSymbolToStockMap */])();
+ Object(__WEBPACK_IMPORTED_MODULE_14__StockMarket_js__["m" /* setStockMarketContentCreated */])(false);
var stockMarketList = document.getElementById("stock-market-list");
while(stockMarketList.firstChild) {
stockMarketList.removeChild(stockMarketList.firstChild);
@@ -39327,6 +39651,13 @@ function prestigeAugmentation() {
}
}
+ //BitNode 8: Ghost of Wall Street
+ if (__WEBPACK_IMPORTED_MODULE_11__Player_js__["a" /* Player */].bitNodeN === 8) {__WEBPACK_IMPORTED_MODULE_11__Player_js__["a" /* Player */].money = new __WEBPACK_IMPORTED_MODULE_16__utils_decimal_js___default.a(100000000);}
+ if (__WEBPACK_IMPORTED_MODULE_11__Player_js__["a" /* Player */].bitNodeN === 8 || __WEBPACK_IMPORTED_MODULE_9__NetscriptFunctions_js__["d" /* hasWallStreetSF */]) {
+ __WEBPACK_IMPORTED_MODULE_11__Player_js__["a" /* Player */].hasWseAccount = true;
+ __WEBPACK_IMPORTED_MODULE_11__Player_js__["a" /* Player */].hasTixApiAccess = true;
+ }
+
var mainMenu = document.getElementById("mainmenu-container");
mainMenu.style.visibility = "visible";
__WEBPACK_IMPORTED_MODULE_15__Terminal_js__["a" /* Terminal */].resetTerminalInput();
@@ -39668,7 +39999,7 @@ function loadBitVerse(destroyedBitNodeNum) {
var elemId = "bitnode-" + i.toString();
var elem = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["b" /* clearEventListeners */])(elemId);
if (elem == null) {return;}
- if (i === 1 || i === 2 || i === 4 || i === 5 || i === 11) {
+ if (i === 1 || i === 2 || i === 4 || i === 5 || i === 8 || i === 11) {
elem.addEventListener("click", function() {
var bitNodeKey = "BitNode" + i;
var bitNode = __WEBPACK_IMPORTED_MODULE_0__BitNode_js__["b" /* BitNodes */][bitNodeKey];
@@ -45895,6 +46226,7 @@ TextFile.fromJSON = function(value) {
__WEBPACK_IMPORTED_MODULE_2__utils_JSONReviver_js__["c" /* Reviver */].constructors.TextFile = TextFile;
function getTextFile(fn, server) {
+ if (!fn.endsWith(".txt")) {fn += ".txt";}
for (var i = 0; i < server.textFiles.length; ++i) {
if (server.textFiles[i].fn === fn) {
return server.textFiles[i];
@@ -45982,6 +46314,7 @@ function InfiltrationInstance(companyName, startLevel, val, maxClearance, diff)
this.dexExpGained = 0;
this.agiExpGained = 0;
this.chaExpGained = 0;
+ this.intExpGained = 0;
}
InfiltrationInstance.prototype.gainHackingExp = function(amt) {
@@ -46014,6 +46347,11 @@ InfiltrationInstance.prototype.gainCharismaExp = function(amt) {
this.chaExpGained += amt;
}
+InfiltrationInstance.prototype.gainIntelligenceExp = function(amt) {
+ if (isNaN(amt)) {return;}
+ this.intExpGained += amt;
+}
+
function beginInfiltration(companyName, startLevel, val, maxClearance, diff) {
var inst = new InfiltrationInstance(companyName, startLevel, val, maxClearance, diff);
clearInfiltrationStatusText();
@@ -46021,9 +46359,7 @@ function beginInfiltration(companyName, startLevel, val, maxClearance, diff) {
}
function endInfiltration(inst, success) {
- if (success) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_InfiltrationBox_js__["a" /* infiltrationBoxCreate */])(inst);
- }
+ if (success) {Object(__WEBPACK_IMPORTED_MODULE_6__utils_InfiltrationBox_js__["a" /* infiltrationBoxCreate */])(inst);}
Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["b" /* clearEventListeners */])("infiltration-kill");
Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["b" /* clearEventListeners */])("infiltration-knockout");
@@ -46522,10 +46858,10 @@ let intWgt = __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].In
//Success: 5%, Failure 10%, -Karma
function attemptInfiltrationKill(inst) {
var chance = getInfiltrationKillChance(inst);
- inst.gainStrengthExp(inst.securityLevel / 100) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].strength_exp_mult;
- inst.gainDefenseExp(inst.securityLevel / 100) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].defense_exp_mult;
- inst.gainDexterityExp(inst.securityLevel / 100) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].dexterity_exp_mult;
- inst.gainAgilityExp(inst.securityLevel / 100) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].agility_exp_mult;
+ inst.gainStrengthExp(inst.securityLevel / 90) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].strength_exp_mult;
+ inst.gainDefenseExp(inst.securityLevel / 90) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].defense_exp_mult;
+ inst.gainDexterityExp(inst.securityLevel / 90) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].dexterity_exp_mult;
+ inst.gainAgilityExp(inst.securityLevel / 90) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].agility_exp_mult;
if (Math.random() <= chance) {
inst.securityLevel *= 1.05;
return [true, 1.05];
@@ -46548,10 +46884,10 @@ function getInfiltrationKillChance(inst) {
//Success: 3%, Failure: 10%
function attemptInfiltrationKnockout(inst) {
var chance = getInfiltrationKnockoutChance(inst);
- inst.gainStrengthExp(inst.securityLevel / 100) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].strength_exp_mult;
- inst.gainDefenseExp(inst.securityLevel / 100) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].defense_exp_mult;
- inst.gainDexterityExp(inst.securityLevel / 100) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].dexterity_exp_mult;
- inst.gainAgilityExp(inst.securityLevel / 100) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].agility_exp_mult;
+ inst.gainStrengthExp(inst.securityLevel / 85) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].strength_exp_mult;
+ inst.gainDefenseExp(inst.securityLevel / 85) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].defense_exp_mult;
+ inst.gainDexterityExp(inst.securityLevel / 85) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].dexterity_exp_mult;
+ inst.gainAgilityExp(inst.securityLevel / 85) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].agility_exp_mult;
if (Math.random() <= chance) {
inst.securityLevel *= 1.03;
return [true, 1.03];
@@ -46573,9 +46909,9 @@ function getInfiltrationKnockoutChance(inst) {
//Success: 0%, Failure: 10%
function attemptInfiltrationStealthKnockout(inst) {
var chance = getInfiltrationStealthKnockoutChance(inst);
- inst.gainStrengthExp(inst.securityLevel / 100) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].strength_exp_mult;
- inst.gainDexterityExp(inst.securityLevel / 75) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].dexterity_exp_mult;
- inst.gainAgilityExp(inst.securityLevel / 75) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].agility_exp_mult;
+ inst.gainStrengthExp(inst.securityLevel / 90) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].strength_exp_mult;
+ inst.gainDexterityExp(inst.securityLevel / 70) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].dexterity_exp_mult;
+ inst.gainAgilityExp(inst.securityLevel / 70) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].agility_exp_mult;
if (Math.random() <= chance) {
return [true, 1];
} else {
@@ -46597,9 +46933,9 @@ function getInfiltrationStealthKnockoutChance(inst) {
//Success: 0%, Failure: 5%, -Karma
function attemptInfiltrationAssassinate(inst) {
var chance = getInfiltrationAssassinateChance(inst);
- inst.gainStrengthExp(inst.securityLevel / 100) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].strength_exp_mult;
- inst.gainDexterityExp(inst.securityLevel / 75) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].dexterity_exp_mult;
- inst.gainAgilityExp(inst.securityLevel / 75) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].agility_exp_mult;
+ inst.gainStrengthExp(inst.securityLevel / 90) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].strength_exp_mult;
+ inst.gainDexterityExp(inst.securityLevel / 70) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].dexterity_exp_mult;
+ inst.gainAgilityExp(inst.securityLevel / 70) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].agility_exp_mult;
if (Math.random() <= chance) {
return [true, 1];
} else {
@@ -46621,10 +46957,10 @@ function getInfiltrationAssassinateChance(inst) {
//Success: 5%, Failure: 10%
function attemptInfiltrationDestroySecurity(inst) {
var chance = getInfiltrationDestroySecurityChance(inst);
- inst.gainStrengthExp(inst.securityLevel / 100) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].strength_exp_mult;
- inst.gainDefenseExp(inst.securityLevel / 100) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].defense_exp_mult;
- inst.gainDexterityExp(inst.securityLevel / 100) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].dexterity_exp_mult;
- inst.gainAgilityExp(inst.securityLevel / 100) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].agility_exp_mult;
+ inst.gainStrengthExp(inst.securityLevel / 90) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].strength_exp_mult;
+ inst.gainDefenseExp(inst.securityLevel / 90) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].defense_exp_mult;
+ inst.gainDexterityExp(inst.securityLevel / 90) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].dexterity_exp_mult;
+ inst.gainAgilityExp(inst.securityLevel / 90) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].agility_exp_mult;
if (Math.random() <= chance) {
inst.securityLevel *= 1.05;
return [true, 1.05];
@@ -46648,7 +46984,8 @@ function getInfiltrationDestroySecurityChance(inst) {
//Success: 1%, Failure: 5%
function attemptInfiltrationHack(inst) {
var chance = getInfiltrationHackChance(inst);
- inst.gainHackingExp(inst.securityLevel / 75) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].hacking_exp_mult;
+ inst.gainHackingExp(inst.securityLevel / 50) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].hacking_exp_mult;
+ inst.gainIntelligenceExp(inst.securityLevel / 700);
if (Math.random() <= chance) {
inst.securityLevel *= 1.03;
return [true, 1.03];
@@ -46670,7 +47007,7 @@ function getInfiltrationHackChance(inst) {
//Success: 0%, Failure: 8%
function attemptInfiltrationSneak(inst) {
var chance = getInfiltrationSneakChance(inst);
- inst.gainAgilityExp(inst.securityLevel / 75) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].agility_exp_mult;
+ inst.gainAgilityExp(inst.securityLevel / 50) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].agility_exp_mult;
if (Math.random() <= chance) {
return [true, 1];
} else {
@@ -46691,7 +47028,7 @@ function getInfiltrationSneakChance(inst) {
//Success: 1%, Failure: 3%
function attemptInfiltrationPickLockedDoor(inst) {
var chance = getInfiltrationPickLockedDoorChance(inst);
- inst.gainDexterityExp(inst.securityLevel / 75) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].dexterity_exp_mult;
+ inst.gainDexterityExp(inst.securityLevel / 40) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].dexterity_exp_mult;
if (Math.random() <= chance) {
inst.securityLevel *= 1.01;
return [true, 1.01];
@@ -46712,7 +47049,7 @@ function getInfiltrationPickLockedDoorChance(inst) {
//Success: 0%, Failure: 15%,
function attemptInfiltrationBribe(inst) {
var chance = getInfiltrationBribeChance(inst);
- inst.gainCharismaExp(inst.securityLevel / 50) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].charisma_exp_mult;
+ inst.gainCharismaExp(inst.securityLevel / 10) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].charisma_exp_mult;
if (Math.random() <= chance) {
return [true, 1];
} else {
@@ -46731,8 +47068,8 @@ function getInfiltrationBribeChance(inst) {
//Failure: 5%
function attemptInfiltrationEscape(inst) {
var chance = getInfiltrationEscapeChance(inst);
- inst.gainAgilityExp(inst.securityLevel / 50) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].agility_exp_mult;
- inst.gainDexterityExp(inst.securityLevel / 50) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].dexterity_exp_mult;
+ inst.gainAgilityExp(inst.securityLevel / 40) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].agility_exp_mult;
+ inst.gainDexterityExp(inst.securityLevel / 40) * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].dexterity_exp_mult;
if (Math.random() <= chance) {
return [true, 1];
} else {
@@ -46798,6 +47135,7 @@ function infiltrationBoxCreate(inst) {
__WEBPACK_IMPORTED_MODULE_3__src_Player_js__["a" /* Player */].gainDexterityExp(inst.dexExpGained);
__WEBPACK_IMPORTED_MODULE_3__src_Player_js__["a" /* Player */].gainAgilityExp(inst.agiExpGained);
__WEBPACK_IMPORTED_MODULE_3__src_Player_js__["a" /* Player */].gainCharismaExp(inst.chaExpGained);
+ __WEBPACK_IMPORTED_MODULE_3__src_Player_js__["a" /* Player */].gainIntelligenceExp(inst.intExpGained);
var totalValue = 0;
for (var i = 0; i < inst.secretsStolen.length; ++i) {
@@ -92430,7 +92768,7 @@ BitburnerSaveObject.prototype.saveGame = function(db) {
this.AliasesSave = JSON.stringify(__WEBPACK_IMPORTED_MODULE_0__Alias_js__["a" /* Aliases */]);
this.GlobalAliasesSave = JSON.stringify(__WEBPACK_IMPORTED_MODULE_0__Alias_js__["b" /* GlobalAliases */]);
this.MessagesSave = JSON.stringify(__WEBPACK_IMPORTED_MODULE_7__Message_js__["b" /* Messages */]);
- this.StockMarketSave = JSON.stringify(__WEBPACK_IMPORTED_MODULE_13__StockMarket_js__["a" /* StockMarket */]);
+ this.StockMarketSave = JSON.stringify(__WEBPACK_IMPORTED_MODULE_13__StockMarket_js__["c" /* StockMarket */]);
this.SettingsSave = JSON.stringify(__WEBPACK_IMPORTED_MODULE_11__Settings_js__["a" /* Settings */]);
this.VersionSave = JSON.stringify(__WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].Version);
if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].bitNodeN == 2 && __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].inGang()) {
@@ -92447,13 +92785,15 @@ BitburnerSaveObject.prototype.saveGame = function(db) {
}
request.onsuccess = function(e) {
- console.log("Successfully saved game to IndexedDB!");
+ console.log("Saved game to IndexedDB!");
}
try {
window.localStorage.setItem("bitburnerSave", saveString);
+ console.log("Saved game to LocalStorage!");
} catch(e) {
if (e.code == 22) {
+ __WEBPACK_IMPORTED_MODULE_3__engine_js__["Engine"].createStatusText("Save failed for localStorage! Check console(F12)");
console.log("Failed to save game to localStorage because the size of the save file " +
"is too large. However, the game will still be saved to IndexedDb if your browser " +
"supports it. If you would like to save to localStorage as well, then " +
@@ -92462,7 +92802,6 @@ BitburnerSaveObject.prototype.saveGame = function(db) {
}
}
- console.log("Game saved!");
__WEBPACK_IMPORTED_MODULE_3__engine_js__["Engine"].createStatusText("Game saved!");
}
@@ -92516,12 +92855,12 @@ function loadGame(saveString) {
}
if (saveObj.hasOwnProperty("StockMarketSave")) {
try {
- Object(__WEBPACK_IMPORTED_MODULE_13__StockMarket_js__["g" /* loadStockMarket */])(saveObj.StockMarketSave);
+ Object(__WEBPACK_IMPORTED_MODULE_13__StockMarket_js__["j" /* loadStockMarket */])(saveObj.StockMarketSave);
} catch(e) {
- Object(__WEBPACK_IMPORTED_MODULE_13__StockMarket_js__["g" /* loadStockMarket */])("");
+ Object(__WEBPACK_IMPORTED_MODULE_13__StockMarket_js__["j" /* loadStockMarket */])("");
}
} else {
- Object(__WEBPACK_IMPORTED_MODULE_13__StockMarket_js__["g" /* loadStockMarket */])("");
+ Object(__WEBPACK_IMPORTED_MODULE_13__StockMarket_js__["j" /* loadStockMarket */])("");
}
if (saveObj.hasOwnProperty("SettingsSave")) {
try {
@@ -92724,12 +93063,12 @@ function loadImportedGame(saveObj, saveString) {
}
if (saveObj.hasOwnProperty("StockMarketSave")) {
try {
- Object(__WEBPACK_IMPORTED_MODULE_13__StockMarket_js__["g" /* loadStockMarket */])(saveObj.StockMarketSave);
+ Object(__WEBPACK_IMPORTED_MODULE_13__StockMarket_js__["j" /* loadStockMarket */])(saveObj.StockMarketSave);
} catch(e) {
- Object(__WEBPACK_IMPORTED_MODULE_13__StockMarket_js__["g" /* loadStockMarket */])("");
+ Object(__WEBPACK_IMPORTED_MODULE_13__StockMarket_js__["j" /* loadStockMarket */])("");
}
} else {
- Object(__WEBPACK_IMPORTED_MODULE_13__StockMarket_js__["g" /* loadStockMarket */])("");
+ Object(__WEBPACK_IMPORTED_MODULE_13__StockMarket_js__["j" /* loadStockMarket */])("");
}
if (saveObj.hasOwnProperty("SettingsSave")) {
try {
diff --git a/index.html b/index.html
index 918de6ca0..ca8496da0 100644
--- a/index.html
+++ b/index.html
@@ -781,9 +781,8 @@
If you purchase access to the TIX API, you will retain that access even after
you 'reset' by installing Augmentations.