Files
The_Bitburner_Scripts/Ramses/home/CorpControl.js
2024-10-07 09:49:02 +02:00

33 lines
828 B
JavaScript

/** @param {NS} ns */
export async function main(ns, reset) {
let cities = ["Sector-12", "Aevum", "Volhaven", "Chongqing", "New Tokyo", "Ishima"];
let corpName = "Agri-Ram";
if (reset === true || !ns.fileExists("CorpStatus.txt")){
ns.write("CorpStatus.txt",JSON.stringify({step: 0}),"w");
};
let corpStatus = JSON.parse(ns.read("CorpStatus.txt")) || {step: 0};
let step = corpStatus.step;
while (step < 99) {
step = corpStatus.step;
switch (step) {
case 0:
case 10:
case 20:
case 30:
case 40:
case 50:
case 60:
case 70:
case 80:
case 90:
case 100:
default:
}
for (let city of cities) {
await ns.run("/corp/Smart.js",1,corpName,city);
await ns.tprint(ns.run("/corp/UpgradeOffice.js",1,corpName,city));
await ns.sleep(1000)
}
}
}