log to file
This commit is contained in:
+1
-1
@@ -29,7 +29,7 @@ export async function main(ns) {
|
||||
hackedMoney = await ns.hack(server);
|
||||
}
|
||||
|
||||
ns.tprint(`{${server}: {loop: ${++loop}, hack: ${Math.floor(hackedMoney)}, money: ${Math.floor(currentMoney)} / ${Math.floor(maxMoney)} = ${((currentMoney / maxMoney) * 100).toFixed(2)}, security: ${currentSecurity.toFixed(2)} / ${Math.floor(minSecurity) } = ${((currentSecurity / minSecurity) * 100).toFixed(4)}}}`);
|
||||
await ns.tryWritePort(1, `${server} = {loop: ${++loop}, hack: ${Math.floor(hackedMoney)}, money: "${Math.floor(currentMoney)} / ${Math.floor(maxMoney)} = ${((currentMoney / maxMoney) * 100).toFixed(2)}", security: "${currentSecurity.toFixed(2)} / ${Math.floor(minSecurity) } = ${((currentSecurity / minSecurity) * 100).toFixed(4)}"};\n`);
|
||||
await ns.sleep(10);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user