r['placeModule']('hns', mod => { const hns = '8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888'; //its just yellow :^) const place = window['r']['place']; const getCooldownTimeRemaining = place['getCooldownTimeRemaining'].bind(place); const getPaletteColorABGR = place['getPaletteColorABGR'].bind(place); const getPaletteColor = place['getPaletteColor'].bind(place); const enable = place['enable'].bind(place); const setColor = place['setColor'].bind(place); const drawTile = place['drawTile'].bind(place); const inspectTile = place['inspectTile'].bind(place); const xBase = 3; const yBase = 413; const w = 26; const h = 26; const timePasses = n => new Promise(resolve => setTimeout(resolve, n)); const c = mod('canvasse'); const world = mod('world'); const getTileColor = (x, y) => { return c.readBuffer[x + xBase + (y + yBase) * w]; } const canDraw = () => getCooldownTimeRemaining() === 0; const waitToDraw = () => new Promise(resolve => { const check = () => { if (canDraw()) { resolve(); } else { setTimeout(check, 1000); } } setTimeout(check, 1000); }); const color = (x, y) => hns.charCodeAt(x + y * w) - 48; const matches = (x, y) => getPaletteColorABGR(color(x, y)) === c['writeBuffer'][xBase + x + (yBase + y) * 1000]; const draw = () => { for(let i = 0; i < hns.length; i++) { const rand = Math.floor(Math.random()*hns.length); const x = rand % w; const y = Math.floor(rand / h); if (!matches(x, y)) { console.log(x + xBase); console.log(y + yBase); console.log(color(x, y)); enable(); setColor(color(x, y)); drawTile(xBase + x, yBase + y); break; } } world['updateActivity'](1); waitToDraw().then(window.start); }; let stop = false; window['start'] = function() { if (stop) { stop = false; return; } inspectTile(xBase, yBase); setTimeout(draw, 100); }; window['stop'] = function() { stop = true; }; }); start();