Legends of Idleon

Ask about cheats/tables for single player games here
sgl3686
Noobzor
Noobzor
Posts: 7
Joined: Sun Jan 01, 2023 7:22 pm
Reputation: 1

Re: Legends of Idleon

Post by sgl3686 »

Possible suggestion based on people having issues with chromedebug came to mind -

So the page appears to load in chromium browsers (Brave and Edge tested), but the url its using to access the proxy isn't obvious how its generating the page string (buried in the exe). So adding a printLn to the command where it displays the URL might be a nice addition so people can use whatever browser they have? Just would then need the user to open the console drawer.

sgl3686
Noobzor
Noobzor
Posts: 7
Joined: Sun Jan 01, 2023 7:22 pm
Reputation: 1

Re: Legends of Idleon

Post by sgl3686 »

YepYep42 wrote:
Fri Oct 06, 2023 1:29 pm
sgl3686 wrote:
Fri Oct 06, 2023 1:23 pm
YepYep42 wrote:
Fri Oct 06, 2023 1:15 pm


Yeah i'm trying to figure out how to even get the chromedebug to even show up. I'm really new at this :P
So if chromedebug command doesn't launch a chrome window, check:
-do you have chrome installed
-Is it installed in the default location
Where do I enter this chromedebug into? That's my main issue right now. I kinda figured opening injectcheatsf5 would be where, but it instantly closes.
You are correct - make sure you have the most recent version of the inject, check for operating system updates, make sure the game launches normally. When I run it in a VM, the injector will launch/crash something like 10-15 times. Running on my normal PC, and I get one maybe two. Can also remove your custom 'start enabled' cheats. Sometimes that has caused me issues.

YepYep42
Noobzor
Noobzor
Posts: 5
Joined: Fri Oct 06, 2023 12:45 pm
Reputation: 0

Re: Legends of Idleon

Post by YepYep42 »

sgl3686 wrote:
Fri Oct 06, 2023 1:33 pm
YepYep42 wrote:
Fri Oct 06, 2023 1:29 pm
sgl3686 wrote:
Fri Oct 06, 2023 1:23 pm


So if chromedebug command doesn't launch a chrome window, check:
-do you have chrome installed
-Is it installed in the default location
Where do I enter this chromedebug into? That's my main issue right now. I kinda figured opening injectcheatsf5 would be where, but it instantly closes.
You are correct - make sure you have the most recent version of the inject, check for operating system updates, make sure the game launches normally. When I run it in a VM, the injector will launch/crash something like 10-15 times. Running on my normal PC, and I get one maybe two. Can also remove your custom 'start enabled' cheats. Sometimes that has caused me issues.
Well, the latest one I could find was from 2022 so i'm assuming that's it. Nothing I do seems to keep it from crashing. Dang..

edit: I do have the latest one. I don't know why I thought it said 2022. Still isn't working though. Messing around with some stuff.
edit: alright so I got everything working but looking at this I have no idea how to even use it. If anyone could let me know how to delete the first 26 cog slots I would appreciate it an insane amount. I just wanted to tweak a few things not get things busted on my account.

YepYep42
Noobzor
Noobzor
Posts: 5
Joined: Fri Oct 06, 2023 12:45 pm
Reputation: 0

Re: Legends of Idleon

Post by YepYep42 »

Okay so I figured out the cog order, how would I go about deleting them or setting the values to 0? Looking at chrome I can't really navigate anywhere to do that..

shesh
Cheater
Cheater
Posts: 29
Joined: Tue Jun 20, 2023 10:05 am
Reputation: 7

Re: Legends of Idleon

Post by shesh »

dkwyvern wrote:
Sun Jul 16, 2023 10:26 pm
Does anyone know how to unlock the Dragonic Cauldrons for the first two liquid cauldrons?
looking for the same answer, in case anyone has found out

DeliriousBun
What is cheating?
What is cheating?
Posts: 2
Joined: Fri Oct 06, 2023 8:09 pm
Reputation: 0

Re: Legends of Idleon

Post by DeliriousBun »

Hey pretty new to the cheating enviorment and I truly am thankful for such a community to develop cheats for the game I like!

I have a problem with injection, it stops at Step 1 complete... and I have zero clue what do do next, I even changed the disk and it didn't seem to work.

