You may have noticed I made a change to the starting example script.
// Example: Hack a server
while(1) {
const target = "vault-omega-x";
const stolen = await ns.hack(target);
ns.print(`Hacked ${target} for ${stolen} DWC`);
}
For those not familiar, while(1) will cause the script to loop forever until you stop it. This is a great way to keep hacking the same server. Also, a great place to start learning to adapt the script for bigger and better hacks, maybe even multiple servers!
