summaryrefslogtreecommitdiff
path: root/start/temphack.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 /start/temphack.js
parent1ca00b3b73a9699e41f81e154cea32934c16de03 (diff)
Organized scripts into folders
Diffstat (limited to 'start/temphack.js')
-rw-r--r--start/temphack.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/start/temphack.js b/start/temphack.js
new file mode 100644
index 0000000..bd888fa
--- /dev/null
+++ b/start/temphack.js
@@ -0,0 +1,25 @@
+/** @param {NS} ns */
+export async function main(ns) {
+ // What server will be targeted?
+ let target = ns.args[0];
+ if (target === undefined) {
+ ns.exit();
+ }
+
+ ns.print("At min security: ", ns.getServerMinSecurityLevel(target) == ns.getServerSecurityLevel(target));
+ ns.print("At max money: ", ns.getServerMaxMoney(target) == ns.getServerMoneyAvailable(target));
+
+ // while (ns.getServerSecurityLevel(target) > (securityThresh)) {
+ // // If the server's security level is above our threshold, weaken it
+ // await ns.weaken(target);
+ // }
+ await ns.hack(target);
+ // await ns.weaken(target);
+ // await ns.sleep(1000);
+
+ ns.getServerMaxMoney(target);
+ ns.getServerMoneyAvailable(target);
+}
+
+// hacks a server once
+