Early Hacknet Auto Management Script – Bitburner

Early Hacknet Auto Management Script – Bitburner 1 - steamclue.com
Early Hacknet Auto Management Script – Bitburner 1 - steamclue.com

Early Hacknet Auto Management Script.
 
 

Early Hacknet Auto Management Script

NOTE: This script will buy new nodes or upgrade your current nodes depending on which you can afford.
 
 

Create a script:

 
 

nano WhateverTheNameIs.js

 
 

Copy past the code:

 
 

/** @param {NS} ns **/export async function main(ns) {
 while (true) {
 for (var i = 0; i < await ns.hacknet.numNodes(); i++) {
 if (await ns.getPlayer().money > await ns.hacknet.getLevelUpgradeCost(i, 1)) {
 await ns.hacknet.upgradeLevel(i, 1);
 }
 if (await ns.getPlayer().money > await ns.hacknet.getRamUpgradeCost(i, 1)) {
 await ns.hacknet.upgradeRam(i, 1);
 }
 if (await ns.getPlayer().money > await ns.hacknet.getCoreUpgradeCost(i, 1)) {
 await ns.hacknet.upgradeCore(i, 1);
 }
 }
 if (await ns.getPlayer().money > await ns.hacknet.getPurchaseNodeCost()) {
 await ns.hacknet.purchaseNode();
 }
 await ns.sleep(1000);
 }
}

 
 

Run the script:

 
 

run WhateverTheNameIs.js

 
 
NOTE: Better run it on your “home” machine.
 
 
screenshot of the code:
 
 
Early Hacknet Auto Management Script - Bitburner - Early Hacknet Auto Management Script - E7C26B5C4
 
 

 
 
I hope you enjoy the Early Hacknet Auto Management Script – Bitburner guide. This is all for now! If you have something to add to this guide or forget to add some information, please let us know via comment! We check each comment manually!
 


Be the first to comment

Leave a Reply

Your email address will not be published.


*