1
0
mirror of https://gitlab.com/MisterBiggs/bitburner-scripts.git synced 2025-06-15 22:56:52 +00:00
2021-12-16 17:17:03 -07:00

28 lines
541 B
JavaScript

script = "hfthack.script";
servers = scan();
i = 0;
while (i < servers.length) {
//Wait for required hacking level
while (getHackingLevel() < getServerRequiredHackingLevel(servers[i])) {
sleep(20000);
}
scp(script, servers[i]);
nuke(servers[i]);
// Calculate how many threads we can run the script at
threads = Math.max(
1,
Math.floor(getServerMaxRam(servers[i]) / getScriptRam(script))
);
exec(script, servers[i], threads);
tprint(servers[i], " added to botnet with ", threads, " threads");
++i;
}