Servers had no money lol
This commit is contained in:
parent
22ddbbde5d
commit
5d6063917b
@ -2,9 +2,13 @@ export async function main(ns: NS) {
|
|||||||
const server: string = <string> ns.args[0]
|
const server: string = <string> ns.args[0]
|
||||||
while (true) {
|
while (true) {
|
||||||
// Guide https://darktechnomancer.github.io/#glossary-of-terms
|
// Guide https://darktechnomancer.github.io/#glossary-of-terms
|
||||||
|
|
||||||
|
if (ns.getServerSecurityLevel(server) > 5) {
|
||||||
await ns.weaken(server)
|
await ns.weaken(server)
|
||||||
|
} else if (ns.getServerMoneyAvailable(server) < ns.getServerMaxMoney(server) * 0.95) {
|
||||||
await ns.grow(server)
|
await ns.grow(server)
|
||||||
await ns.weaken(server)
|
} else {
|
||||||
await ns.hack(server)
|
await ns.hack(server)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user