summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlmightyMiau <almightymeow612@gmail.com>2024-11-13 10:56:53 -0800
committerAlmightyMiau <almightymeow612@gmail.com>2024-11-13 10:56:53 -0800
commit40843e35434d56e883655e4377994ac76746b184 (patch)
tree786c3acc109b4add11c88ca58a534fd19d4e77cb
parent1ca00b3b73a9699e41f81e154cea32934c16de03 (diff)
Organized scripts into folders
-rw-r--r--README.md28
-rw-r--r--batch/batch.js (renamed from bitburnerFiles1026/batch/batch.js)0
-rw-r--r--batch/batcher.js (renamed from bitburnerFiles1026/batch/batcher.js)0
-rw-r--r--batch/chef.js (renamed from bitburnerFiles1026/batch/chef.js)0
-rw-r--r--batch/grow.js (renamed from bitburnerFiles1026/batch/grow.js)0
-rw-r--r--batch/hack.js (renamed from bitburnerFiles1026/batch/hack.js)0
-rw-r--r--batch/weaken.js (renamed from bitburnerFiles1026/batch/weaken.js)0
-rw-r--r--bitburnerFiles1026/scripts.txt31
-rw-r--r--hack.js (renamed from bitburnerFiles1026/hack.js)23
-rw-r--r--misc/autoinfiltrate.js (renamed from bitburnerFiles1026/autoinfiltrate.js)0
-rw-r--r--misc/delete.js (renamed from bitburnerFiles1026/delete.js)0
-rw-r--r--misc/install.js (renamed from bitburnerFiles1026/install.js)0
-rw-r--r--misc/monitor.js (renamed from bitburnerFiles1026/monitor.js)0
-rw-r--r--misc/route.js (renamed from bitburnerFiles1026/route.js)0
-rw-r--r--misc/run.js (renamed from bitburnerFiles1026/run.js)0
-rw-r--r--misc/servers.txt (renamed from bitburnerFiles1026/servers.txt)0
-rw-r--r--misc/target.js (renamed from bitburnerFiles1026/target.js)0
-rw-r--r--misc/targets.js (renamed from bitburnerFiles1026/targets.js)0
-rw-r--r--misc/targets.txt (renamed from bitburnerFiles1026/targets.txt)0
-rw-r--r--misc/test.js (renamed from bitburnerFiles1026/test.js)0
-rw-r--r--misc/threads.js (renamed from bitburnerFiles1026/threads.js)0
-rw-r--r--moneyServers.txt (renamed from bitburnerFiles1026/moneyServers.txt)0
-rw-r--r--servers/0port.txt (renamed from bitburnerFiles1026/0port.txt)0
-rw-r--r--servers/1port.txt (renamed from bitburnerFiles1026/1port.txt)0
-rw-r--r--servers/2port.txt (renamed from bitburnerFiles1026/2port.txt)0
-rw-r--r--servers/3port.txt (renamed from bitburnerFiles1026/3port.txt)0
-rw-r--r--servers/4port.txt (renamed from bitburnerFiles1026/4port.txt)0
-rw-r--r--servers/5port.txt (renamed from bitburnerFiles1026/5port.txt)0
-rw-r--r--shell/java.js (renamed from bitburnerFiles1026/shell/java.js)0
-rw-r--r--shell/js.js (renamed from bitburnerFiles1026/shell/js.js)0
-rw-r--r--start.js (renamed from bitburnerFiles1026/start.js)56
-rw-r--r--start/augbaseprice.txt (renamed from bitburnerFiles1026/augbaseprice.txt)0
-rw-r--r--start/augments.js (renamed from bitburnerFiles1026/augments.js)0
-rw-r--r--start/buyservers.js (renamed from bitburnerFiles1026/servers.js)0
-rw-r--r--start/hacker.js (renamed from bitburnerFiles1026/hwgw/hacker.js)0
-rw-r--r--start/hacknet2.js (renamed from bitburnerFiles1026/hacknet2.js)0
-rw-r--r--start/home.js (renamed from bitburnerFiles1026/home.js)0
-rw-r--r--start/milestones.js (renamed from bitburnerFiles1026/milestones.js)0
-rw-r--r--start/root.js (renamed from bitburnerFiles1026/root.js)0
-rw-r--r--start/tempgrow.js (renamed from bitburnerFiles1026/tempgrow.js)0
-rw-r--r--start/temphack.js (renamed from bitburnerFiles1026/temphack.js)5
-rw-r--r--stocks/liquidate.js (renamed from bitburnerFiles1026/liquidate.js)0
-rw-r--r--stocks/maxprice.txt (renamed from bitburnerFiles1026/maxprice.txt)0
-rw-r--r--stocks/minprice.txt (renamed from bitburnerFiles1026/minprice.txt)0
-rw-r--r--stocks/stocker.js (renamed from bitburnerFiles1026/stocker.js)6
-rw-r--r--stocks/stockgains.txt (renamed from bitburnerFiles1026/stockgains.txt)0
-rw-r--r--stocks/stocks.js (renamed from bitburnerFiles1026/stocks.js)0
47 files changed, 68 insertions, 81 deletions
diff --git a/README.md b/README.md
index df68a56..c3a7c51 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,27 @@
-# Bitburner
+start.js
+ (hacknet2.js) runs hacknet,
+ (root.js) hacks a single server using all servers (inefficient),
+ (servers.js) purchases all pservs,
+ stocker.js (ineffiecient)
+
+hwgw/hacker.js
+ hacks every server
+
+autoinfiltrate.js
+ run to enable automatic infiltration of companies
+
+delete.js
+ deletes a currently owned pserv
+
+liquidate.js
+ sells all stocks
+
+run.js
+ runs a script on a server at the maximum threads possible
+
+target.js
+ finds the target server with the most money for a given port level
+
+targets.js
+ finds all servers with money on them
+
diff --git a/bitburnerFiles1026/batch/batch.js b/batch/batch.js
index c5cb7f5..c5cb7f5 100644
--- a/bitburnerFiles1026/batch/batch.js
+++ b/batch/batch.js
diff --git a/bitburnerFiles1026/batch/batcher.js b/batch/batcher.js
index e3c1546..e3c1546 100644
--- a/bitburnerFiles1026/batch/batcher.js
+++ b/batch/batcher.js
diff --git a/bitburnerFiles1026/batch/chef.js b/batch/chef.js
index bead946..bead946 100644
--- a/bitburnerFiles1026/batch/chef.js
+++ b/batch/chef.js
diff --git a/bitburnerFiles1026/batch/grow.js b/batch/grow.js
index 62f7f9d..62f7f9d 100644
--- a/bitburnerFiles1026/batch/grow.js
+++ b/batch/grow.js
diff --git a/bitburnerFiles1026/batch/hack.js b/batch/hack.js
index e21bbb1..e21bbb1 100644
--- a/bitburnerFiles1026/batch/hack.js
+++ b/batch/hack.js
diff --git a/bitburnerFiles1026/batch/weaken.js b/batch/weaken.js
index 046cfa6..046cfa6 100644
--- a/bitburnerFiles1026/batch/weaken.js
+++ b/batch/weaken.js
diff --git a/bitburnerFiles1026/scripts.txt b/bitburnerFiles1026/scripts.txt
deleted file mode 100644
index e636a8a..0000000
--- a/bitburnerFiles1026/scripts.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-start.js
- (hacknet2.js) runs hacknet,
- (root.js) hacks a single server using all servers (inefficient),
- (servers.js) purchases all pservs,
- stocker.js (ineffiecient)
-
-hwgw/hacker.js
- hacks every server
-
-autoinfiltrate.js
- run to enable automatic infiltration of companies
-
-delete.js
- deletes a currently owned pserv
-
-liquidate.js
- sells all stocks
-
-master.js
- singularity api testing script
- controls all things from the singularity api
-
-run.js
- runs a script on a server at the maximum threads possible
-
-target.js
- finds the target server with the most money for a given port level
-
-targets.js
- finds all servers with money on them
-
diff --git a/bitburnerFiles1026/hack.js b/hack.js
index 1a01041..7b19355 100644
--- a/bitburnerFiles1026/hack.js
+++ b/hack.js
@@ -10,22 +10,8 @@ export async function main(ns) {
}
let debug = ns.args[1];
- if (debug == true) {
- ns.enableLog("weaken");
- ns.enableLog("grow");
- ns.enableLog("hack");
- ns.enableLog("getServerSecurityLevel");
- ns.enableLog("getServerMoneyAvailable");
- ns.enableLog("getServerMaxMoney");
- ns.enableLog("getServerMinSecurityLevel");
- } else {
- ns.disableLog("weaken");
- ns.disableLog("grow");
- ns.disableLog("hack");
- ns.disableLog("getServerSecurityLevel");
- ns.disableLog("getServerMoneyAvailable");
- ns.disableLog("getServerMaxMoney");
- ns.disableLog("getServerMinSecurityLevel");
+ if (debug == false) {
+ ns.disablelog("ALL");
}
@@ -48,4 +34,7 @@ export async function main(ns) {
await ns.hack(target);
}
}
-} \ No newline at end of file
+}
+
+// hacks a server endlessly
+
diff --git a/bitburnerFiles1026/autoinfiltrate.js b/misc/autoinfiltrate.js
index eb7717f..eb7717f 100644
--- a/bitburnerFiles1026/autoinfiltrate.js
+++ b/misc/autoinfiltrate.js
diff --git a/bitburnerFiles1026/delete.js b/misc/delete.js
index 0ba3232..0ba3232 100644
--- a/bitburnerFiles1026/delete.js
+++ b/misc/delete.js
diff --git a/bitburnerFiles1026/install.js b/misc/install.js
index ecbe449..ecbe449 100644
--- a/bitburnerFiles1026/install.js
+++ b/misc/install.js
diff --git a/bitburnerFiles1026/monitor.js b/misc/monitor.js
index 50cf4a4..50cf4a4 100644
--- a/bitburnerFiles1026/monitor.js
+++ b/misc/monitor.js
diff --git a/bitburnerFiles1026/route.js b/misc/route.js
index 97d814a..97d814a 100644
--- a/bitburnerFiles1026/route.js
+++ b/misc/route.js
diff --git a/bitburnerFiles1026/run.js b/misc/run.js
index 31c70cd..31c70cd 100644
--- a/bitburnerFiles1026/run.js
+++ b/misc/run.js
diff --git a/bitburnerFiles1026/servers.txt b/misc/servers.txt
index 9c25673..9c25673 100644
--- a/bitburnerFiles1026/servers.txt
+++ b/misc/servers.txt
diff --git a/bitburnerFiles1026/target.js b/misc/target.js
index c2872a2..c2872a2 100644
--- a/bitburnerFiles1026/target.js
+++ b/misc/target.js
diff --git a/bitburnerFiles1026/targets.js b/misc/targets.js
index 9dc9c02..9dc9c02 100644
--- a/bitburnerFiles1026/targets.js
+++ b/misc/targets.js
diff --git a/bitburnerFiles1026/targets.txt b/misc/targets.txt
index 2898eb9..2898eb9 100644
--- a/bitburnerFiles1026/targets.txt
+++ b/misc/targets.txt
diff --git a/bitburnerFiles1026/test.js b/misc/test.js
index c9483b6..c9483b6 100644
--- a/bitburnerFiles1026/test.js
+++ b/misc/test.js
diff --git a/bitburnerFiles1026/threads.js b/misc/threads.js
index 51729fe..51729fe 100644
--- a/bitburnerFiles1026/threads.js
+++ b/misc/threads.js
diff --git a/bitburnerFiles1026/moneyServers.txt b/moneyServers.txt
index c21cf03..c21cf03 100644
--- a/bitburnerFiles1026/moneyServers.txt
+++ b/moneyServers.txt
diff --git a/bitburnerFiles1026/0port.txt b/servers/0port.txt
index c40a43a..c40a43a 100644
--- a/bitburnerFiles1026/0port.txt
+++ b/servers/0port.txt
diff --git a/bitburnerFiles1026/1port.txt b/servers/1port.txt
index 513acd8..513acd8 100644
--- a/bitburnerFiles1026/1port.txt
+++ b/servers/1port.txt
diff --git a/bitburnerFiles1026/2port.txt b/servers/2port.txt
index 98135b3..98135b3 100644
--- a/bitburnerFiles1026/2port.txt
+++ b/servers/2port.txt
diff --git a/bitburnerFiles1026/3port.txt b/servers/3port.txt
index 1e68e88..1e68e88 100644
--- a/bitburnerFiles1026/3port.txt
+++ b/servers/3port.txt
diff --git a/bitburnerFiles1026/4port.txt b/servers/4port.txt
index 563cca7..563cca7 100644
--- a/bitburnerFiles1026/4port.txt
+++ b/servers/4port.txt
diff --git a/bitburnerFiles1026/5port.txt b/servers/5port.txt
index 4139a28..4139a28 100644
--- a/bitburnerFiles1026/5port.txt
+++ b/servers/5port.txt
diff --git a/bitburnerFiles1026/shell/java.js b/shell/java.js
index fe4c8f9..fe4c8f9 100644
--- a/bitburnerFiles1026/shell/java.js
+++ b/shell/java.js
diff --git a/bitburnerFiles1026/shell/js.js b/shell/js.js
index 3755121..3755121 100644
--- a/bitburnerFiles1026/shell/js.js
+++ b/shell/js.js
diff --git a/bitburnerFiles1026/start.js b/start.js
index 4061e25..66b75fb 100644
--- a/bitburnerFiles1026/start.js
+++ b/start.js
@@ -72,24 +72,24 @@ export async function main(ns) {
}
// start autoinfil
- ns.exec("autoinfiltrate.js", HOME, 1, "--quiet");
+ ns.exec("misc/autoinfiltrate.js", HOME, 1, "--quiet");
// start backdooring faction servers to get invites
- ns.print("Running milestones.js");
- ns.scriptKill("milestones.js", HOME);
- ns.exec("milestones.js", HOME);
+ ns.print("Running start/milestones.js");
+ ns.scriptKill("start/milestones.js", HOME);
+ ns.exec("start/milestones.js", HOME);
// start augment monitor
- ns.print("Running augments.js");
- ns.scriptKill("augments.js", HOME);
- ns.exec("augments.js", HOME);
+ ns.print("Running start/augments.js");
+ ns.scriptKill("start/augments.js", HOME);
+ ns.exec("start/augments.js", HOME);
// start home monitor
// upgrades ram and cores
// joins factions
- ns.print("Running home.js");
- ns.scriptKill("home.js", HOME);
- ns.exec("home.js", HOME);
+ ns.print("Running start/home.js");
+ ns.scriptKill("start/home.js", HOME);
+ ns.exec("start/home.js", HOME);
// too expensive
if (ns.getPlayer().money > 200000) {
@@ -133,9 +133,9 @@ export async function main(ns) {
ns.scriptKill("hack.js", HOME);
}
// Run hacker.js
- if (!(ns.scriptRunning("hwgw/hacker.js", HOME))) {
- ns.print("Running hwgw/hacker.js");
- ns.exec("hwgw/hacker.js", HOME);
+ if (!(ns.scriptRunning("start/hacker.js", HOME))) {
+ ns.print("Running start/hacker.js");
+ ns.exec("start/hacker.js", HOME);
}
// too expensive
@@ -146,17 +146,17 @@ export async function main(ns) {
if (ports[i] == "NUKE.exe") {
} else if (ports[i] == "BruteSSH.exe") {
- // ns.print("Running hacknet2.js");
- // ns.scriptKill("hacknet2.js", HOME);
- // ns.exec("hacknet2.js", HOME, 1, debug);
+ // ns.print("Running start/hacknet2.js");
+ // ns.scriptKill("start/hacknet2.js", HOME);
+ // ns.exec("start/hacknet2.js", HOME, 1, debug);
} else if (ports[i] == "FTPCrack.exe") {
ns.print("Running the server purchasing script");
- ns.scriptKill("servers.js", HOME);
- ns.exec("servers.js", HOME, 1, 512, "max", false, debug);
+ ns.scriptKill("start/buyservers.js", HOME);
+ ns.exec("start/buyservers.js", HOME, 1, 512, "max", false, debug);
} else if (ports[i] == "RelaySMTP.exe" && ns.stock.has4SDataTIXAPI()) {
ns.print("Running the stocker script");
- ns.scriptKill("stocks.js", HOME);
- ns.exec("stocks.js", HOME, 1);
+ ns.scriptKill("stocks/stocks.js", HOME);
+ ns.exec("stocks/stocks.js", HOME, 1);
}
}
@@ -194,22 +194,22 @@ export async function main(ns) {
// too expensive
buyall(ns);
ns.print("Running the server upgrading script");
- ns.scriptKill("servers.js", HOME);
- ns.exec("servers.js", HOME, 1, 2048, "max", true, debug);
+ ns.scriptKill("start/buyservers.js", HOME);
+ ns.exec("start/buyservers.js", HOME, 1, 2048, "max", true, debug);
}
if (ns.serverExists("pserv-00")) {
if (ns.getPurchasedServerUpgradeCost("pserv-00", ns.getServerMaxRam("pserv-00") * 2) < 1000000000) {
- if (ns.isRunning("servers.js", HOME, 1, 512, "max", false, debug) || !ns.isRunning("servers.js", HOME, 1, 2048, "max", true, debug)) {
- ns.scriptKill("servers.js", HOME);
- ns.exec("servers.js", HOME, 1, 2048, "max", true, debug);
+ if (ns.isRunning("start/buyservers.js", HOME, 1, 512, "max", false, debug) || !ns.isRunning("start/buyservers.js", HOME, 1, 2048, "max", true, debug)) {
+ ns.scriptKill("start/buyservers.js", HOME);
+ ns.exec("start/buyservers.js", HOME, 1, 2048, "max", true, debug);
}
}
}
if (m < 4) {
// start backdooring faction servers to get invites
ns.print("Running milestones.js");
- ns.scriptKill("milestones.js", HOME);
- ns.exec("milestones.js", HOME);
+ ns.scriptKill("start/milestones.js", HOME);
+ ns.exec("start/milestones.js", HOME);
m++;
}
await ns.sleep(60000);
@@ -231,4 +231,4 @@ function buyall(ns) {
/*
Start.js should continuously check if new .exe files have been made, then re-run root.js when they have been made,
so that better servers are targeted, servers that will make more money.
-*/ \ No newline at end of file
+*/
diff --git a/bitburnerFiles1026/augbaseprice.txt b/start/augbaseprice.txt
index cbe955a..cbe955a 100644
--- a/bitburnerFiles1026/augbaseprice.txt
+++ b/start/augbaseprice.txt
diff --git a/bitburnerFiles1026/augments.js b/start/augments.js
index c6a7f60..c6a7f60 100644
--- a/bitburnerFiles1026/augments.js
+++ b/start/augments.js
diff --git a/bitburnerFiles1026/servers.js b/start/buyservers.js
index af82de7..af82de7 100644
--- a/bitburnerFiles1026/servers.js
+++ b/start/buyservers.js
diff --git a/bitburnerFiles1026/hwgw/hacker.js b/start/hacker.js
index c4c827b..c4c827b 100644
--- a/bitburnerFiles1026/hwgw/hacker.js
+++ b/start/hacker.js
diff --git a/bitburnerFiles1026/hacknet2.js b/start/hacknet2.js
index 1e67b97..1e67b97 100644
--- a/bitburnerFiles1026/hacknet2.js
+++ b/start/hacknet2.js
diff --git a/bitburnerFiles1026/home.js b/start/home.js
index 0ace136..0ace136 100644
--- a/bitburnerFiles1026/home.js
+++ b/start/home.js
diff --git a/bitburnerFiles1026/milestones.js b/start/milestones.js
index 856900a..856900a 100644
--- a/bitburnerFiles1026/milestones.js
+++ b/start/milestones.js
diff --git a/bitburnerFiles1026/root.js b/start/root.js
index d04449e..d04449e 100644
--- a/bitburnerFiles1026/root.js
+++ b/start/root.js
diff --git a/bitburnerFiles1026/tempgrow.js b/start/tempgrow.js
index 3591803..3591803 100644
--- a/bitburnerFiles1026/tempgrow.js
+++ b/start/tempgrow.js
diff --git a/bitburnerFiles1026/temphack.js b/start/temphack.js
index 949289c..bd888fa 100644
--- a/bitburnerFiles1026/temphack.js
+++ b/start/temphack.js
@@ -19,4 +19,7 @@ export async function main(ns) {
ns.getServerMaxMoney(target);
ns.getServerMoneyAvailable(target);
-} \ No newline at end of file
+}
+
+// hacks a server once
+
diff --git a/bitburnerFiles1026/liquidate.js b/stocks/liquidate.js
index 79f902e..79f902e 100644
--- a/bitburnerFiles1026/liquidate.js
+++ b/stocks/liquidate.js
diff --git a/bitburnerFiles1026/maxprice.txt b/stocks/maxprice.txt
index 58e8fae..58e8fae 100644
--- a/bitburnerFiles1026/maxprice.txt
+++ b/stocks/maxprice.txt
diff --git a/bitburnerFiles1026/minprice.txt b/stocks/minprice.txt
index 123c27c..123c27c 100644
--- a/bitburnerFiles1026/minprice.txt
+++ b/stocks/minprice.txt
diff --git a/bitburnerFiles1026/stocker.js b/stocks/stocker.js
index 708e654..9f5a6cb 100644
--- a/bitburnerFiles1026/stocker.js
+++ b/stocks/stocker.js
@@ -43,7 +43,7 @@ export async function main(ns) {
if (ns.getServerMoneyAvailable(target) != 0) {
ns.print("bringing price down.");
while (ns.getServerMoneyAvailable(target) != 0) {
- ns.exec("run.js", "home", 1, target, "temphack.js");
+ ns.exec("misc/run.js", "home", 1, target, "start/temphack.js");
await ns.sleep(5000);
}
}
@@ -68,7 +68,7 @@ export async function main(ns) {
if (ns.getServerMoneyAvailable(target) < maxmoney) {
ns.print("bringing price up.");
while (ns.getServerMoneyAvailable(target) < maxmoney) {
- ns.exec("run.js", "home", 1, target, "tempgrow.js");
+ ns.exec("misc/run.js", "home", 1, target, "start/tempgrow.js");
await ns.sleep(5000);
}
}
@@ -141,4 +141,4 @@ function gains(ns, pricebought, pricesold) {
// round forecast to 1 decimal
// shorten forecast message to *sym*: *number*
// remove previous messages by adding a bunch of \n
-// add a price change message \ No newline at end of file
+// add a price change message
diff --git a/bitburnerFiles1026/stockgains.txt b/stocks/stockgains.txt
index e69de29..e69de29 100644
--- a/bitburnerFiles1026/stockgains.txt
+++ b/stocks/stockgains.txt
diff --git a/bitburnerFiles1026/stocks.js b/stocks/stocks.js
index c456534..c456534 100644
--- a/bitburnerFiles1026/stocks.js
+++ b/stocks/stocks.js