Move call outside the scope of watcher
This commit is contained in:
parent
92ad2da7b7
commit
90fef7e53a
@ -1,4 +1,5 @@
|
||||
export async function main(ns: NS) {
|
||||
ns.run('watcher.js')
|
||||
ns.run('hacknet.js')
|
||||
ns.run("hackallservers.js")
|
||||
ns.run("watcher.js")
|
||||
ns.run("hacknet.js")
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { recursiveHackingRequired } from "./utils"
|
||||
|
||||
export async function main(ns: NS) {
|
||||
ns.run('hackallservers.js')
|
||||
let levels = recursiveHackingRequired(ns)
|
||||
let hackingLevel: number
|
||||
do {
|
||||
@ -10,9 +9,9 @@ export async function main(ns: NS) {
|
||||
// remove the level from the list, so we don't try to hack it again
|
||||
levels.splice(levels.indexOf(hackingLevel), 1)
|
||||
ns.tprint(`Hacking level increased to ${hackingLevel}`)
|
||||
ns.run('killall.js')
|
||||
ns.run("killall.js")
|
||||
await ns.sleep(1000) // 1 second
|
||||
ns.run('hackallservers.js')
|
||||
ns.run("hackallservers.js")
|
||||
}
|
||||
// Wait 1 second before checking again
|
||||
await ns.sleep(1000)
|
||||
|
Loading…
Reference in New Issue
Block a user