This script will buy new nodes or upgrade your current nodes depending on which you can afford.
Create a Script
- nano WhateverTheNameIs.js
Script Code
/** @param {Ns} ns **/ export async function main(ns) { mientras (verdadero) { para (var i = 0; i < await ns.hacknet.numNodes(); i ++) { si (await ns.getPlayer().dinero > await ns.hacknet.getLevelUpgradeCost(i, 1)) { await ns.hacknet.upgradeLevel(i, 1); } si (await ns.getPlayer().dinero > await ns.hacknet.getRamUpgradeCost(i, 1)) { await ns.hacknet.upgradeRam(i, 1); } si (await ns.getPlayer().dinero > await ns.hacknet.getCoreUpgradeCost(i, 1)) { await ns.hacknet.upgradeCore(i, 1); } } si (await ns.getPlayer().dinero > await ns.hacknet.getPurchaseNodeCost()) { await ns.hacknet.purchaseNode(); } await ns.sleep(1000); } }
Run the Script
- Run WhateverTheNameIs.js
Better run it on your «hogar» máquina.
Eso es todo lo que estamos compartiendo hoy para este Quemador de bits guía. Esta guía fue originalmente creada y escrita por Bloodly Hell Cat~. En caso de que no actualicemos esta guía, puede encontrar la última actualización siguiendo este enlace.