Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /** @param {NS} ns **/
- export async function main(ns) {
- //Args - target, timeToFinish, executionTime, actionID
- var server = ns.args[0];
- var timeToFinish = ns.args[1];
- let doWait = true;
- while (doWait){
- if (performance.now() + (ns.getHackTime(server) * 3.2) >= timeToFinish) break;
- await ns.sleep(1);
- }
- await ns.grow(server);
- if (performance.now + 50 > timeToFinish) ns.tprint("Grow Finished Late!! " + performance.now());
- }
Advertisement
Add Comment
Please, Sign In to add comment