Last active
May 12, 2024 15:14
-
-
Save Poolitzer/bbae73729449152ddf15413194ad752a to your computer and use it in GitHub Desktop.
A half-an-hour excuse not to learn javascript code to auto craft new elements at https://neal.fun/infinite-craft/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const pairs = [] | |
async function cheating() { | |
let elements = document.getElementsByClassName("mobile-items")[0] | |
let amount = elements.children.length | |
for (let sender = 0; sender < amount; sender++){ | |
for (let receiver = 0; receiver < amount; receiver++){ | |
if (pairs.includes(sender.toString() + receiver.toString()) || pairs.includes(receiver.toString() + sender.toString())){ | |
continue; | |
} | |
elements.children[sender].children[0].click() | |
elements.children[receiver].children[0].click() | |
pairs.push(sender.toString() + receiver.toString()) | |
await new Promise(r => setTimeout(r, 500)); | |
} | |
} | |
cheating() | |
} | |
cheating() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment