mirror of
https://gitlab.com/MisterBiggs/bitburner-scripts.git
synced 2025-06-15 22:56:52 +00:00
init hack
This commit is contained in:
commit
c9bcbc782a
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"cSpell.enabled": false
|
||||||
|
}
|
7
scripts/hfthack.js
Normal file
7
scripts/hfthack.js
Normal 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
27
scripts/spider.js
Normal 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;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user