pmotschmann / Evolve

An incremental game about evolving a civilization
Mozilla Public License 2.0
853 stars 370 forks source link

Hacks! #681

Closed dgrilawidbanana closed 2 years ago

dgrilawidbanana commented 2 years ago

Paste this script in the console during civilization stage for free food, lumber, and stone!

function getElementByXpath(path) {
    return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
}
function sleep(ms) {
    return new Promise(resolve => setTimeout(resolve, ms));
}
while (true) {
    getElementByXpath('/html/body/div[2]/div/div[2]/div/div/section/div[2]/div/div/section/div[1]/div[2]/a[1]').click();
    getElementByXpath('/html/body/div[2]/div/div[2]/div/div/section/div[2]/div/div/section/div[1]/div[3]/a[1]').click();
    getElementByXpath('/html/body/div[2]/div/div[2]/div/div/section/div[2]/div/div/section/div[1]/div[4]/a[1]').click();
    await sleep(0);
}
dgrilawidbanana commented 2 years ago

Helpful note:

Make sure you are in the Civilization tab's Camp, Hamlet, Village, Town, City, Metropolis, Megalopolis, or Ecumenopolis tab while running the script.