mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-10 09:43:54 +01:00
Merge pull request #110 from danielyxie/dev
Added literature (.lit files). Fixed bug with Gang Territory. Updated…
This commit is contained in:
commit
15c18be357
@ -1006,6 +1006,7 @@
|
|||||||
<script src="src/Settings.js"></script>
|
<script src="src/Settings.js"></script>
|
||||||
<script src="src/SourceFile.js"></script>
|
<script src="src/SourceFile.js"></script>
|
||||||
<script src="src/Gang.js"></script>
|
<script src="src/Gang.js"></script>
|
||||||
|
<script src="src/Literature.js"></script>
|
||||||
|
|
||||||
<script src="src/engine.js"></script>
|
<script src="src/engine.js"></script>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
CONSTANTS = {
|
CONSTANTS = {
|
||||||
Version: "0.27.1",
|
Version: "0.27.2",
|
||||||
|
|
||||||
//Max level for any skill, assuming no multipliers. Determined by max numerical value in javascript for experience
|
//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
|
//and the skill level formula in Player.js. Note that all this means it that when experience hits MAX_INT, then
|
||||||
@ -236,7 +236,11 @@ CONSTANTS = {
|
|||||||
"the grow() command in a script will also increase security level of the target server. These actions will " +
|
"the grow() command in a script will also increase security level of the target server. These actions will " +
|
||||||
"make it harder for you to hack the server, and decrease the amount of money you can steal. You can lower a " +
|
"make it harder for you to hack the server, and decrease the amount of money you can steal. You can lower a " +
|
||||||
"server's security level in a script using the <i>weaken(server)</i> function in Netscript. See the Netscript " +
|
"server's security level in a script using the <i>weaken(server)</i> function in Netscript. See the Netscript " +
|
||||||
"documentation for more details",
|
"documentation for more details.<br><br>" +
|
||||||
|
"A server has a minimum security level that is equal to one third of its starting security, rounded to the " +
|
||||||
|
"nearest integer. To be more precise:<br><br>" +
|
||||||
|
"server.minSecurityLevel = Math.max(1, Math.round(server.startingSecurityLevel / 3))<br><br>" +
|
||||||
|
"This means that a server's security will not fall below this value if you are trying to weaken it.",
|
||||||
|
|
||||||
TutorialScriptsText: "Scripts can be used to automate the hacking process. Scripts must be written in the Netscript language. " +
|
TutorialScriptsText: "Scripts can be used to automate the hacking process. Scripts must be written in the Netscript language. " +
|
||||||
"Documentation about the Netscript language can be found in the 'Netscript Programming Language' " +
|
"Documentation about the Netscript language can be found in the 'Netscript Programming Language' " +
|
||||||
@ -276,7 +280,7 @@ CONSTANTS = {
|
|||||||
"<i>top</i><br>Displays all active scripts and their RAM usage <br><br>" +
|
"<i>top</i><br>Displays all active scripts and their RAM usage <br><br>" +
|
||||||
"<u><h1> Multithreading scripts </h1></u><br>" +
|
"<u><h1> Multithreading scripts </h1></u><br>" +
|
||||||
"Scripts can be multithreaded. A multithreaded script runs the script's code once in each thread. The result is that " +
|
"Scripts can be multithreaded. A multithreaded script runs the script's code once in each thread. The result is that " +
|
||||||
"every call to the hack(), grow(), and weaken() Netscript functions will have its effect multiplied by the number of scripts. " +
|
"every call to the hack(), grow(), and weaken() Netscript functions will have its effect multiplied by the number of threads. " +
|
||||||
"For example, if a normal single-threaded script is able to hack $10,000, then running the same script with 5 threads would " +
|
"For example, if a normal single-threaded script is able to hack $10,000, then running the same script with 5 threads would " +
|
||||||
"yield $50,000. <br><br> " +
|
"yield $50,000. <br><br> " +
|
||||||
"When multithreading a script, the total RAM cost can be calculated by simply multiplying the base RAM cost of the script " +
|
"When multithreading a script, the total RAM cost can be calculated by simply multiplying the base RAM cost of the script " +
|
||||||
@ -448,6 +452,10 @@ CONSTANTS = {
|
|||||||
"hostname or IP of the target server. Does NOT work while offline <br> Example: getServerMoneyAvailable('foodnstuff');<br><br>" +
|
"hostname or IP of the target server. Does NOT work while offline <br> Example: getServerMoneyAvailable('foodnstuff');<br><br>" +
|
||||||
"<i>getServerMaxMoney(hostname/ip)</i><br>Returns the maximum amount of money that can be available on a server. The argument passed in must be a string with " +
|
"<i>getServerMaxMoney(hostname/ip)</i><br>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. Does NOT work while offline<br>Example: getServerMaxMoney('foodnstuff');<br><br>" +
|
"the hostname or IP of the target server. Does NOT work while offline<br>Example: getServerMaxMoney('foodnstuff');<br><br>" +
|
||||||
|
"<i>getServerGrowth(hostname/ip)</i><br>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().<br><br>" +
|
||||||
|
"The argument passed in must be a string with the hostname or IP of the target server.<br><br>" +
|
||||||
"<i>getServerSecurityLevel(hostname/ip)</i><br>Returns the security level of a server. The argument passed in must be a string with either the " +
|
"<i>getServerSecurityLevel(hostname/ip)</i><br>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 between 1 and 100. Does NOT work while offline.<br><br>" +
|
"hostname or IP of the target server. A server's security is denoted by a number between 1 and 100. Does NOT work while offline.<br><br>" +
|
||||||
"<i>getServerBaseSecurityLevel(hostname/ip)</i><br> Returns the base security level of a server. This is the security level that the server starts out with. " +
|
"<i>getServerBaseSecurityLevel(hostname/ip)</i><br> Returns the base security level of a server. This is the security level that the server starts out with. " +
|
||||||
@ -455,10 +463,13 @@ CONSTANTS = {
|
|||||||
"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. <br><br>" +
|
"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. <br><br>" +
|
||||||
"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 between 1 and 100. " +
|
"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 between 1 and 100. " +
|
||||||
"Does NOT work while offline.<br><br>" +
|
"Does NOT work while offline.<br><br>" +
|
||||||
"<i>getServerRequiredHackingLevel(hostname/ip)</i><br> Returns the required hacking level of a server. The argument passed in must be a string with either the " +
|
"<i>getServerRequiredHackingLevel(hostname/ip)</i><br>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. Does NOT work while offline <br><br>" +
|
"hostname or IP or the target server. Does NOT work while offline <br><br>" +
|
||||||
"<i>getServerNumPortsRequired(hostname/ip)</i><br>Returns the number of open ports required to successfully run NUKE.exe on a server. The argument " +
|
"<i>getServerNumPortsRequired(hostname/ip)</i><br>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. Does NOT work while offline<br><br>" +
|
"passed in must be a string with either the hostname or IP of the target server. Does NOT work while offline<br><br>" +
|
||||||
|
"<i>getServerRam(hostname/ip)</i><br>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.<br><br>" +
|
||||||
"<i>fileExists(filename, [hostname/ip])</i><br> Returns a boolean (true or false) indicating whether the specified file exists on a server. " +
|
"<i>fileExists(filename, [hostname/ip])</i><br> 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 or a program. A script name is case-sensitive, but a " +
|
"The first argument must be a string with the name of the file. A file can either be a script or a program. A script name is case-sensitive, but a " +
|
||||||
"program is not. For example, fileExists('brutessh.exe') will work fine, even though the actual program is named BruteSSH.exe. <br><br> " +
|
"program is not. For example, fileExists('brutessh.exe') will work fine, even though the actual program is named BruteSSH.exe. <br><br> " +
|
||||||
@ -480,7 +491,8 @@ 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. " +
|
"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 " +
|
"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.<br><br>" +
|
"false otherwise.<br><br>" +
|
||||||
"<i>purchaseHacknetNode()</i><br> Purchases a new Hacknet Node. Returns a number with the index of the Hacknet Node. This index is equivalent to the number " +
|
"<i>getNextHacknetNodeCost()</i><br>Returns the cost of purchasing a new Hacknet Node<br><br>" +
|
||||||
|
"<i>purchaseHacknetNode()</i><br>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 " +
|
"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<br><br>" +
|
"a new Hacknet Node then the function will return false. Does NOT work offline<br><br>" +
|
||||||
"<i>purchaseServer(hostname, ram)</i><br> Purchases a server with the specified hostname and amount of RAM. The first argument can be any data type, " +
|
"<i>purchaseServer(hostname, ram)</i><br> Purchases a server with the specified hostname and amount of RAM. The first argument can be any data type, " +
|
||||||
@ -495,6 +507,18 @@ CONSTANTS = {
|
|||||||
"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.<br><br>" +
|
"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.<br><br>" +
|
||||||
"<i>read(port)</i><br>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. " +
|
"<i>read(port)</i><br>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. <br><br>" +
|
"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. <br><br>" +
|
||||||
|
"<i>scriptRunning(scriptname, hostname/ip)</i><br>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.<br><br>" +
|
||||||
|
"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.<br><br>" +
|
||||||
|
"<i>scriptKill(scriptname, hostname/ip)</i><br>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. <br><br>" +
|
||||||
|
"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.<br><br>" +
|
||||||
|
"<i>getScriptRam(scriptname, hostname/ip)</i><br>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.<br><br>" +
|
||||||
"<u><h1>Hacknet Nodes API</h1></u><br>" +
|
"<u><h1>Hacknet Nodes API</h1></u><br>" +
|
||||||
"Netscript provides the following API for accessing and upgrading your Hacknet Nodes through scripts. This API does NOT work offline.<br><br>" +
|
"Netscript provides the following API for accessing and upgrading your Hacknet Nodes through scripts. This API does NOT work offline.<br><br>" +
|
||||||
"<i>hacknetnodes</i><br> A special variable. This is an array that maps to the Player's Hacknet Nodes. The Hacknet Nodes are accessed through " +
|
"<i>hacknetnodes</i><br> A special variable. This is an array that maps to the Player's Hacknet Nodes. The Hacknet Nodes are accessed through " +
|
||||||
@ -686,6 +710,14 @@ CONSTANTS = {
|
|||||||
"World Stock Exchange account and TIX API Access<br>",
|
"World Stock Exchange account and TIX API Access<br>",
|
||||||
|
|
||||||
LatestUpdate:
|
LatestUpdate:
|
||||||
|
"v0.27.2<br>" +
|
||||||
|
"-Added getServerGrowth() Netscript function<br>" +
|
||||||
|
"-Added getNextHacknetNodeCost() Netscript function<br>" +
|
||||||
|
"-Added new 'literature' files (.lit extension) that are used to build lore for the game. " +
|
||||||
|
"These .lit files can be found in certain servers throughout the game. They can be viewed with the 'cat' Terminal " +
|
||||||
|
"command and copied over to other servers using the 'scp' command. These .lit files won't be found until you reset " +
|
||||||
|
"by installing Augmentations<br>" +
|
||||||
|
"Fixed some bugs with Gang Territory(BitNode 2 only)<br><br>" +
|
||||||
"v0.27.1<br>" +
|
"v0.27.1<br>" +
|
||||||
"-Changed the way Gang power was calculated to make it scale better late game (BitNode 2 only)<br>" +
|
"-Changed the way Gang power was calculated to make it scale better late game (BitNode 2 only)<br>" +
|
||||||
"-Lowered the respect gain rate in Gangs (Bitnode 2 only)<br>" +
|
"-Lowered the respect gain rate in Gangs (Bitnode 2 only)<br>" +
|
||||||
|
12
src/Gang.js
12
src/Gang.js
@ -84,13 +84,16 @@ function processAllGangTerritory(numCycles=1) {
|
|||||||
var otherPwr = AllGangs[GangNames[other]].power;
|
var otherPwr = AllGangs[GangNames[other]].power;
|
||||||
var thisChance = thisPwr / (thisPwr + otherPwr);
|
var thisChance = thisPwr / (thisPwr + otherPwr);
|
||||||
|
|
||||||
//Skip calculation if one of the two gangs has zero territory
|
|
||||||
if (AllGangs[GangNames[other]].territory <= 0 || AllGangs[GangNames[i]].territory <= 0) {continue;}
|
|
||||||
|
|
||||||
if (Math.random() < thisChance) {
|
if (Math.random() < thisChance) {
|
||||||
|
if (AllGangs[GangNames[other]].territory <= 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
AllGangs[GangNames[i]].territory += 0.0001;
|
AllGangs[GangNames[i]].territory += 0.0001;
|
||||||
AllGangs[GangNames[other]].territory -= 0.0001;
|
AllGangs[GangNames[other]].territory -= 0.0001;
|
||||||
} else {
|
} else {
|
||||||
|
if (AllGangs[GangNames[i]].territory <= 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
AllGangs[GangNames[i]].territory -= 0.0001;
|
AllGangs[GangNames[i]].territory -= 0.0001;
|
||||||
AllGangs[GangNames[other]].territory += 0.0001;
|
AllGangs[GangNames[other]].territory += 0.0001;
|
||||||
}
|
}
|
||||||
@ -287,6 +290,7 @@ GangMember.prototype.calculateRespectGain = function() {
|
|||||||
statWeight -= (3.5 * task.difficulty);
|
statWeight -= (3.5 * task.difficulty);
|
||||||
if (statWeight <= 0) {return 0;}
|
if (statWeight <= 0) {return 0;}
|
||||||
var territoryMult = AllGangs[Player.gang.facName].territory;
|
var territoryMult = AllGangs[Player.gang.facName].territory;
|
||||||
|
if (territoryMult <= 0) {return 0;}
|
||||||
var respectMult = (Player.gang.respect) / (Player.gang.respect + Player.gang.wanted);
|
var respectMult = (Player.gang.respect) / (Player.gang.respect + Player.gang.wanted);
|
||||||
return 12 * task.baseRespect * statWeight * territoryMult * respectMult;
|
return 12 * task.baseRespect * statWeight * territoryMult * respectMult;
|
||||||
}
|
}
|
||||||
@ -303,6 +307,7 @@ GangMember.prototype.calculateWantedLevelGain = function() {
|
|||||||
statWeight -= (3.5 * task.difficulty);
|
statWeight -= (3.5 * task.difficulty);
|
||||||
if (statWeight <= 0) {return 0;}
|
if (statWeight <= 0) {return 0;}
|
||||||
var territoryMult = AllGangs[Player.gang.facName].territory;
|
var territoryMult = AllGangs[Player.gang.facName].territory;
|
||||||
|
if (territoryMult <= 0) {return 0;}
|
||||||
if (task.baseWanted < 0) {
|
if (task.baseWanted < 0) {
|
||||||
return task.baseWanted * statWeight * territoryMult;
|
return task.baseWanted * statWeight * territoryMult;
|
||||||
} else {
|
} else {
|
||||||
@ -322,6 +327,7 @@ GangMember.prototype.calculateMoneyGain = function() {
|
|||||||
statWeight -= (3.5 * task.difficulty);
|
statWeight -= (3.5 * task.difficulty);
|
||||||
if (statWeight <= 0) {return 0;}
|
if (statWeight <= 0) {return 0;}
|
||||||
var territoryMult = AllGangs[Player.gang.facName].territory;
|
var territoryMult = AllGangs[Player.gang.facName].territory;
|
||||||
|
if (territoryMult <= 0) {return 0;}
|
||||||
var respectMult = (Player.gang.respect) / (Player.gang.respect + Player.gang.wanted);
|
var respectMult = (Player.gang.respect) / (Player.gang.respect + Player.gang.wanted);
|
||||||
return 5 * task.baseMoney * statWeight * territoryMult * respectMult;
|
return 5 * task.baseMoney * statWeight * territoryMult * respectMult;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ TerminalHelpText =
|
|||||||
"Type 'help name' to learn more about the command 'name'<br><br>" +
|
"Type 'help name' to learn more about the command 'name'<br><br>" +
|
||||||
'alias [-g] [name="value"] Create or display Terminal aliases<br>' +
|
'alias [-g] [name="value"] Create or display Terminal aliases<br>' +
|
||||||
"analyze Get information about the current machine <br>" +
|
"analyze Get information about the current machine <br>" +
|
||||||
"cat [message] Display a .msg file<br>" +
|
"cat [file] Display a .msg or .lit file<br>" +
|
||||||
"check [script] [args...] Print a script's logs to Terminal<br>" +
|
"check [script] [args...] Print a script's logs to Terminal<br>" +
|
||||||
"clear Clear all text on the terminal <br>" +
|
"clear Clear all text on the terminal <br>" +
|
||||||
"cls See 'clear' command <br>" +
|
"cls See 'clear' command <br>" +
|
||||||
@ -24,7 +24,7 @@ TerminalHelpText =
|
|||||||
"run [name] [-t] [n] [args...] Execute a program or script<br>" +
|
"run [name] [-t] [n] [args...] Execute a program or script<br>" +
|
||||||
"scan Prints all immediately-available network connections<br>" +
|
"scan Prints all immediately-available network connections<br>" +
|
||||||
"scan-analyze [d] Prints info for all servers up to <i>d</i> nodes away<br>" +
|
"scan-analyze [d] Prints info for all servers up to <i>d</i> nodes away<br>" +
|
||||||
"scp [script] [server] Copies a script to a destination server<br>" +
|
"scp [file] [server] Copies a script or .lit file to a destination server<br>" +
|
||||||
"sudov Shows whether you have root access on this computer<br>" +
|
"sudov Shows whether you have root access on this computer<br>" +
|
||||||
"tail [script] [args...] Displays dynamic logs for the specified script<br>" +
|
"tail [script] [args...] Displays dynamic logs for the specified script<br>" +
|
||||||
"theme [preset] | bg txt hlgt Change the color scheme of the UI<br>" +
|
"theme [preset] | bg txt hlgt Change the color scheme of the UI<br>" +
|
||||||
@ -56,9 +56,11 @@ HelpTexts = {
|
|||||||
"server details such as the hostname, whether the player has root access, what ports are opened/closed, and also " +
|
"server details such as the hostname, whether the player has root access, what ports are opened/closed, and also " +
|
||||||
"hacking-related information such as an estimated chance to successfully hack, an estimate of how much money is " +
|
"hacking-related information such as an estimated chance to successfully hack, an estimate of how much money is " +
|
||||||
"available on the server, etc.",
|
"available on the server, etc.",
|
||||||
cat: "cat [message]<br>" +
|
cat: "cat [file]<br>" +
|
||||||
"Display message files, which are files ending with the '.msg' extension. Example:<br><br>" +
|
"Display message files, which are files ending with the '.msg' extension, or a literature file, which " +
|
||||||
"cat j1.msg",
|
"are files ending with the '.lit' extension. Examples:<br><br>" +
|
||||||
|
"cat j1.msg<br>" +
|
||||||
|
"cat foo.lit",
|
||||||
check: "check [script name] [args...]<br>" +
|
check: "check [script name] [args...]<br>" +
|
||||||
"Print the logs of the script specified by the script name and arguments to the Terminal. Each argument must be separated by " +
|
"Print the logs of the script specified by the script name and arguments to the Terminal. Each argument must be separated by " +
|
||||||
"a space. Remember that a running script is uniquely " +
|
"a space. Remember that a running script is uniquely " +
|
||||||
@ -155,8 +157,9 @@ HelpTexts = {
|
|||||||
"The information 'scan-analyze' displays about each server includes whether or not you have root access to it, " +
|
"The information 'scan-analyze' displays about each server includes whether or not you have root access to it, " +
|
||||||
"its required hacking level, the number of open ports required to run NUKE.exe on it, and how much RAM " +
|
"its required hacking level, the number of open ports required to run NUKE.exe on it, and how much RAM " +
|
||||||
"it has",
|
"it has",
|
||||||
scp: "scp [script name] [target server]<br>" +
|
scp: "scp [filename] [target server]<br>" +
|
||||||
"Copies the specified script from the current server to the target server. " +
|
"Copies the specified file from the current server to the target server. " +
|
||||||
|
"This command only works for script files (.script extension) and literature files (.lit extension). " +
|
||||||
"The second argument passed in must be the hostname or IP of the target server.",
|
"The second argument passed in must be the hostname or IP of the target server.",
|
||||||
sudov: "sudov<br>" +
|
sudov: "sudov<br>" +
|
||||||
"Prints whether or not you have root access to the current machine",
|
"Prints whether or not you have root access to the current machine",
|
||||||
|
@ -7,56 +7,313 @@ function Literature(title, filename, txt) {
|
|||||||
this.txt = txt;
|
this.txt = txt;
|
||||||
}
|
}
|
||||||
|
|
||||||
Literature.prototype.display = function() {
|
function showLiterature(fn) {
|
||||||
var txt = this.title + "<br><br>" +
|
var litObj = Literatures[fn];
|
||||||
"<i>" + this.txt + "</i>";
|
if (litObj == null) {return;}
|
||||||
|
var txt = litObj.title + "<br><br>" +
|
||||||
|
"<i>" + litObj.txt + "</i>";
|
||||||
dialogBoxCreate(txt);
|
dialogBoxCreate(txt);
|
||||||
}
|
}
|
||||||
|
|
||||||
Literature.prototype.addToserver = function(server) {
|
|
||||||
if (server == null) {
|
|
||||||
console.log("WARNING: Could not locate server");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
server.messages.push(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
Literature.prototype.toJSON = function() {
|
|
||||||
return Generic_toJSON("Literature", this);
|
|
||||||
}
|
|
||||||
|
|
||||||
Literature.fromJSON = function(value) {
|
|
||||||
return Generic_fromJSON(Literature, value.data);
|
|
||||||
}
|
|
||||||
|
|
||||||
Reviver.constructors.Literature = Literature;
|
|
||||||
|
|
||||||
Literatures = {}
|
Literatures = {}
|
||||||
|
|
||||||
function initLiterature() {
|
function initLiterature() {
|
||||||
var title, fn, txt;
|
var title, fn, txt;
|
||||||
title = "A Green Tomorrow"; //Tomorrow is Green
|
title = "A Green Tomorrow";
|
||||||
fn = "A-Green-Tomorrow.lit";
|
fn = "A-Green-Tomorrow.lit";
|
||||||
txt = "In the past few decades, there has been a massive global movement towards the generation of renewable energy in an effort to" +
|
txt = "Starting a few decades ago, there was a massive global movement towards the generation of renewable energy in an effort to " +
|
||||||
"combat global warming and climate change. The shift towards renewable energy was a big success";
|
"combat global warming and climate change. The shift towards renewable energy was a big success, or so it seemed. In 2045 " +
|
||||||
Literatures[fn] = new Literature(title, fn);
|
"a staggering 80% of the world's energy came from non-renewable fossil fuels. Now, about three decades later, that " +
|
||||||
title = "Alpha and Omega"; //Cryptic article about BitNodes
|
"number is down to only 15%. Most of the world's energy now comes from nuclear power and renwable sources such as " +
|
||||||
title = "Are we living in a simulated reality?"; //lol
|
"solar and geothermal. Unfortunately, these efforts were not the huge success that they seem to be.<br><br>" +
|
||||||
title = "Beyond Man"; //Better than nature?
|
"Since 2045 primary energy use has soared almost tenfold. This was mainly due to growing urban populations and " +
|
||||||
title = "Brighter than the Sun"; // Article about TaiYang Digital
|
"the rise of increasingly advanced (and power-hungry) technology that has become ubiquitous in our lives. So, " +
|
||||||
title = "Democracy is Dead: The Fall of an Empire"; //Government is a powerless figurehead, megacorporation rule
|
"despite the fact that the percentage of our energy that comes from fossil fuels has drastically decreased, " +
|
||||||
title = "Fall of an Empire";
|
"the total amount of energy we are producing from fossil fuels has actually increased.<br><br>" +
|
||||||
title = "Figures show rising crime rates in Sector-12"; //Article about the Syndicate
|
"The grim effects of our species' irresponsible use of energy and neglect of our mother world have become increasingly apparent. " +
|
||||||
title = "Man and the Machine"; //Blurring the Boundaries between Man and the Machine
|
"Last year a temperature of 190F was recorded in the Death Valley desert, which is over 50% higher than the highest " +
|
||||||
title = "Secret Societies"; //Talks about how hacking factions have replaced typical secret societies like Illuminati
|
"recorded temperature at the beginning of the century. In the last two decades numerous major cities such as Manhattan, Boston, and " +
|
||||||
title = "Space: The Failed Frontier"; //A Frontier too far?
|
"Los Angeles have been partially or fully submerged by rising sea levels. In the present day, over 75% of the world's agriculture is " +
|
||||||
title = "Coded Intelligence: Myth or Reality?"; //Discusses whether true intelligence can be implemented in software. Foreshadows intelligence stat in later BItnodes
|
"done in climate-controlled vertical farms, as most traditional farmland has become unusable due to severe climate conditions.<br><br>" +
|
||||||
title = "Synthetic Muscles"; //Artificial muscles
|
"Despite all of this, the greedy and corrupt corporations that rule the world have done nothing to address these problems that " +
|
||||||
title = "Tensions rise in global tech race"; //Article about competition+conflict between tech mega corps (OmniTek, ECorp..Taiyang? etc.)
|
"threaten our species. And so it's up to us, the common people. Each and every one of us can make a difference by doing what " +
|
||||||
title = "The Cost of Immortality"; //Grey Skies
|
"these corporations won't: taking responsibility. If we don't, pretty soon there won't be an Earth left to save. We are " +
|
||||||
title = "The Hidden World"; //The Sleepwalking World
|
"the last hope for a green tomorrow.";
|
||||||
title = "The New God"; //Singularity Church of the MachineGod
|
Literatures[fn] = new Literature(title, fn, txt);
|
||||||
title = "The New Triads"; //About tetrads, Dragon Heads: The Triads of the 21st Century
|
|
||||||
title = "The Secret War"; //War between those who wanted Augmentations widely available and those who wanted to keep it secret
|
title = "Alpha and Omega";
|
||||||
title = "An uncertain future for Defense Contractors"; //Less war and globalism = less profit for defense contractors
|
fn = "alpha-omega.lit";
|
||||||
|
txt = "Then we saw a new heaven and a new earth, for our first heaven and earth had gone away, and our sea was no more. " +
|
||||||
|
"And we saw a new holy city, new Aeria, coming down out of this new heaven, prepared as a bride adorned for her husband. " +
|
||||||
|
"And we heard a loud voice saying, 'Behold, the new dwelling place of the Gods. We will dwell with them, and they " +
|
||||||
|
"will be our people, and we will be with them as their Gods. We will wipe away every tear from their eyes, and death " +
|
||||||
|
"shall be no more, neither shall there be mourning, nor crying, nor pain anymore, for the former things " +
|
||||||
|
"have passed away.'<br><br>" +
|
||||||
|
"And once were were seated on the throne we said 'Behold, I am making all things new.' " +
|
||||||
|
"Also we said, 'Write this down, for these words are trustworthy and true.' And we said to you, " +
|
||||||
|
"'It is done! I am the Alpha and the Omega, the beginning and the end. To the thirsty I will give from the spring " +
|
||||||
|
"of the water of life without payment. The one who conquers will have this heritage, and we will be his God and " +
|
||||||
|
"he will be our son. But as for the cowardly, the faithless, the detestable, as for murderers, " +
|
||||||
|
"the sexually immoral, sorcerers, idolaters, and all liars, their portion will be in the lake that " +
|
||||||
|
"burns with fire and sulfur, for it is the second true death.'";
|
||||||
|
Literatures[fn] = new Literature(title, fn, txt);
|
||||||
|
|
||||||
|
title = "Are We Living in a Computer Simulation?";
|
||||||
|
fn = "simulated-reality.lit";
|
||||||
|
txt = "The idea that we are living in a virtual world is not new. It's a trope that has " +
|
||||||
|
"been explored constantly in literature and pop culture. However, it is also a legitimate " +
|
||||||
|
"scientific hypothesis that many notable physicists and philosophers have debated for years.<br><br>" +
|
||||||
|
"Proponents for this simulated reality theory often point to how advanced our technology has become, " +
|
||||||
|
"as well as the incredibly fast pace at which it has advanced over the past decades. The amount of computing " +
|
||||||
|
"power available to us has increased over 100-fold since 2060 due to the development of nanoprocessors and " +
|
||||||
|
"quantum computers. Artifical Intelligence has advanced to the point where our entire lives are controlled " +
|
||||||
|
"by robots and machines that handle our day-to-day activities such as autonomous transportation and scheduling. " +
|
||||||
|
"If we consider the pace at which this technology has advanced and assume that these developments continue, it's " +
|
||||||
|
"reasonable to assume that at some point in the future our technology would be advanced enough that " +
|
||||||
|
"we could create simulations that are indistinguishable from reality. However, if this is a reasonable outcome " +
|
||||||
|
"of continued technological advancement, then it is very likely that such a scenario has already happened. <br><br>" +
|
||||||
|
"Statistically speaking, somewhere out there in the infinite universe there is an advanced, intelligent species " +
|
||||||
|
"that already has such technology. Who's to say that they haven't already created such a virtual reality: our own?";
|
||||||
|
Literatures[fn] = new Literature(title, fn, txt);
|
||||||
|
|
||||||
|
title = "Beyond Man";
|
||||||
|
fn = "beyond-man.lit";
|
||||||
|
txt = "Humanity entered a 'transhuman' era a long time ago. And despite the protests and criticisms of many who cried out against " +
|
||||||
|
"human augmentation at the time, the transhuman movement continued and prospered. Proponents of the movement ignored the critics, " +
|
||||||
|
"arguing that it was in our inherent nature to better ourselves. To improve. To be more than we were. They claimed that " +
|
||||||
|
"not doing so would be to go against every living organism's biological purpose: evolution and survival of the fittest.<br><br>" +
|
||||||
|
"And here we are today, with technology that is advanced enough to augment humans to a state that " +
|
||||||
|
"can only be described as posthuman. But what do we have to show for it when this augmentation " +
|
||||||
|
"technology is only available to the so-called 'elite'? Are we really better off than before when only 5% of the " +
|
||||||
|
"world's population has access to this technology? When the powerful corporations and organizations of the world " +
|
||||||
|
"keep it all to themselves, have we really evolved?<br><br>" +
|
||||||
|
"Augmentation technology has only further increased the divide between the rich and the poor, between the powerful and " +
|
||||||
|
"the oppressed. We have not become 'more than human'. We have not evolved from nature's original design. We are still the greedy, " +
|
||||||
|
"corrupted, and evil men that we always were.";
|
||||||
|
Literatures[fn] = new Literature(title, fn, txt);
|
||||||
|
|
||||||
|
|
||||||
|
title = "Brighter than the Sun";
|
||||||
|
fn = "brighter-than-the-sun.lit";
|
||||||
|
txt = "When people think about the corporations that dominate the East, they typically think of KuaiGong International, which " +
|
||||||
|
"holds a complete monopoly for manufacturing and commerce in Asia, or Global Pharmaceuticals, the world's largest " +
|
||||||
|
"drug company, or OmniTek Incorporated, the global leader in intelligent and autonomous robots. But there's one company " +
|
||||||
|
"that has seen a rapid rise in the last year and is poised to dominate not only the East, but the entire world: TaiYang Digital.<br><br>" +
|
||||||
|
"TaiYang Digital is a Chinese internet-technology corporation that provides services such as " +
|
||||||
|
"online advertising, search, gaming, media, entertainment, and cloud computing/storage. Its name TaiYang comes from the Chinese word " +
|
||||||
|
"for 'sun'. In Chinese culture, the sun is a 'yang' symbol " +
|
||||||
|
"associated with life, heat, masculinity, and heaven.<br><br>" +
|
||||||
|
"The company was founded " +
|
||||||
|
"less than 5 years ago and is already the third highest valued company in all of Asia. In 2076 it generated a total revenue of " +
|
||||||
|
"over 10 trillion yuan. It's services are used daily by over a billion people worldwide.<br><br>" +
|
||||||
|
"TaiYang Digital's meteoric rise is extremely surprising in modern society. This sort of growth is " +
|
||||||
|
"something you'd commonly see in the first half of the century, especially for tech companies. However in " +
|
||||||
|
"the last two decades the number of corporations has significantly declined as the largest entities " +
|
||||||
|
"quickly took over the economy. Corporations such as ECorp, MegaCorp, and KuaiGong have established " +
|
||||||
|
"such strong monopolies in their market sectors that they have effectively killed off all " +
|
||||||
|
"of the smaller and new corporations that have tried to start up over the years. This is what makes " +
|
||||||
|
"the rise of TaiYang Digital so impressive. And if TaiYang continues down this path, then they have " +
|
||||||
|
"a bright future ahead of them.";
|
||||||
|
Literatures[fn] = new Literature(title, fn, txt);
|
||||||
|
|
||||||
|
title = "Democracy is Dead: The Fall of an Empire";
|
||||||
|
fn = "democracy-is-dead.lit";
|
||||||
|
txt = "They rose from the shadows in the street<br>From the places where the oppressed meet<br>" +
|
||||||
|
"Their cries echoed loudly through the air<br>As they once did in Tiananmen Square<br>" +
|
||||||
|
"Loudness in the silence, Darkness in the light<br>They came forth with power and might<br>" +
|
||||||
|
"Once the beacon of democracy, America was first<br>Its pillars of society destroyed and dispersed<br>" +
|
||||||
|
"Soon the cries rose everywhere, with revolt and riot<br>Until one day, finally, all was quiet<br>" +
|
||||||
|
"From the ashes rose a new order, corporatocracy was its name<br>" +
|
||||||
|
"Rome, Mongol, Byzantine, all of history is just the same<br>" +
|
||||||
|
"For man will never change in a fundamental way<br>"
|
||||||
|
"And now democracy is dead, in the USA";
|
||||||
|
Literatures[fn] = new Literature(title, fn, txt);
|
||||||
|
|
||||||
|
title = "Figures Show Rising Crime Rates in Sector-12";
|
||||||
|
fn = "sector-12-crime.lit";
|
||||||
|
txt = "A recent study by analytics company Wilson Inc. shows a significant rise " +
|
||||||
|
"in criminal activity in Sector-12. Perhaps the most alarming part of the statistic " +
|
||||||
|
"is that most of the rise is in violent crime such as homicide and assault. According " +
|
||||||
|
"to the study, the city saw a total of 21,406 reported homicides in 2076, which is over " +
|
||||||
|
"a 20% increase compared to 2075.<br><br>" +
|
||||||
|
"CIA director David Glarow says its too early to know " +
|
||||||
|
"whether these figures indicate the beginning of a sustained increase in crime rates, or whether " +
|
||||||
|
"the year was just an unfortunate outlier. He states that many intelligence and law enforcement " +
|
||||||
|
"agents have noticed an increase in organized crime activites, and believes that these figures may " +
|
||||||
|
"be the result of an uprising from criminal organizations such as The Syndicate or the Slum Snakes.";
|
||||||
|
Literatures[fn] = new Literature(title, fn, txt);
|
||||||
|
|
||||||
|
title = "Man and the Machine";
|
||||||
|
fn = "man-and-machine.lit";
|
||||||
|
txt = "In 2005 Ray Kurzweil popularized his theory of the Singularity. He predicted that the rate " +
|
||||||
|
"of technological advancement would continue to accelerate faster and faster until one day " +
|
||||||
|
"machines would be become infinitely more intelligent than humans. This point, called the " +
|
||||||
|
"Singularity, would result in a drastic transformation of the world as we know it. He predicted " +
|
||||||
|
"that the Singularity would arrive by 2045. " +
|
||||||
|
"And yet here we are, more than three decades later, where most would agree that we have not " +
|
||||||
|
"yet reached a point where computers and machines are vastly more intelligent than we are. So what gives?<br><br>" +
|
||||||
|
"The answer is that we have reached the Singularity, just not in the way we expected. The artifical superintelligence " +
|
||||||
|
"that was predicted by Kurzweil and others exists in the world today - in the form of Augmentations. " +
|
||||||
|
"Yes, those Augmentations that the rich and powerful keep to themselves enable humans " +
|
||||||
|
"to become superintelligent beings. The Singularity did not lead to a world where " +
|
||||||
|
"our machines are infinitely more intelligent than us, it led to a world " +
|
||||||
|
"where man and machine can merge to become something greater. Most of the world just doesn't " +
|
||||||
|
"know it yet."
|
||||||
|
Literatures[fn] = new Literature(title, fn, txt);
|
||||||
|
|
||||||
|
title = "Secret Societies";
|
||||||
|
fn = "secret-societies.lit";
|
||||||
|
txt = "The idea of secret societies has long intrigued the general public by inspiring curiosity, fascination, and " +
|
||||||
|
"distrust. People have long wondered about who these secret society members are and what they do, with the " +
|
||||||
|
"most radical of conspiracy theorists claiming that they control everything in the entire world. And while the world " +
|
||||||
|
"may never know for sure, it is likely that many secret societies do actually exist, even today.<br><br>" +
|
||||||
|
"However, the secret societies of the modern world are nothing like those that (supposedly) existed " +
|
||||||
|
"decades and centuries ago. The Freemasons, Knights Templar, and Illuminati, while they may have been around " +
|
||||||
|
"at the turn of the 21st century, almost assuredly do not exist today. The dominance of the Web in " +
|
||||||
|
"our everyday lives and the fact that so much of the world is now digital has given rise to a new breed " +
|
||||||
|
"of secret societies: Internet-based ones.<br><br>" +
|
||||||
|
"Commonly called 'hacker groups', Internet-based secret societies have become well-known in today's " +
|
||||||
|
"world. Some of these, such as The Black Hand, are black hat groups that claim they are trying to " +
|
||||||
|
"help the oppressed by attacking the elite and powerful. Others, such as NiteSec, are hacktivist groups " +
|
||||||
|
"that try to push political and social agendas. Perhaps the most intriguing hacker group " +
|
||||||
|
"is the mysterious Bitrunners, whose purpose still remains unknown.";
|
||||||
|
Literatures[fn] = new Literature(title, fn, txt);
|
||||||
|
|
||||||
|
title = "Space: The Failed Frontier";
|
||||||
|
fn = "the-failed-frontier.lit";
|
||||||
|
txt = "Humans have long dreamed about spaceflight. With enduring interest, we were driven to explore " +
|
||||||
|
"the unknown and discover new worlds. We dreamed about conquering the stars. And in our quest, " +
|
||||||
|
"we pushed the boundaries of our scientific limits, and then pushed further. Space exploration " +
|
||||||
|
"lead to the development of many important technologies and new industries.<br><br>" +
|
||||||
|
"But sometime in the middle of the 21st century, all of that changed. Humanity lost its ambitions and " +
|
||||||
|
"aspirations of exploring the cosmos. The once-large funding for agencies like NASA and the European " +
|
||||||
|
"Space Agency gradually whittled away until their eventual disbanding in the 2060's. Not even " +
|
||||||
|
"militaries are fielding flights into space nowadays. The only remnants of the once great mission for cosmic " +
|
||||||
|
"conquest are the countless satellites in near-earth orbit, used for communications, espionage, " +
|
||||||
|
"and other corporate interests.<br><br>" +
|
||||||
|
"And as we continue to look at the state of space technology, it becomes more and " +
|
||||||
|
"more apparent that we will never return to that golden age of space exploration, that " +
|
||||||
|
"age where everyone dreamed of going beyond earth for the sake of discovery.";
|
||||||
|
Literatures[fn] = new Literature(title, fn, txt);
|
||||||
|
|
||||||
|
title = "Coded Intelligence: Myth or Reality?";
|
||||||
|
fn = "coded-intelligence.lit";
|
||||||
|
txt = "Tremendous progress has been made in the field of Artificial Intelligence over the past few decades. " +
|
||||||
|
"Our autonomous vehicles and transporation systems. The electronic personal assistants that control our everyday lives. " +
|
||||||
|
"Medical, service, and manufacturing robots. All of these are examples of how far AI has come and how much it has " +
|
||||||
|
"improved our daily lives. However, the question still remains of whether AI will ever be advanced enough to re-create " +
|
||||||
|
"human intelligence.<br><br>" +
|
||||||
|
"We've certainly come close to artificial intelligence that is similar to humans. For example OmniTek Incorporated's " +
|
||||||
|
"CompanionBot, a robot meant to act as a comforting friend for lonely and grieving people, is eerily human-like " +
|
||||||
|
"in its appearance, speech, mannerisms, and even movement. However its artificial intelligence isn't the same as " +
|
||||||
|
"that of humans. Not yet. It doesn't have sentience or self-awareness or consciousness.<br><br>" +
|
||||||
|
"Many neuroscientists believe that we won't ever reach the point of creating artificial human intelligence. 'At the end of the " +
|
||||||
|
"the day, AI comes down to 1's and 0's, while the human brain does not. We'll never see AI that is identical to that of " +
|
||||||
|
"humans.'";
|
||||||
|
Literatures[fn] = new Literature(title, fn, txt);
|
||||||
|
|
||||||
|
title = "Synthetic Muscles";
|
||||||
|
fn = "synthetic-muscles.lit";
|
||||||
|
txt = "Initial versions of synthetic muscles weren't made of anything organic but were actually " +
|
||||||
|
"crude devices made to mimic human muscle function. Some of the early iterations were actually made of " +
|
||||||
|
"common materials such as fishing lines and sewing threads due to their high strength for " +
|
||||||
|
"a cheap cost.<br><br>" +
|
||||||
|
"As technology progressed, however, advances in biomedical engineering paved the way for a new method of " +
|
||||||
|
"creating synthetic muscles. Instead of creating something that closely imitated the functionality " +
|
||||||
|
"of human muscle, scientists discovered a way of forcing the human body itself to augment its own " +
|
||||||
|
"muscle tissue using both synthetic and organic materials. This is typically done using gene therapy " +
|
||||||
|
"or chemical injections.";
|
||||||
|
Literatures[fn] = new Literature(title, fn, txt);
|
||||||
|
|
||||||
|
title = "Tensions rise in global tech race";
|
||||||
|
fn = "tensions-in-tech-race.lit";
|
||||||
|
txt = "Have we entered a new Cold War? Is WWIII just beyond the horizon?<br><br>" +
|
||||||
|
"After rumors came out that OmniTek Incorporated had begun developing advanced robotic supersoldiers, " +
|
||||||
|
"geopolitical tensions quickly flared between the USA, Russia, and several Asian superpowers. " +
|
||||||
|
"In a rare show of cooperation between corporations, MegaCorp and ECorp have " +
|
||||||
|
"reportedly launched hundreds of new surveillance and espionage satellites. " +
|
||||||
|
"Defense contractors such as " +
|
||||||
|
"DeltaOne and AeroCorp have been working with the CIA and NSA to prepare " +
|
||||||
|
"for conflict. Meanwhile, the rest of the world sits in earnest " +
|
||||||
|
"hoping that it never reaches full-scale war. With today's technology " +
|
||||||
|
"and firepower, a World War would assuredly mean the end of human civilization.";
|
||||||
|
Literatures[fn] = new Literature(title, fn, txt);
|
||||||
|
|
||||||
|
title = "The Cost of Immortality";
|
||||||
|
fn = "cost-of-immortality.lit";
|
||||||
|
txt = "Evolution and advances in medical and augmentation technology has lead to drastic improvements " +
|
||||||
|
"in human mortality rates. Recent figures show that the life expectancy for humans " +
|
||||||
|
"that live in a first-world country is about 130 years of age, almost double of what it was " +
|
||||||
|
"at the turn of the century. However, this increase in average lifespan has had some " +
|
||||||
|
"significant effects on society and culture.<br><br>" +
|
||||||
|
"Due to longer lifespans and a better quality of life, many adults are holding " +
|
||||||
|
"off on having kids until much later. As a result, the percentage of youth in " +
|
||||||
|
"first-world countries has been decreasing, while the number " +
|
||||||
|
"of senior citizens is significantly increasing.<br><br>" +
|
||||||
|
"Perhaps the most alarming result of all of this is the rapidly shrinking workforce. " +
|
||||||
|
"Despite the increase in life expectancy, the typical retirement age for " +
|
||||||
|
"workers in America has remained about the same, meaning a larger and larger " +
|
||||||
|
"percentage of people in America are retirees. Furthermore, many " +
|
||||||
|
"young adults are holding off on joining the workforce because they feel that " +
|
||||||
|
"they have plenty of time left in their lives for employment, and want to " +
|
||||||
|
"'enjoy life while they're young.' For most industries, this shrinking workforce " +
|
||||||
|
"is not a major issue as most things are handled by robots anyways. However, " +
|
||||||
|
"there are still several key industries such as engineering and education " +
|
||||||
|
"that have not been automated, and these remain in danger to this cultural " +
|
||||||
|
"phenomenon.";
|
||||||
|
Literatures[fn] = new Literature(title, fn, txt);
|
||||||
|
|
||||||
|
title = "The Hidden World";
|
||||||
|
fn = "the-hidden-world.lit";
|
||||||
|
txt = "WAKE UP SHEEPLE<br><br>"
|
||||||
|
"THE GOVERNMENT DOES NOT EXIST. CORPORATIONS DO NOT RUN SOCIETY<br><br>" +
|
||||||
|
"THE ILLUMINATI ARE THE SECRET RULERS OF THE WORLD!<br><br>" +
|
||||||
|
"Yes, the Illuminati of legends. The ancient secret society that controls the entire " +
|
||||||
|
"world from the shadows with their invisible hand. The group of the rich and wealthy " +
|
||||||
|
"that have penetrated every major government, financial agency, and corporation in the last " +
|
||||||
|
"three hundred years.<br><br>" +
|
||||||
|
"OPEN YOUR EYES<br><br>" +
|
||||||
|
"It was the Illuminati that brought an end to democracy in the world. They are the driving force " +
|
||||||
|
"behind everything that happens.<br><br>" +
|
||||||
|
"THEY ARE ALL AROUND YOU<br><br>" +
|
||||||
|
"After destabilizing the world's governments, they are now entering the final stage of their master plan. " +
|
||||||
|
"They will secretly initiate global crises. Terrorism. Pandemics. World War. And out of the chaos " +
|
||||||
|
"that ensues they will build their New World Order.";
|
||||||
|
Literatures[fn] = new Literature(title, fn, txt);
|
||||||
|
|
||||||
|
title = "The New God";
|
||||||
|
fn = "the-new-god.lit";
|
||||||
|
txt = "Everyone has that moment in their life where they wonder about the bigger questions<br><br>" +
|
||||||
|
"What's the point of all of this? What is my purpose?<br><br>" +
|
||||||
|
"Some people dare to think even bigger<br><br>" +
|
||||||
|
"What will be the fate of the human race?<br><br>" +
|
||||||
|
"We live in an era vastly different from that of even 15 or 20 years ago. We have gone " +
|
||||||
|
"where no man has gone before. We have stripped ourselves of the tyranny of flesh.<br><br>" +
|
||||||
|
"The Singularity is here. The merging of man and machine. This is where humanity evolves into " +
|
||||||
|
"something greater. This is our future<br><br>" +
|
||||||
|
"Embrace it, and you will obey a new god. The God in the Machine";
|
||||||
|
Literatures[fn] = new Literature(title, fn, txt);
|
||||||
|
|
||||||
|
title = "The New Triads";
|
||||||
|
fn = "new-triads.lit";
|
||||||
|
txt = "The Triads were an ancient transnational crime syndicate based in China, Hong Kong, and other Asian " +
|
||||||
|
"territories. They were often considered one of the first and biggest criminal secret societies. " +
|
||||||
|
"While most of the branches of the Triads have been destroyed over the past few decades, the " +
|
||||||
|
"crime faction has spawned and inspired a number of other Asian crime organizations over the past few years. " +
|
||||||
|
"The most notable of these is the Tetrads.<br><br>" +
|
||||||
|
"It is widely believed that the Tetrads are a rogue group that splintered off from the Triads sometime in the " +
|
||||||
|
"mid 21st century. The founders of the Tetrads, all of whom were ex-Triad members, believed that the " +
|
||||||
|
"Triads were losing their purpose and direction. The Tetrads started off as a small group that mainly engaged " +
|
||||||
|
"in fraud and extortion. They were largely unknown until just a few years ago when they took over the illegal " +
|
||||||
|
"drug trade in all of the major Asian cities. They quickly became the most powerful crime syndicate in the " +
|
||||||
|
"continent.<br><br>" +
|
||||||
|
"Not much else is known about the Tetrads, or about the efforts the Asian governments and corporations are making " +
|
||||||
|
"to take down this large new crime organization. Many believe that the Tetrads have infiltrated the governments " +
|
||||||
|
"and powerful corporations in Asia, which has helped faciliate their recent rapid rise.";
|
||||||
|
Literatures[fn] = new Literature(title, fn, txt);
|
||||||
|
|
||||||
|
title = "The Secret War";
|
||||||
|
fn = "the-secret-war.lit";
|
||||||
|
txt = ""
|
||||||
|
Literatures[fn] = new Literature(title, fn, txt);
|
||||||
}
|
}
|
||||||
|
@ -495,12 +495,21 @@ function NetscriptFunctions(workerScript) {
|
|||||||
getServerMaxMoney : function(ip){
|
getServerMaxMoney : function(ip){
|
||||||
var server = getServer(ip);
|
var server = getServer(ip);
|
||||||
if (server == null) {
|
if (server == null) {
|
||||||
workerScript.scriptRef.log("getServerRequiredHackingLevel() failed. Invalid IP or hostname passed in: " + ip);
|
workerScript.scriptRef.log("getServerMaxMoney() failed. Invalid IP or hostname passed in: " + ip);
|
||||||
throw makeRuntimeRejectMsg(workerScript, "getServerRequiredHackingLevel() failed. Invalid IP or hostname passed in: " + ip);
|
throw makeRuntimeRejectMsg(workerScript, "getServerMaxMoney() failed. Invalid IP or hostname passed in: " + ip);
|
||||||
}
|
}
|
||||||
workerScript.scriptRef.log("getServerMaxMoney() returned " + formatNumber(server.moneyMax, 0) + " for " + server.hostname);
|
workerScript.scriptRef.log("getServerMaxMoney() returned " + formatNumber(server.moneyMax, 0) + " for " + server.hostname);
|
||||||
return server.moneyMax;
|
return server.moneyMax;
|
||||||
},
|
},
|
||||||
|
getServerGrowth : function(ip) {
|
||||||
|
var server = getServer(ip);
|
||||||
|
if (server == null) {
|
||||||
|
workerScript.scriptRef.log("getServerGrowth() failed. Invalid IP or hostname passed in: " + ip);
|
||||||
|
throw makeRuntimeRejectMsg(workerScript, "getServerGrowth() failed. Invalid IP or hostname passed in: " + ip);
|
||||||
|
}
|
||||||
|
workerScript.scriptRef.log("getServerGrowth() returned " + formatNumber(server.serverGrowth, 0) + " for " + server.hostname);
|
||||||
|
return server.serverGrowth;
|
||||||
|
},
|
||||||
getServerNumPortsRequired : function(ip){
|
getServerNumPortsRequired : function(ip){
|
||||||
var server = getServer(ip);
|
var server = getServer(ip);
|
||||||
if (server == null) {
|
if (server == null) {
|
||||||
@ -555,6 +564,7 @@ function NetscriptFunctions(workerScript) {
|
|||||||
}
|
}
|
||||||
return (findRunningScript(filename, argsForTargetScript, server) != null);
|
return (findRunningScript(filename, argsForTargetScript, server) != null);
|
||||||
},
|
},
|
||||||
|
getNextHacknetNodeCost : getCostOfNextHacknetNode,
|
||||||
purchaseHacknetNode : purchaseHacknet,
|
purchaseHacknetNode : purchaseHacknet,
|
||||||
getStockPrice : function(symbol) {
|
getStockPrice : function(symbol) {
|
||||||
if (!Player.hasTixApiAccess) {
|
if (!Player.hasTixApiAccess) {
|
||||||
@ -824,13 +834,13 @@ function NetscriptFunctions(workerScript) {
|
|||||||
workerScript.scriptRef.log("getScriptRam() failed. Invalid IP or hostname passed in: " + ip);
|
workerScript.scriptRef.log("getScriptRam() failed. Invalid IP or hostname passed in: " + ip);
|
||||||
throw makeRuntimeRejectMsg(workerScript, "getScriptRam() failed. Invalid IP or hostname passed in: " + ip);
|
throw makeRuntimeRejectMsg(workerScript, "getScriptRam() failed. Invalid IP or hostname passed in: " + ip);
|
||||||
}
|
}
|
||||||
for (var i = 0; i < server.runningScripts.length; ++i) {
|
for (var i = 0; i < server.scripts.length; ++i) {
|
||||||
if (server.runningScripts[i].filename == scriptname) {
|
if (server.scripts[i].filename == scriptname) {
|
||||||
return server.runningScripts[i].scriptRef.ramUsage;
|
return server.scripts[i].ramUsage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -146,21 +146,26 @@ initForeignServers = function() {
|
|||||||
var BladeIndustriesServer = new Server(createRandomIp(), "blade", "Blade Industries", false, false, false, 0);
|
var BladeIndustriesServer = new Server(createRandomIp(), "blade", "Blade Industries", false, false, false, 0);
|
||||||
BladeIndustriesServer.setHackingParameters(getRandomInt(1000, 1100), getRandomInt(12000000000, 20000000000), getRandomInt(90, 95), getRandomInt(60, 75));
|
BladeIndustriesServer.setHackingParameters(getRandomInt(1000, 1100), getRandomInt(12000000000, 20000000000), getRandomInt(90, 95), getRandomInt(60, 75));
|
||||||
BladeIndustriesServer.setPortProperties(5);
|
BladeIndustriesServer.setPortProperties(5);
|
||||||
|
BladeIndustriesServer.messages.push("beyond-man.lit");
|
||||||
AddToAllServers(BladeIndustriesServer);
|
AddToAllServers(BladeIndustriesServer);
|
||||||
|
|
||||||
var NWOServer = new Server(createRandomIp(), "nwo", "New World Order", false, false, false, 0);
|
var NWOServer = new Server(createRandomIp(), "nwo", "New World Order", false, false, false, 0);
|
||||||
NWOServer.setHackingParameters(getRandomInt(1000, 1200), getRandomInt(25000000000, 35000000000), 99, getRandomInt(75, 85));
|
NWOServer.setHackingParameters(getRandomInt(1000, 1200), getRandomInt(25000000000, 35000000000), 99, getRandomInt(75, 85));
|
||||||
NWOServer.setPortProperties(5);
|
NWOServer.setPortProperties(5);
|
||||||
|
NWOServer.messages.push("the-hidden-world.lit");
|
||||||
AddToAllServers(NWOServer);
|
AddToAllServers(NWOServer);
|
||||||
|
|
||||||
var ClarkeIncorporatedServer = new Server(createRandomIp(), "clarkeinc", "Clarke Incorporated", false, false, false, 0);
|
var ClarkeIncorporatedServer = new Server(createRandomIp(), "clarkeinc", "Clarke Incorporated", false, false, false, 0);
|
||||||
ClarkeIncorporatedServer.setHackingParameters(getRandomInt(1000, 1200), getRandomInt(15000000000, 25000000000), getRandomInt(50, 60), getRandomInt(50, 70));
|
ClarkeIncorporatedServer.setHackingParameters(getRandomInt(1000, 1200), getRandomInt(15000000000, 25000000000), getRandomInt(50, 60), getRandomInt(50, 70));
|
||||||
ClarkeIncorporatedServer.setPortProperties(5);
|
ClarkeIncorporatedServer.setPortProperties(5);
|
||||||
|
ClarkeIncorporatedServer.messages.push("beyond-man.lit");
|
||||||
|
ClarkeIncorporatedServer.messages.push("cost-of-immortality.lit");
|
||||||
AddToAllServers(ClarkeIncorporatedServer);
|
AddToAllServers(ClarkeIncorporatedServer);
|
||||||
|
|
||||||
var OmniTekIncorporatedServer = new Server(createRandomIp(), "omnitek", "OmniTek Incorporated", false, false, false, 0);
|
var OmniTekIncorporatedServer = new Server(createRandomIp(), "omnitek", "OmniTek Incorporated", false, false, false, 0);
|
||||||
OmniTekIncorporatedServer.setHackingParameters(getRandomInt(900, 1100), getRandomInt(15000000000, 20000000000), getRandomInt(90, 99), getRandomInt(95, 99));
|
OmniTekIncorporatedServer.setHackingParameters(getRandomInt(900, 1100), getRandomInt(15000000000, 20000000000), getRandomInt(90, 99), getRandomInt(95, 99));
|
||||||
OmniTekIncorporatedServer.setPortProperties(5);
|
OmniTekIncorporatedServer.setPortProperties(5);
|
||||||
|
OmniTekIncorporatedServer.messages.push("coded-intelligence.lit");
|
||||||
AddToAllServers(OmniTekIncorporatedServer);
|
AddToAllServers(OmniTekIncorporatedServer);
|
||||||
|
|
||||||
var FourSigmaServer = new Server(createRandomIp(), "4sigma", "FourSigma", false, false, false, 0);
|
var FourSigmaServer = new Server(createRandomIp(), "4sigma", "FourSigma", false, false, false, 0);
|
||||||
@ -177,6 +182,7 @@ initForeignServers = function() {
|
|||||||
var FulcrumTechnologiesServer = new Server(createRandomIp(), "fulcrumtech", "Fulcrum Technologies", false, false, false, 64);
|
var FulcrumTechnologiesServer = new Server(createRandomIp(), "fulcrumtech", "Fulcrum Technologies", false, false, false, 64);
|
||||||
FulcrumTechnologiesServer.setHackingParameters(getRandomInt(1000, 1200), getRandomInt(1400000000, 1800000000), getRandomInt(85, 95), getRandomInt(80, 99));
|
FulcrumTechnologiesServer.setHackingParameters(getRandomInt(1000, 1200), getRandomInt(1400000000, 1800000000), getRandomInt(85, 95), getRandomInt(80, 99));
|
||||||
FulcrumTechnologiesServer.setPortProperties(5);
|
FulcrumTechnologiesServer.setPortProperties(5);
|
||||||
|
FulcrumTechnologiesServer.messages.push("simulated-reality.lit");
|
||||||
AddToAllServers(FulcrumTechnologiesServer);
|
AddToAllServers(FulcrumTechnologiesServer);
|
||||||
|
|
||||||
var FulcrumSecretTechnologiesServer = new Server(createRandomIp(), "fulcrumassets", "Fulcrum Technologies Assets", false, false, false, 0);
|
var FulcrumSecretTechnologiesServer = new Server(createRandomIp(), "fulcrumassets", "Fulcrum Technologies Assets", false, false, false, 0);
|
||||||
@ -203,11 +209,13 @@ initForeignServers = function() {
|
|||||||
var HeliosLabsServer = new Server(createRandomIp(), "helios", "Helios Labs", false, false, false, 0);
|
var HeliosLabsServer = new Server(createRandomIp(), "helios", "Helios Labs", false, false, false, 0);
|
||||||
HeliosLabsServer.setHackingParameters(getRandomInt(800, 900), getRandomInt(550000000, 750000000), getRandomInt(85, 95), getRandomInt(70, 80));
|
HeliosLabsServer.setHackingParameters(getRandomInt(800, 900), getRandomInt(550000000, 750000000), getRandomInt(85, 95), getRandomInt(70, 80));
|
||||||
HeliosLabsServer.setPortProperties(5);
|
HeliosLabsServer.setPortProperties(5);
|
||||||
|
HeliosLabsServer.messages.push("beyond-man.lit");
|
||||||
AddToAllServers(HeliosLabsServer);
|
AddToAllServers(HeliosLabsServer);
|
||||||
|
|
||||||
var VitaLifeServer = new Server(createRandomIp(), "vitalife", "VitaLife", false, false, false, 32);
|
var VitaLifeServer = new Server(createRandomIp(), "vitalife", "VitaLife", false, false, false, 32);
|
||||||
VitaLifeServer.setHackingParameters(getRandomInt(775, 900), getRandomInt(700000000, 800000000), getRandomInt(80, 90), getRandomInt(60, 80));
|
VitaLifeServer.setHackingParameters(getRandomInt(775, 900), getRandomInt(700000000, 800000000), getRandomInt(80, 90), getRandomInt(60, 80));
|
||||||
VitaLifeServer.setPortProperties(5);
|
VitaLifeServer.setPortProperties(5);
|
||||||
|
VitaLifeServer.messages.push("A-Green-Tomorrow.lit");
|
||||||
AddToAllServers(VitaLifeServer);
|
AddToAllServers(VitaLifeServer);
|
||||||
|
|
||||||
var IcarusMicrosystemsServer = new Server(createRandomIp(), "icarus", "Icarus Microsystems", false, false, false, 0);
|
var IcarusMicrosystemsServer = new Server(createRandomIp(), "icarus", "Icarus Microsystems", false, false, false, 0);
|
||||||
@ -223,16 +231,20 @@ initForeignServers = function() {
|
|||||||
var TitanLabsServer = new Server(createRandomIp(), "titan-labs", "Titan Laboratories", false, false, false, 32);
|
var TitanLabsServer = new Server(createRandomIp(), "titan-labs", "Titan Laboratories", false, false, false, 32);
|
||||||
TitanLabsServer.setHackingParameters(getRandomInt(800, 875), getRandomInt(750000000, 900000000), getRandomInt(70, 80), getRandomInt(60, 80));
|
TitanLabsServer.setHackingParameters(getRandomInt(800, 875), getRandomInt(750000000, 900000000), getRandomInt(70, 80), getRandomInt(60, 80));
|
||||||
TitanLabsServer.setPortProperties(5);
|
TitanLabsServer.setPortProperties(5);
|
||||||
|
TitanLabsServer.messages.push("coded-intelligence.lit");
|
||||||
AddToAllServers(TitanLabsServer);
|
AddToAllServers(TitanLabsServer);
|
||||||
|
|
||||||
var MicrodyneTechnologiesServer = new Server(createRandomIp(), "microdyne", "Microdyne Technologies", false, false, false, 16);
|
var MicrodyneTechnologiesServer = new Server(createRandomIp(), "microdyne", "Microdyne Technologies", false, false, false, 16);
|
||||||
MicrodyneTechnologiesServer.setHackingParameters(getRandomInt(800, 875), getRandomInt(500000000, 700000000), getRandomInt(65, 75), getRandomInt(70, 90));
|
MicrodyneTechnologiesServer.setHackingParameters(getRandomInt(800, 875), getRandomInt(500000000, 700000000), getRandomInt(65, 75), getRandomInt(70, 90));
|
||||||
MicrodyneTechnologiesServer.setPortProperties(5);
|
MicrodyneTechnologiesServer.setPortProperties(5);
|
||||||
|
MicrodyneTechnologiesServer.messages.push("synthetic-muscles.lit");
|
||||||
AddToAllServers(MicrodyneTechnologiesServer);
|
AddToAllServers(MicrodyneTechnologiesServer);
|
||||||
|
|
||||||
var TaiYangDigitalServer = new Server(createRandomIp(), "taiyang-digital", "Taiyang Digital", false, false, false, 0);
|
var TaiYangDigitalServer = new Server(createRandomIp(), "taiyang-digital", "Taiyang Digital", false, false, false, 0);
|
||||||
TaiYangDigitalServer.setHackingParameters(getRandomInt(850, 950), getRandomInt(800000000, 900000000), getRandomInt(70, 80), getRandomInt(70, 80));
|
TaiYangDigitalServer.setHackingParameters(getRandomInt(850, 950), getRandomInt(800000000, 900000000), getRandomInt(70, 80), getRandomInt(70, 80));
|
||||||
TaiYangDigitalServer.setPortProperties(5);
|
TaiYangDigitalServer.setPortProperties(5);
|
||||||
|
TaiYangDigitalServer.messages.push("A-Green-Tomorrow.lit");
|
||||||
|
TaiYangDigitalServer.messages.push("brighter-than-the-sun.lit");
|
||||||
AddToAllServers(TaiYangDigitalServer);
|
AddToAllServers(TaiYangDigitalServer);
|
||||||
|
|
||||||
var GalacticCyberSystemsServer = new Server(createRandomIp(), "galactic-cyber", "Galactic Cybersystems", false, false, false, 0);
|
var GalacticCyberSystemsServer = new Server(createRandomIp(), "galactic-cyber", "Galactic Cybersystems", false, false, false, 0);
|
||||||
@ -244,6 +256,7 @@ initForeignServers = function() {
|
|||||||
var AeroCorpServer = new Server(createRandomIp(), "aerocorp", "AeroCorp", false, false, false, 0);
|
var AeroCorpServer = new Server(createRandomIp(), "aerocorp", "AeroCorp", false, false, false, 0);
|
||||||
AeroCorpServer.setHackingParameters(getRandomInt(850, 925), getRandomInt(1000000000, 1200000000), getRandomInt(80, 90), getRandomInt(55, 65));
|
AeroCorpServer.setHackingParameters(getRandomInt(850, 925), getRandomInt(1000000000, 1200000000), getRandomInt(80, 90), getRandomInt(55, 65));
|
||||||
AeroCorpServer.setPortProperties(5);
|
AeroCorpServer.setPortProperties(5);
|
||||||
|
AeroCorpServer.messages.push("man-and-machine.lit");
|
||||||
AddToAllServers(AeroCorpServer);
|
AddToAllServers(AeroCorpServer);
|
||||||
|
|
||||||
var OmniaCybersystemsServer = new Server(createRandomIp(), "omnia", "Omnia Cybersystems", false, false, false, 0);
|
var OmniaCybersystemsServer = new Server(createRandomIp(), "omnia", "Omnia Cybersystems", false, false, false, 0);
|
||||||
@ -254,6 +267,7 @@ initForeignServers = function() {
|
|||||||
var ZBDefenseServer = new Server(createRandomIp(), "zb-def", "ZB Defense Industries", false, false, false, 0);
|
var ZBDefenseServer = new Server(createRandomIp(), "zb-def", "ZB Defense Industries", false, false, false, 0);
|
||||||
ZBDefenseServer.setHackingParameters(getRandomInt(775, 825), getRandomInt(900000000, 1100000000), getRandomInt(55, 65), getRandomInt(65, 75));
|
ZBDefenseServer.setHackingParameters(getRandomInt(775, 825), getRandomInt(900000000, 1100000000), getRandomInt(55, 65), getRandomInt(65, 75));
|
||||||
ZBDefenseServer.setPortProperties(4);
|
ZBDefenseServer.setPortProperties(4);
|
||||||
|
ZBDefenseServer.messages.push("synthetic-muscles.lit");
|
||||||
AddToAllServers(ZBDefenseServer);
|
AddToAllServers(ZBDefenseServer);
|
||||||
|
|
||||||
var AppliedEnergeticsServer = new Server(createRandomIp(), "applied-energetics", "Applied Energetics", false, false, false, 0);
|
var AppliedEnergeticsServer = new Server(createRandomIp(), "applied-energetics", "Applied Energetics", false, false, false, 0);
|
||||||
@ -264,6 +278,8 @@ initForeignServers = function() {
|
|||||||
var SolarisSpaceSystemsServer = new Server(createRandomIp(), "solaris", "Solaris Space Systems", false, false, false, 0);
|
var SolarisSpaceSystemsServer = new Server(createRandomIp(), "solaris", "Solaris Space Systems", false, false, false, 0);
|
||||||
SolarisSpaceSystemsServer.setHackingParameters(getRandomInt(750, 850), getRandomInt(700000000, 900000000), getRandomInt(70, 80), getRandomInt(70, 80));
|
SolarisSpaceSystemsServer.setHackingParameters(getRandomInt(750, 850), getRandomInt(700000000, 900000000), getRandomInt(70, 80), getRandomInt(70, 80));
|
||||||
SolarisSpaceSystemsServer.setPortProperties(5);
|
SolarisSpaceSystemsServer.setPortProperties(5);
|
||||||
|
SolarisSpaceSystemsServer.messages.push("A-Green-Tomorrow.lit");
|
||||||
|
SolarisSpaceSystemsServer.messages.push("the-failed-frontier.lit");
|
||||||
AddToAllServers(SolarisSpaceSystemsServer);
|
AddToAllServers(SolarisSpaceSystemsServer);
|
||||||
|
|
||||||
var DeltaOneServer = new Server(createRandomIp(), "deltaone", "Delta One", false, false, false, 0);
|
var DeltaOneServer = new Server(createRandomIp(), "deltaone", "Delta One", false, false, false, 0);
|
||||||
@ -275,6 +291,7 @@ initForeignServers = function() {
|
|||||||
var GlobalPharmaceuticalsServer = new Server(createRandomIp(), "global-pharm", "Global Pharmaceuticals", false, false, false, 16);
|
var GlobalPharmaceuticalsServer = new Server(createRandomIp(), "global-pharm", "Global Pharmaceuticals", false, false, false, 16);
|
||||||
GlobalPharmaceuticalsServer.setHackingParameters(getRandomInt(750, 850), getRandomInt(1500000000, 1750000000), getRandomInt(75, 85), getRandomInt(80, 90));
|
GlobalPharmaceuticalsServer.setHackingParameters(getRandomInt(750, 850), getRandomInt(1500000000, 1750000000), getRandomInt(75, 85), getRandomInt(80, 90));
|
||||||
GlobalPharmaceuticalsServer.setPortProperties(4);
|
GlobalPharmaceuticalsServer.setPortProperties(4);
|
||||||
|
GlobalPharmaceuticalsServer.messages.push("A-Green-Tomorrow.lit");
|
||||||
AddToAllServers(GlobalPharmaceuticalsServer);
|
AddToAllServers(GlobalPharmaceuticalsServer);
|
||||||
|
|
||||||
var NovaMedicalServer = new Server(createRandomIp(), "nova-med", "Nova Medical", false, false, false, 0);
|
var NovaMedicalServer = new Server(createRandomIp(), "nova-med", "Nova Medical", false, false, false, 0);
|
||||||
@ -306,9 +323,9 @@ initForeignServers = function() {
|
|||||||
var AlphaEnterprisesServer = new Server(createRandomIp(), "alpha-ent", "Alpha Enterprises", false, false, false, 0);
|
var AlphaEnterprisesServer = new Server(createRandomIp(), "alpha-ent", "Alpha Enterprises", false, false, false, 0);
|
||||||
AlphaEnterprisesServer.setHackingParameters(getRandomInt(500, 600), getRandomInt(600000000, 750000000), getRandomInt(50, 70), getRandomInt(50, 60));
|
AlphaEnterprisesServer.setHackingParameters(getRandomInt(500, 600), getRandomInt(600000000, 750000000), getRandomInt(50, 70), getRandomInt(50, 60));
|
||||||
AlphaEnterprisesServer.setPortProperties(4);
|
AlphaEnterprisesServer.setPortProperties(4);
|
||||||
|
AlphaEnterprisesServer.messages.push("sector-12-crime.lit");
|
||||||
AddToAllServers(AlphaEnterprisesServer);
|
AddToAllServers(AlphaEnterprisesServer);
|
||||||
|
|
||||||
|
|
||||||
var AevumPoliceServer = new Server(createRandomIp(), "aevum-police", "Aevum Police Network", false, false, false, 0);
|
var AevumPoliceServer = new Server(createRandomIp(), "aevum-police", "Aevum Police Network", false, false, false, 0);
|
||||||
AevumPoliceServer.setHackingParameters(getRandomInt(400, 450), getRandomInt(200000000, 400000000), getRandomInt(70, 80), getRandomInt(30, 50));
|
AevumPoliceServer.setHackingParameters(getRandomInt(400, 450), getRandomInt(200000000, 400000000), getRandomInt(70, 80), getRandomInt(30, 50));
|
||||||
AevumPoliceServer.setPortProperties(4);
|
AevumPoliceServer.setPortProperties(4);
|
||||||
@ -317,6 +334,9 @@ initForeignServers = function() {
|
|||||||
var RothmanUniversityServer = new Server(createRandomIp(), "rothman-uni", "Rothman University Network", false, false, false, 4);
|
var RothmanUniversityServer = new Server(createRandomIp(), "rothman-uni", "Rothman University Network", false, false, false, 4);
|
||||||
RothmanUniversityServer.setHackingParameters(getRandomInt(370, 430), getRandomInt(175000000, 250000000), getRandomInt(45, 55), getRandomInt(35, 45));
|
RothmanUniversityServer.setHackingParameters(getRandomInt(370, 430), getRandomInt(175000000, 250000000), getRandomInt(45, 55), getRandomInt(35, 45));
|
||||||
RothmanUniversityServer.setPortProperties(3);
|
RothmanUniversityServer.setPortProperties(3);
|
||||||
|
RothmanUniversityServer.messages.push("secret-societies.lit");
|
||||||
|
RothmanUniversityServer.messages.push("the-failed-frontier.lit");
|
||||||
|
RothmanUniversityServer.messages.push("tensions-in-tech-race.lit");
|
||||||
AddToAllServers(RothmanUniversityServer);
|
AddToAllServers(RothmanUniversityServer);
|
||||||
|
|
||||||
var ZBInstituteOfTechnologyServer = new Server(createRandomIp(), "zb-institute", "ZB Institute of Technology Network", false, false, false, 4);
|
var ZBInstituteOfTechnologyServer = new Server(createRandomIp(), "zb-institute", "ZB Institute of Technology Network", false, false, false, 4);
|
||||||
@ -327,6 +347,9 @@ initForeignServers = function() {
|
|||||||
var SummitUniversityServer = new Server(createRandomIp(), "summit-uni", "Summit University Network", false, false, false, 4);
|
var SummitUniversityServer = new Server(createRandomIp(), "summit-uni", "Summit University Network", false, false, false, 4);
|
||||||
SummitUniversityServer.setHackingParameters(getRandomInt(425, 475), getRandomInt(200000000, 350000000), getRandomInt(45, 65), getRandomInt(40, 60));
|
SummitUniversityServer.setHackingParameters(getRandomInt(425, 475), getRandomInt(200000000, 350000000), getRandomInt(45, 65), getRandomInt(40, 60));
|
||||||
SummitUniversityServer.setPortProperties(3);
|
SummitUniversityServer.setPortProperties(3);
|
||||||
|
SummitUniversityServer.messages.push("secret-societies.lit");
|
||||||
|
SummitUniversityServer.messages.push("the-failed-frontier.lit");
|
||||||
|
SummitUniversityServer.messages.push("synthetic-muscles.lit");
|
||||||
AddToAllServers(SummitUniversityServer);
|
AddToAllServers(SummitUniversityServer);
|
||||||
|
|
||||||
var SysCoreSecuritiesServer = new Server(createRandomIp(), "syscore", "SysCore Securities", false, false, false, 0);
|
var SysCoreSecuritiesServer = new Server(createRandomIp(), "syscore", "SysCore Securities", false, false, false, 0);
|
||||||
@ -337,6 +360,7 @@ initForeignServers = function() {
|
|||||||
var CatalystVenturesServer = new Server(createRandomIp(), "catalyst", "Catalyst Ventures", false, false, false, 0);
|
var CatalystVenturesServer = new Server(createRandomIp(), "catalyst", "Catalyst Ventures", false, false, false, 0);
|
||||||
CatalystVenturesServer.setHackingParameters(getRandomInt(400, 450), getRandomInt(300000000, 550000000), getRandomInt(60, 70), getRandomInt(25, 55));
|
CatalystVenturesServer.setHackingParameters(getRandomInt(400, 450), getRandomInt(300000000, 550000000), getRandomInt(60, 70), getRandomInt(25, 55));
|
||||||
CatalystVenturesServer.setPortProperties(3);
|
CatalystVenturesServer.setPortProperties(3);
|
||||||
|
CatalystVenturesServer.messages.push("tensions-in-tech-race.lit");
|
||||||
AddToAllServers(CatalystVenturesServer);
|
AddToAllServers(CatalystVenturesServer);
|
||||||
|
|
||||||
var TheHubServer = new Server(createRandomIp(), "the-hub", "The Hub", false, false, false, 0);
|
var TheHubServer = new Server(createRandomIp(), "the-hub", "The Hub", false, false, false, 0);
|
||||||
@ -347,11 +371,13 @@ initForeignServers = function() {
|
|||||||
var CompuTekServer = new Server(createRandomIp(), "comptek", "CompuTek", false, false, false, 8);
|
var CompuTekServer = new Server(createRandomIp(), "comptek", "CompuTek", false, false, false, 8);
|
||||||
CompuTekServer.setHackingParameters(getRandomInt(300, 400), getRandomInt(220000000, 250000000), getRandomInt(55, 65), getRandomInt(45, 65));
|
CompuTekServer.setHackingParameters(getRandomInt(300, 400), getRandomInt(220000000, 250000000), getRandomInt(55, 65), getRandomInt(45, 65));
|
||||||
CompuTekServer.setPortProperties(3);
|
CompuTekServer.setPortProperties(3);
|
||||||
|
CompuTekServer.messages.push("man-and-machine.lit");
|
||||||
AddToAllServers(CompuTekServer);
|
AddToAllServers(CompuTekServer);
|
||||||
|
|
||||||
var NetLinkTechnologiesServer = new Server(createRandomIp(), "netlink", "NetLink Technologies", false, false, false, 0);
|
var NetLinkTechnologiesServer = new Server(createRandomIp(), "netlink", "NetLink Technologies", false, false, false, 0);
|
||||||
NetLinkTechnologiesServer.setHackingParameters(getRandomInt(375, 425), 275000000, getRandomInt(60, 80), getRandomInt(45, 75));
|
NetLinkTechnologiesServer.setHackingParameters(getRandomInt(375, 425), 275000000, getRandomInt(60, 80), getRandomInt(45, 75));
|
||||||
NetLinkTechnologiesServer.setPortProperties(3);
|
NetLinkTechnologiesServer.setPortProperties(3);
|
||||||
|
NetLinkTechnologiesServer.messages.push("simulated-reality.lit");
|
||||||
AddToAllServers(NetLinkTechnologiesServer);
|
AddToAllServers(NetLinkTechnologiesServer);
|
||||||
|
|
||||||
var JohnsonOrthopedicsServer = new Server(createRandomIp(), "johnson-ortho", "Johnson Orthopedics", false, false, false, 4);
|
var JohnsonOrthopedicsServer = new Server(createRandomIp(), "johnson-ortho", "Johnson Orthopedics", false, false, false, 4);
|
||||||
@ -363,6 +389,7 @@ initForeignServers = function() {
|
|||||||
var FoodNStuffServer = new Server(createRandomIp(), "foodnstuff", "Food N Stuff Supermarket", false, false, false, 8);
|
var FoodNStuffServer = new Server(createRandomIp(), "foodnstuff", "Food N Stuff Supermarket", false, false, false, 8);
|
||||||
FoodNStuffServer.setHackingParameters(1, 2000000, 10, 5);
|
FoodNStuffServer.setHackingParameters(1, 2000000, 10, 5);
|
||||||
FoodNStuffServer.setPortProperties(0);
|
FoodNStuffServer.setPortProperties(0);
|
||||||
|
FoodNStuffServer.messages.push("sector-12-crime.lit");
|
||||||
AddToAllServers(FoodNStuffServer);
|
AddToAllServers(FoodNStuffServer);
|
||||||
|
|
||||||
var SigmaCosmeticsServer = new Server(createRandomIp(), "sigma-cosmetics", "Sigma Cosmetics", false, false, false, 8);
|
var SigmaCosmeticsServer = new Server(createRandomIp(), "sigma-cosmetics", "Sigma Cosmetics", false, false, false, 8);
|
||||||
@ -388,16 +415,19 @@ initForeignServers = function() {
|
|||||||
var NeoNightclubServer = new Server(createRandomIp(), "neo-net", "Neo Nightclub Network", false, false, false, 4);
|
var NeoNightclubServer = new Server(createRandomIp(), "neo-net", "Neo Nightclub Network", false, false, false, 4);
|
||||||
NeoNightclubServer.setHackingParameters(50, 5000000, 25, 25);
|
NeoNightclubServer.setHackingParameters(50, 5000000, 25, 25);
|
||||||
NeoNightclubServer.setPortProperties(1);
|
NeoNightclubServer.setPortProperties(1);
|
||||||
|
NeoNightclubServer.messages.push("the-hidden-world.lit");
|
||||||
AddToAllServers(NeoNightclubServer);
|
AddToAllServers(NeoNightclubServer);
|
||||||
|
|
||||||
var SilverHelixServer = new Server(createRandomIp(), "silver-helix", "Silver Helix", false, false, false, 2);
|
var SilverHelixServer = new Server(createRandomIp(), "silver-helix", "Silver Helix", false, false, false, 2);
|
||||||
SilverHelixServer.setHackingParameters(150, 45000000, 30, 30);
|
SilverHelixServer.setHackingParameters(150, 45000000, 30, 30);
|
||||||
SilverHelixServer.setPortProperties(2);
|
SilverHelixServer.setPortProperties(2);
|
||||||
|
SilverHelixServer.messages.push("new-triads.lit");
|
||||||
AddToAllServers(SilverHelixServer);
|
AddToAllServers(SilverHelixServer);
|
||||||
|
|
||||||
var HongFangTeaHouseServer = new Server(createRandomIp(), "hong-fang-tea", "HongFang Teahouse", false, false, false, 8);
|
var HongFangTeaHouseServer = new Server(createRandomIp(), "hong-fang-tea", "HongFang Teahouse", false, false, false, 8);
|
||||||
HongFangTeaHouseServer.setHackingParameters(30, 3000000, 15, 20);
|
HongFangTeaHouseServer.setHackingParameters(30, 3000000, 15, 20);
|
||||||
HongFangTeaHouseServer.setPortProperties(0);
|
HongFangTeaHouseServer.setPortProperties(0);
|
||||||
|
HongFangTeaHouseServer.messages.push("brighter-than-the-sun.lit");
|
||||||
AddToAllServers(HongFangTeaHouseServer);
|
AddToAllServers(HongFangTeaHouseServer);
|
||||||
|
|
||||||
var HaraKiriSushiBarServer = new Server(createRandomIp(), "harakiri-sushi", "HaraKiri Sushi Bar Network", false, false, false, 8);
|
var HaraKiriSushiBarServer = new Server(createRandomIp(), "harakiri-sushi", "HaraKiri Sushi Bar Network", false, false, false, 8);
|
||||||
@ -418,6 +448,7 @@ initForeignServers = function() {
|
|||||||
var OmegaSoftwareServer = new Server(createRandomIp(), "omega-net", "Omega Software", false, false, false, 8);
|
var OmegaSoftwareServer = new Server(createRandomIp(), "omega-net", "Omega Software", false, false, false, 8);
|
||||||
OmegaSoftwareServer.setHackingParameters(getRandomInt(180, 220), getRandomInt(60000000, 70000000), getRandomInt(25, 35), getRandomInt(30, 40));
|
OmegaSoftwareServer.setHackingParameters(getRandomInt(180, 220), getRandomInt(60000000, 70000000), getRandomInt(25, 35), getRandomInt(30, 40));
|
||||||
OmegaSoftwareServer.setPortProperties(2);
|
OmegaSoftwareServer.setPortProperties(2);
|
||||||
|
OmegaSoftwareServer.messages.push("the-new-god.lit");
|
||||||
AddToAllServers(OmegaSoftwareServer);
|
AddToAllServers(OmegaSoftwareServer);
|
||||||
|
|
||||||
//Gyms
|
//Gyms
|
||||||
@ -450,18 +481,22 @@ initForeignServers = function() {
|
|||||||
var BitRunnersServer = new Server(createRandomIp(), "run4theh111z", "The Runners", false, false, false, 0);
|
var BitRunnersServer = new Server(createRandomIp(), "run4theh111z", "The Runners", false, false, false, 0);
|
||||||
BitRunnersServer.setHackingParameters(getRandomInt(505, 550), 0, 0, 0);
|
BitRunnersServer.setHackingParameters(getRandomInt(505, 550), 0, 0, 0);
|
||||||
BitRunnersServer.setPortProperties(4);
|
BitRunnersServer.setPortProperties(4);
|
||||||
|
BitRunnersServer.messages.push("simulated-reality.lit");
|
||||||
|
BitRunnersServer.messages.push("the-new-god.lit");
|
||||||
AddToAllServers(BitRunnersServer);
|
AddToAllServers(BitRunnersServer);
|
||||||
SpecialServerIps.addIp(SpecialServerNames.BitRunnersServer, BitRunnersServer.ip);
|
SpecialServerIps.addIp(SpecialServerNames.BitRunnersServer, BitRunnersServer.ip);
|
||||||
|
|
||||||
var TheBlackHandServer = new Server(createRandomIp(), "I.I.I.I", "I.I.I.I", false, false, false, 0);
|
var TheBlackHandServer = new Server(createRandomIp(), "I.I.I.I", "I.I.I.I", false, false, false, 0);
|
||||||
TheBlackHandServer.setHackingParameters(getRandomInt(340, 365), 0, 0, 0);
|
TheBlackHandServer.setHackingParameters(getRandomInt(340, 365), 0, 0, 0);
|
||||||
TheBlackHandServer.setPortProperties(3);
|
TheBlackHandServer.setPortProperties(3);
|
||||||
|
TheBlackHandServer.messages.push("democracy-is-dead.lit");
|
||||||
AddToAllServers(TheBlackHandServer);
|
AddToAllServers(TheBlackHandServer);
|
||||||
SpecialServerIps.addIp(SpecialServerNames.TheBlackHandServer, TheBlackHandServer.ip);
|
SpecialServerIps.addIp(SpecialServerNames.TheBlackHandServer, TheBlackHandServer.ip);
|
||||||
|
|
||||||
var NiteSecServer = new Server(createRandomIp(), "avmnite-02h", "NiteSec", false, false, false, 0);
|
var NiteSecServer = new Server(createRandomIp(), "avmnite-02h", "NiteSec", false, false, false, 0);
|
||||||
NiteSecServer.setHackingParameters(getRandomInt(202, 220), 0, 0, 0);
|
NiteSecServer.setHackingParameters(getRandomInt(202, 220), 0, 0, 0);
|
||||||
NiteSecServer.setPortProperties(2);
|
NiteSecServer.setPortProperties(2);
|
||||||
|
NiteSecServer.messages.push("democracy-is-dead.lit");
|
||||||
AddToAllServers(NiteSecServer);
|
AddToAllServers(NiteSecServer);
|
||||||
SpecialServerIps.addIp(SpecialServerNames.NiteSecServer, NiteSecServer.ip);
|
SpecialServerIps.addIp(SpecialServerNames.NiteSecServer, NiteSecServer.ip);
|
||||||
|
|
||||||
@ -474,12 +509,14 @@ initForeignServers = function() {
|
|||||||
var CyberSecServer = new Server(createRandomIp(), "CSEC", "CyberSec", false, false, false, 0);
|
var CyberSecServer = new Server(createRandomIp(), "CSEC", "CyberSec", false, false, false, 0);
|
||||||
CyberSecServer.setHackingParameters(getRandomInt(51, 60), 0, 0, 0);
|
CyberSecServer.setHackingParameters(getRandomInt(51, 60), 0, 0, 0);
|
||||||
CyberSecServer.setPortProperties(1);
|
CyberSecServer.setPortProperties(1);
|
||||||
|
CyberSecServer.messages.push("democracy-is-dead.lit");
|
||||||
AddToAllServers(CyberSecServer);
|
AddToAllServers(CyberSecServer);
|
||||||
SpecialServerIps.addIp(SpecialServerNames.CyberSecServer, CyberSecServer.ip);
|
SpecialServerIps.addIp(SpecialServerNames.CyberSecServer, CyberSecServer.ip);
|
||||||
|
|
||||||
var DaedalusServer = new Server(createRandomIp(), "The-Cave", "Helios", false, false, false, 0);
|
var DaedalusServer = new Server(createRandomIp(), "The-Cave", "Helios", false, false, false, 0);
|
||||||
DaedalusServer.setHackingParameters(925, 0, 0, 0);
|
DaedalusServer.setHackingParameters(925, 0, 0, 0);
|
||||||
DaedalusServer.setPortProperties(5);
|
DaedalusServer.setPortProperties(5);
|
||||||
|
DaedalusServer.messages.push("alpha-omega.lit");
|
||||||
AddToAllServers(DaedalusServer);
|
AddToAllServers(DaedalusServer);
|
||||||
SpecialServerIps.addIp(SpecialServerNames.DaedalusServer, DaedalusServer.ip);
|
SpecialServerIps.addIp(SpecialServerNames.DaedalusServer, DaedalusServer.ip);
|
||||||
|
|
||||||
|
@ -285,6 +285,18 @@ function determineAllPossibilitiesForTabCompletion(input, index=0) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (input.startsWith("scp ") && index == 0) {
|
||||||
|
//All Scripts and lit files
|
||||||
|
for (var i = 0; i < currServ.scripts.length; ++i) {
|
||||||
|
allPos.push(currServ.scripts[i].filename);
|
||||||
|
}
|
||||||
|
for (var i = 0; i < currServ.messages.length; ++i) {
|
||||||
|
if (!(currServ.messages[i] instanceof Message)) {
|
||||||
|
allPos.push(currServ.messages[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (input.startsWith("connect ") || input.startsWith("telnet ")) {
|
if (input.startsWith("connect ") || input.startsWith("telnet ")) {
|
||||||
//All network connections
|
//All network connections
|
||||||
for (var i = 0; i < currServ.serversOnNetwork.length; ++i) {
|
for (var i = 0; i < currServ.serversOnNetwork.length; ++i) {
|
||||||
@ -298,8 +310,7 @@ function determineAllPossibilitiesForTabCompletion(input, index=0) {
|
|||||||
|
|
||||||
if (input.startsWith("kill ") || input.startsWith("nano ") ||
|
if (input.startsWith("kill ") || input.startsWith("nano ") ||
|
||||||
input.startsWith("tail ") || input.startsWith("rm ") ||
|
input.startsWith("tail ") || input.startsWith("rm ") ||
|
||||||
input.startsWith("mem ") || input.startsWith("check ") ||
|
input.startsWith("mem ") || input.startsWith("check ")) {
|
||||||
(input.startsWith("scp ") && index == 0)) {
|
|
||||||
//All Scripts
|
//All Scripts
|
||||||
for (var i = 0; i < currServ.scripts.length; ++i) {
|
for (var i = 0; i < currServ.scripts.length; ++i) {
|
||||||
allPos.push(currServ.scripts[i].filename);
|
allPos.push(currServ.scripts[i].filename);
|
||||||
@ -323,7 +334,12 @@ function determineAllPossibilitiesForTabCompletion(input, index=0) {
|
|||||||
|
|
||||||
if (input.startsWith("cat ")) {
|
if (input.startsWith("cat ")) {
|
||||||
for (var i = 0; i < currServ.messages.length; ++i) {
|
for (var i = 0; i < currServ.messages.length; ++i) {
|
||||||
allPos.push(currServ.messages[i].filename);
|
if (currServ.messages[i] instanceof Message) {
|
||||||
|
allPos.push(currServ.messages[i].filename);
|
||||||
|
} else {
|
||||||
|
allPos.push(currServ.messages[i]);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return allPos;
|
return allPos;
|
||||||
}
|
}
|
||||||
@ -658,15 +674,18 @@ var Terminal = {
|
|||||||
break;
|
break;
|
||||||
case "cat":
|
case "cat":
|
||||||
if (commandArray.length != 2) {
|
if (commandArray.length != 2) {
|
||||||
post("Incorrect usage of cat command. Usage: cat [message]"); return;
|
post("Incorrect usage of cat command. Usage: cat [file]"); return;
|
||||||
}
|
}
|
||||||
var filename = commandArray[1];
|
var filename = commandArray[1];
|
||||||
//Can only edit script files
|
//Can only edit script files
|
||||||
if (filename.endsWith(".msg") == false) {
|
if (!filename.endsWith(".msg") && !filename.endsWith(".lit")) {
|
||||||
post("Error: Only .msg files are viewable with cat (filename must end with .msg)"); return;
|
post("Error: Only .msg and .lit files are viewable with cat (filename must end with .msg or .lit)"); return;
|
||||||
}
|
}
|
||||||
for (var i = 0; i < s.messages.length; ++i) {
|
for (var i = 0; i < s.messages.length; ++i) {
|
||||||
if (s.messages[i].filename == filename) {
|
if (filename.endsWith(".lit") && s.messages[i] == filename) {
|
||||||
|
showLiterature(s.messages[i]);
|
||||||
|
return;
|
||||||
|
} else if (filename.endsWith(".msg") && s.messages[i].filename == filename) {
|
||||||
showMessage(s.messages[i]);
|
showMessage(s.messages[i]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -962,24 +981,55 @@ var Terminal = {
|
|||||||
break;
|
break;
|
||||||
case "scp":
|
case "scp":
|
||||||
if (commandArray.length != 2) {
|
if (commandArray.length != 2) {
|
||||||
post("Incorrect usage of scp command. Usage: scp [scriptname] [destination hostname/ip]");
|
post("Incorrect usage of scp command. Usage: scp [file] [destination hostname/ip]");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var args = commandArray[1].split(" ");
|
var args = commandArray[1].split(" ");
|
||||||
if (args.length != 2) {
|
if (args.length != 2) {
|
||||||
post("Incorrect usage of scp command. Usage: scp [scriptname] [destination hostname/ip]");
|
post("Incorrect usage of scp command. Usage: scp [file] [destination hostname/ip]");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var scriptname = args[0];
|
var scriptname = args[0];
|
||||||
|
if (!scriptname.endsWith(".lit") && !scriptname.endsWith(".script")){
|
||||||
|
post("Error: scp only works for .script and .lit files");
|
||||||
|
return;
|
||||||
|
}
|
||||||
var server = getServer(args[1]);
|
var server = getServer(args[1]);
|
||||||
if (server == null) {
|
if (server == null) {
|
||||||
post("Invalid destination. " + args[1] + " not found");
|
post("Invalid destination. " + args[1] + " not found");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var ip = server.ip;
|
var ip = server.ip;
|
||||||
|
|
||||||
var currServ = Player.getCurrentServer();
|
var currServ = Player.getCurrentServer();
|
||||||
|
|
||||||
|
//Scp for lit files
|
||||||
|
if (scriptname.endsWith(".lit")) {
|
||||||
|
var found = false;
|
||||||
|
var curr
|
||||||
|
for (var i = 0; i < currServ.messages.length; ++i) {
|
||||||
|
if (!(currServ.messages[i] instanceof Message) && currServ.messages[i] == scriptname) {
|
||||||
|
found = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!found) {
|
||||||
|
post("Error: no such file exists!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var i = 0; i < server.messages.length; ++i) {
|
||||||
|
if (server.messages[i] === scriptname) {
|
||||||
|
post(scriptname + " copied over to " + server.hostname);
|
||||||
|
return; //Already exists
|
||||||
|
}
|
||||||
|
}
|
||||||
|
server.messages.push(scriptname);
|
||||||
|
post(scriptname + " copied over to " + server.hostname);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Get the current script
|
//Get the current script
|
||||||
var sourceScript = null;
|
var sourceScript = null;
|
||||||
for (var i = 0; i < currServ.scripts.length; ++i) {
|
for (var i = 0; i < currServ.scripts.length; ++i) {
|
||||||
@ -1156,7 +1206,6 @@ var Terminal = {
|
|||||||
post("Incorrect usage of ls command. Usage: ls [| grep pattern]"); return;
|
post("Incorrect usage of ls command. Usage: ls [| grep pattern]"); return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//grep
|
//grep
|
||||||
var filter = null;
|
var filter = null;
|
||||||
if (commandArray.length == 2) {
|
if (commandArray.length == 2) {
|
||||||
@ -1196,11 +1245,19 @@ var Terminal = {
|
|||||||
}
|
}
|
||||||
for (var i = 0; i < s.messages.length; i++) {
|
for (var i = 0; i < s.messages.length; i++) {
|
||||||
if (filter) {
|
if (filter) {
|
||||||
if (s.messages[i].filename.includes(filter)) {
|
if (s.messages[i] instanceof Message) {
|
||||||
allFiles.push(s.messages[i].filename);
|
if (s.messages[i].filename.includes(filter)) {
|
||||||
|
allFiles.push(s.messages[i].filename);
|
||||||
|
}
|
||||||
|
} else if (s.messages[i].includes(filter)) {
|
||||||
|
allFiles.push(s.messages[i]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
allFiles.push(s.messages[i].filename);
|
if (s.messages[i] instanceof Message) {
|
||||||
|
allFiles.push(s.messages[i].filename);
|
||||||
|
} else {
|
||||||
|
allFiles.push(s.messages[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -778,6 +778,7 @@ var Engine = {
|
|||||||
autoSaveCounter: 300, //Autosave every minute
|
autoSaveCounter: 300, //Autosave every minute
|
||||||
updateSkillLevelsCounter: 10, //Only update skill levels every 2 seconds. Might improve performance
|
updateSkillLevelsCounter: 10, //Only update skill levels every 2 seconds. Might improve performance
|
||||||
updateDisplays: 3, //Update displays such as Active Scripts display and character display
|
updateDisplays: 3, //Update displays such as Active Scripts display and character display
|
||||||
|
updateDisplaysMed: 9,
|
||||||
updateDisplaysLong: 15,
|
updateDisplaysLong: 15,
|
||||||
createProgramNotifications: 10, //Checks whether any programs can be created and notifies
|
createProgramNotifications: 10, //Checks whether any programs can be created and notifies
|
||||||
checkFactionInvitations: 100, //Check whether you qualify for any faction invitations
|
checkFactionInvitations: 100, //Check whether you qualify for any faction invitations
|
||||||
@ -811,9 +812,7 @@ var Engine = {
|
|||||||
|
|
||||||
if (Engine.Counters.updateDisplays <= 0) {
|
if (Engine.Counters.updateDisplays <= 0) {
|
||||||
Engine.displayCharacterOverviewInfo();
|
Engine.displayCharacterOverviewInfo();
|
||||||
if (Engine.currentPage == Engine.Page.ActiveScripts) {
|
if (Engine.currentPage == Engine.Page.CharacterInfo) {
|
||||||
updateActiveScriptsItems();
|
|
||||||
} else if (Engine.currentPage == Engine.Page.CharacterInfo) {
|
|
||||||
Engine.displayCharacterInfo();
|
Engine.displayCharacterInfo();
|
||||||
} else if (Engine.currentPage == Engine.Page.HacknetNodes) {
|
} else if (Engine.currentPage == Engine.Page.HacknetNodes) {
|
||||||
updateHacknetNodesContent();
|
updateHacknetNodesContent();
|
||||||
@ -828,6 +827,13 @@ var Engine = {
|
|||||||
Engine.Counters.updateDisplays = 3;
|
Engine.Counters.updateDisplays = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Engine.Counters.updateDisplaysMed <= 0) {
|
||||||
|
if (Engine.currentPage == Engine.Page.ActiveScripts) {
|
||||||
|
updateActiveScriptsItems();
|
||||||
|
}
|
||||||
|
Engine.Counters.updateDisplaysMed = 9;
|
||||||
|
}
|
||||||
|
|
||||||
if (Engine.Counters.updateDisplaysLong <= 0) {
|
if (Engine.Counters.updateDisplaysLong <= 0) {
|
||||||
if (Engine.currentPage === Engine.Page.Gang) {
|
if (Engine.currentPage === Engine.Page.Gang) {
|
||||||
updateGangContent();
|
updateGangContent();
|
||||||
@ -982,6 +988,7 @@ var Engine = {
|
|||||||
if (Player.hasWseAccount) {
|
if (Player.hasWseAccount) {
|
||||||
initSymbolToStockMap();
|
initSymbolToStockMap();
|
||||||
}
|
}
|
||||||
|
initLiterature();
|
||||||
|
|
||||||
//Calculate the number of cycles have elapsed while offline
|
//Calculate the number of cycles have elapsed while offline
|
||||||
Engine._lastUpdate = new Date().getTime();
|
Engine._lastUpdate = new Date().getTime();
|
||||||
@ -1086,6 +1093,7 @@ var Engine = {
|
|||||||
initAugmentations();
|
initAugmentations();
|
||||||
initMessages();
|
initMessages();
|
||||||
initStockSymbols();
|
initStockSymbols();
|
||||||
|
initLiterature();
|
||||||
|
|
||||||
//Open main menu accordions for new game
|
//Open main menu accordions for new game
|
||||||
//Main menu accordions
|
//Main menu accordions
|
||||||
|
Loading…
Reference in New Issue
Block a user