summaryrefslogtreecommitdiff
path: root/batch/batch.js
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 /batch/batch.js
parent1ca00b3b73a9699e41f81e154cea32934c16de03 (diff)
Organized scripts into folders
Diffstat (limited to 'batch/batch.js')
-rw-r--r--batch/batch.js36
1 files changed, 36 insertions, 0 deletions
diff --git a/batch/batch.js b/batch/batch.js
new file mode 100644
index 0000000..c5cb7f5
--- /dev/null
+++ b/batch/batch.js
@@ -0,0 +1,36 @@
+import { setOfObjects } from '/batch/batcher.js';
+
+/** @param {NS} ns */
+export async function main(ns) {
+ // SINGLE BATCH RUN BY BATCHER.JS
+ // RUNS TWO WEAKENS, A GROW, AND A HACK
+ // SEPERATED BY SOME TIME
+ /*
+ Initialize the object
+
+ run weaken.js with [weaken-hack] threads
+ wait some [weakenBuffer] time
+ run weaken.js with [weakenThreadsGrow] threads
+ wait some [grow buffer] time
+ run grow.js with [grow] threads
+ wait some [hack buffer] time
+ run hack.js with [hack] threads
+ */
+
+ // ns.disableLog("ALL");
+ // ns.clearLog();
+ // ns.tail();
+
+ let object = setOfObjects[ns.args[0]];
+
+
+ ns.exec("/batch/weaken.js", "home", Math.ceil(object.weakenThreadsHack), object.target);
+ await ns.sleep(object.weakenBuffer);
+ ns.exec("/batch/weaken.js", "home", Math.ceil(object.weakenThreadsGrow), object.target);
+ await ns.sleep(object.growBuffer);
+ ns.exec("/batch/grow.js", "home", Math.ceil(object.growThreads), object.target);
+ await ns.sleep(object.hackBuffer);
+ ns.exec("/batch/hack.js", "home", Math.ceil(object.hackThreads), object.target);
+ // ns.tprint(object.weakenThreadsHack)
+
+} \ No newline at end of file