Any suggestions? :(

Tindal
Expert Cheater
Expert Cheater
Posts: 312
Joined: Sun Nov 14, 2021 10:16 am
Reputation: 104

Re: Legends of Idleon

Post by Tindal »

DeliriousBun wrote:
Sat Oct 07, 2023 9:04 am
Hey pretty new to the cheating enviorment and I truly am thankful for such a community to develop cheats for the game I like!

I have a problem with injection, it stops at Step 1 complete... and I have zero clue what do do next, I even changed the disk and it didn't seem to work.

Any suggestions? :(
Injection must be placed to game folder

turbigi
Noobzor
Noobzor
Posts: 6
Joined: Sun May 21, 2023 2:06 pm
Reputation: 0

Re: Legends of Idleon

Post by turbigi »

version 7 oct. whats new?

DeliriousBun
What is cheating?
What is cheating?
Posts: 2
Joined: Fri Oct 06, 2023 8:09 pm
Reputation: 0

Re: Legends of Idleon

Post by DeliriousBun »

Tindal wrote:
Sat Oct 07, 2023 10:02 am
DeliriousBun wrote:
Sat Oct 07, 2023 9:04 am
Hey pretty new to the cheating enviorment and I truly am thankful for such a community to develop cheats for the game I like!

I have a problem with injection, it stops at Step 1 complete... and I have zero clue what do do next, I even changed the disk and it didn't seem to work.

Any suggestions? :(
Injection must be placed to game folder
well it is in the folder, i followed step by step :(

DeviS
What is cheating?
What is cheating?
Posts: 3
Joined: Wed Sep 28, 2022 1:50 pm
Reputation: 0

Re: Legends of Idleon

Post by DeviS »

soviabru wrote:
Sun Oct 01, 2023 7:49 pm
why when i open the InjectCheatsF5 the idleon closes after fully load?
yep me too been working until now. even patched to latest F5 and still closes at character select menu? :o

bulldog218
What is cheating?
What is cheating?
Posts: 2
Joined: Mon Oct 02, 2023 10:39 am
Reputation: 0

Re: Legends of Idleon

Post by bulldog218 »

Hello, I bricked my Vman today and I tried looking and attempting several solutions in this large thread, but nothing seemed to work.

I went to IdleEfficiency and found my stats are NaN as well as Alchemy Bubbles are NaN. I've tried setting all alchemy bubbles to 0, but it didn't work. All my other characters are just fine.

Can anyone point me in the right direction? Nothing really stands out in Chromedebug except some of the cauldrons has 26 bubbles (with green having 28) but I dont know how to remove them entirely.


togunov
Noobzor
Noobzor
Posts: 7
Joined: Tue Jan 17, 2023 5:14 pm
Reputation: 0

Re: Legends of Idleon

Post by togunov »

is there a way to unlock achievements via chromedebug? I'm too lazy to sit and write "hi"

tympanicblock61
Cheater
Cheater
Posts: 34
Joined: Thu Mar 10, 2022 7:12 am
Reputation: 2

Re: Legends of Idleon

Post by tympanicblock61 »

load mods in idleon

compile it yourself

Code: Select all

const spawn = require("child_process").spawn;
const _ = require("lodash");
const CDP = require("chrome-remote-interface");
const fs = require("fs").promises;
const atob = require("atob");
const btoa = require("btoa");
const Enquirer = require("enquirer");

async function fileExists(path) {
  try {
    await fs.access(path);
    console.log('File exists:', path);
    return true;
  } catch (error) {
    if (error.code === 'ENOENT') {
      console.log('File does not exist:', path);
      return false;
    } else {
      console.error('Error checking file existence:', error);
      throw error;
    }
  }
}

const objToString = (obj) => {
  let ret = "{";

  for (let k in obj) {
    let v = obj[k];

    if (typeof v === "function") {
      v = v.toString();
    } else if (typeof v === "boolean") {
      v = v;
    } else if (Array.isArray(v)) {
      v = JSON.stringify(v);
    } else if (typeof v === "object") {
      v = objToString(v);
    } else {
      v = `"${v}"`;
    }

    ret += `\n  ${k}: ${v},`;
  }

  ret += "\n}";

  return ret;
};


// Tool initialization messages
console.log("------------------------------------------------------------------------------------------");
console.log("Updated version of InjectCheats by valleymon: originally by iBelg, continued by Creater0822");
console.log("InjectCheatF5 v1.2");
console.log("------------------------------------------------------------------------------------------");
console.log("");

const port = 32123;
const config = require(process.cwd() + "/config.js");
try {
  const customConfig = require("/config.custom.js");
  config.injectorConfig = _.merge(config.injectorConfig, customConfig.injectorConfig);
  config.startupCheats = _.union(config.startupCheats, customConfig.startupCheats);
  config.cheatConfig = _.merge(config.cheatConfig, customConfig.cheatConfig);
} catch (e) {
  console.log("****** No custom config found, using default config ******");
  console.log("****** To create a custom config, copy config.custom.example.js to config.custom.js and edit to your liking ******");
  console.log("");
}
const injectorConfig = config.injectorConfig;
const startupCheats = config.startupCheats;
const cheatConfig = config.cheatConfig;

console.log("Options:");
console.log(`Regex: ${injectorConfig.injreg}`);
console.log(`Show idleon window console logs: ${injectorConfig.showConsoleLog}`);
console.log(`Chrome location: ${injectorConfig.chrome}`);
console.log("");

function attach(name) {
  return new Promise((resolve, reject) => {
    const idleon = spawn(name, [`--remote-debugging-port=${port}`]);

    //get the web socket url
    idleon.stderr.on("data", (data) => {
      const match = data.toString().match(/DevTools listening on (ws:\/\/.*)/);
      if (match) {
        resolve(match[1]);
      }
    });
  });
}

async function setupIntercept(hook) {
  const options = {
    tab: hook,
    port: port
  };

  const client = await CDP(options);

  const { DOM, Page, Network, Runtime } = client;
  console.log("Injecting cheats...");

  let cheats = ""
  
  cheats += `let startupCheats = ${JSON.stringify(startupCheats)};\nlet cheatConfig = ${objToString(cheatConfig)};\n${await fs.readFile(process.cwd() + "/cheats.js", "utf8")}\nwindow.loadedmods=[]`;
  
  if (await fileExists(process.cwd() + "/mods/")) {
    let files = await fs.readdir(process.cwd() + "/mods/")
    files.forEach(async (file) => {
      if (file.endsWith(".js")) {
        cheats += `\n${await fs.readFile(process.cwd() + "/mods/"+file, "utf8")}`
        console.log("loaded: "+file)
      }
    })
  } else {
    await fs.mkdir(process.cwd() + "/mods/")
  }
  console.log("loaded all mods")
  await Network.setRequestInterception(
    {
      patterns: [
        {
          urlPattern: injectorConfig.interceptPattern,
          resourceType: "Script",
          interceptionStage: "HeadersReceived",
        },
      ],
    }
  );
  await Page.setBypassCSP({ enabled: true });
  if (injectorConfig.showConsoleLog) {
    Runtime.consoleAPICalled((entry) => {
        console.log(entry.args.map(arg=>arg.value).join(" "));
    });
  } 

  await Promise.all([Runtime.enable(), Page.enable(), Network.enable(), DOM.enable()]);
  
  const eval = await Runtime.evaluate({ expression: cheats });
  console.log("Loaded cheats...");

  await new Promise(resolve => {
    Network.requestIntercepted(async ({ interceptionId, request }) => {
      const response = await Network.getResponseBodyForInterception({ interceptionId });
      const originalBody = atob(response.body);
      // Regex definitions
      const InjReg = new RegExp(injectorConfig.injreg);
      const InjRegG = new RegExp(injectorConfig.injreg, "g");
      const VarName = new RegExp("^\\w+"); // The randomly generated variable name could have more than one character, thus this Regex
  
      const AppMain = InjRegG.exec(originalBody);
      const AppVar = Array(AppMain.length).fill("");
      // A for-loop has been implemented, but there should only be one unique occasion, hence ${AppVar[0]}
      for (i = 0; i < AppMain.length; i++) AppVar[i] = VarName.exec(AppMain[i])[0];

      let manipulator = await Runtime.evaluate({ expression: "getZJSManipulator()", awaitPromise: true });
      let newBody; // replace some code

      manipulator = new Function("return " + manipulator.result.value)();
      newBody = manipulator(originalBody);

      newBody = originalBody.replace(InjReg, `window.__idleon_cheats__=${AppVar[0]};$&`);

      console.log("Updated game code...");
      const newHeaders = [
        `Date: ${(new Date()).toUTCString()}`,
        `Connection: closed`,
        `Content-Length: ${newBody.length}`,
        `Content-Type: text/javascript`,
      ];
      const newResponse = btoa(
        "HTTP/1.1 200 OK\r\n" +
        newHeaders.join("\r\n") +
        "\r\n\r\n" +
        newBody
      );
  
      Network.continueInterceptedRequest({
        interceptionId,
        rawResponse: newResponse,
      });
      console.log("Sent to game...");
      console.log("Cheat injected!");
      resolve();
    });
  });
  return client;
}

(async () => {
  const hook = await attach("LegendsOfIdleon.exe");
  const client = await setupIntercept(hook);

  const { Runtime, Page } = client;

  Page.loadEventFired(async () => {
    const context = `window.document.querySelector("iframe").contentWindow.__idleon_cheats__`;

    console.log("Inititalizing cheats ingame...");
    const init = await Runtime.evaluate({ expression: `setup.call(${context})`, awaitPromise: true, allowUnsafeEvalBlockedByCSP: true });
    console.log(init.result.value);
  
    let choices = await Runtime.evaluate({ expression: `getAutoCompleteSuggestions.call(${context})`, awaitPromise: true, returnByValue: true });
    choices = choices.result.value;
    let cheatsNeedingConfirmation = await Runtime.evaluate({ expression: `getChoicesNeedingConfirmation.call(${context})`, awaitPromise: true, returnByValue: true });
    cheatsNeedingConfirmation = cheatsNeedingConfirmation.result.value;

    async function promptUser() {
      let valueChosen = false;
      let enquirer = new Enquirer;
      let { action } = await enquirer.prompt({
        name: "action",
        message: "Action",
        type: "autocomplete",
        initial: 0,
        limit: 15,
        choices: choices,
        suggest: function (input, choices) {
          if (input.length == 0) return [choices[0]];
          let str = input.toLowerCase();
          let mustInclude = str.split(" ");
          return choices.filter(ch => {
            for (word of mustInclude) {
              if (!ch.message.toLowerCase().includes(word)) return false;
            }
            return true
          });
        },
        onSubmit: function (name, value, prompt) {
          value = this.focused ? this.focused.value : value;
          let choiceNeedsConfirmation = false;
          cheatsNeedingConfirmation.forEach((e) => {
            if (value.indexOf(e) === 0) choiceNeedsConfirmation = true;
          });
          if (choiceNeedsConfirmation && !valueChosen && this.focused) {
            prompt.input = value;
            prompt.state.cursor = value.length;
            prompt.render();
            valueChosen = true;
            return new Promise(function (resolve) { });
          } else {
            this.addChoice({ name: value, value: value }, this.choices.length + 1);
            return true;
          }
        },
        onRun: async function () {
          await this.complete();
        },
        cancel: function () {},
      });
      if (action === "chromedebug") {
        const response = await client.Target.getTargetInfo();
        const url = `http://localhost:${port}/devtools/inspector.html?experiment=true&ws=localhost:${port}/devtools/page/${response.targetInfo.targetId}`;
        spawn(injectorConfig.chrome, ["--new-window", url])
        console.log("Opened idleon chrome debugger");
      } else {
        const cheatResponse = await Runtime.evaluate({ expression: `cheat.call(${context}, "${action}")`, awaitPromise: true, allowUnsafeEvalBlockedByCSP: true });
        console.log(`${cheatResponse.result.value}`);
      }
      await promptUser();
    }
    await promptUser();
  });
})();
or download it from here [Link]

creating mods
to create a mod just add a js file to folder "mods" with your code
if a mod requires another mod that adds something then you can do this to wait till they are loaded

Code: Select all

function findMod(name) {
    return window.loadedmods.filter((mod)=>mod.name === name)[0]
}

const id = setInterval(() => {
    let mod1 = findMod("mod1")
    let mod2 = findMod("mod2")
    if (mod1 && mod2) {
        yourmainfunction()
        clearInterval(id)
    }
}, 1000)
to actually have your mod in loaded mods you need to add

Code: Select all

window.loadedmods.push({name:"modname", main:new yourmainclass()})

to either the set interval or bottom of your code if your mod does not require any others.

Akkayy
Noobzor
Noobzor
Posts: 6
Joined: Thu Aug 31, 2023 11:38 am
Reputation: 0

Re: Legends of Idleon

Post by Akkayy »

What's new in version 07-Oct-2023?

NotMelx
Noobzor
Noobzor
Posts: 9
Joined: Tue Jun 27, 2023 1:55 pm
Reputation: 0

Re: Legends of Idleon

Post by NotMelx »

Does anyone know how give yourself a bundle / flag it as bought?

Post Reply

Who is online

Users browsing this forum: AhrefsBot, aimar_chen