-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathget.js
More file actions
34 lines (32 loc) · 682 Bytes
/
get.js
File metadata and controls
34 lines (32 loc) · 682 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
const baseUrl = 'https://raw.githubusercontent.com/hospotho/Bitburner-script/main/'
const filesToDownload = [
"best.js" ,
"buyServer.js" ,
"checkRam.js" ,
"formula.js" ,
"g.js" ,
"getMax.js" ,
"h.js" ,
"health.js" ,
"index.d.ts" ,
"init.js" ,
"killall.js" ,
"map.js" ,
"master.js" ,
"reset.js" ,
"start.js" ,
"test.js" ,
"w.js" ,
"worm.js" ,
]
export async function main(ns) {
for (let i = 0; i < filesToDownload.length; i++) {
const filename = filesToDownload[i]
const path = baseUrl + filename
await ns.scriptKill(filename, 'home')
await ns.rm(filename)
await ns.sleep(100)
await ns.wget(path, filename)
}
ns.spawn('start.js', 1)
}