This commit is contained in:
2022-09-12 14:24:18 +02:00
parent 2963efd97b
commit 34254586b5
12 changed files with 132 additions and 65 deletions
+4 -7
View File
@@ -1,4 +1,6 @@
/** @param {import(".").NS } ns */
import { EXCLUDE_SERVERS } from "./constants.js";
export async function main(ns) {
ns.disableLog('ALL');
@@ -176,12 +178,7 @@ export async function main(ns) {
// await ns.sleep(10);
// }
let excludeServers = ['home'];
for (let index = 0; index < 25; index++) {
excludeServers.push(`home-${index}`);
}
excludeServers.push('CSEC');
excludeServers.push('avmnite-02h');
/**
* Recursively kill simple-hack.js running on servers in the network
* @async
@@ -194,7 +191,7 @@ export async function main(ns) {
let nextServer = availableServers[i];
if (nextServer != currentServer && nextServer != previousServer) {
if (excludeServers.indexOf(nextServer) == -1) {
if (EXCLUDE_SERVERS.indexOf(nextServer) == -1) {
let hackExitCode = await runHack(nextServer);
if (hackExitCode == 0) {