Cleanup Ramses Folder 2
This commit is contained in:
15
Ramses/home/RMgrow.js
Normal file
15
Ramses/home/RMgrow.js
Normal file
@@ -0,0 +1,15 @@
|
||||
/** @param {NS} ns */
|
||||
export async function main(ns) {
|
||||
ns.print(Date.now());
|
||||
const sTarget = ns.args[0]; // target server
|
||||
const bRepeat = ns.args[1]; // should this script loop
|
||||
const nMsecDelay = ns.args[2]; // MsecDelay
|
||||
|
||||
while (bRepeat === true) {
|
||||
await ns.grow(sTarget, { additionalMsec: nMsecDelay });
|
||||
}
|
||||
|
||||
await ns.grow(sTarget, { additionalMsec: nMsecDelay });
|
||||
ns.print(Date.now());
|
||||
ns.writePort(ns.pid, Date.now());
|
||||
}
|
||||
Reference in New Issue
Block a user