auto hack improved grow

This commit is contained in:
2023-09-09 02:05:43 +02:00
parent 7b14e98658
commit 435add26de
18 changed files with 8289 additions and 7480 deletions
+27
View File
@@ -0,0 +1,27 @@
let getProps = (obj) => Object.entries(obj).find(entry => entry[0].startsWith("__reactProps"))[1].children.props;
let hasPlayer = (obj) => {
try {
return getProps(obj).player ? true : false;
}
catch (ex) {
return false;
}
};
/** @param {NS} ns **/
export async function main(ns) {
let boxes = Array.from(eval("document").querySelectorAll("[class*=MuiBox-root]"));
let box = boxes.find(x => hasPlayer(x));
if (box) {
ns.tprintf("INFO className: \"" + box.className + "\"");
let props = getProps(box);
// get a 10% cash bonus
props.player.money = props.player.money * 1.1;
// open dev menu
props.router.toDevMenu();
}
}