1
0
mirror of https://gitlab.com/MisterBiggs/bitburner-scripts.git synced 2025-06-15 14:46:45 +00:00

init hack

This commit is contained in:
Anson Biggs 2021-12-16 17:17:03 -07:00
commit c9bcbc782a
3 changed files with 37 additions and 0 deletions

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"cSpell.enabled": false
}

7
scripts/hfthack.js Normal file
View File

@ -0,0 +1,7 @@
while (true) {
hack("hong-fang-tea");
grow("hong-fang-tea");
hack("hong-fang-tea");
weaken("hong-fang-tea");
hack("hong-fang-tea");
}

27
scripts/spider.js Normal file
View File

@ -0,0 +1,27 @@
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;
}