Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //To use the cock and balls + sickle script. Hit F12 in your browser. And paste it in the dev section. Press enter. It should say "
- r['placeModule']('hns', mod => {
- const hns = '5555555555555335555555555555555555555538833555555555550555555555533883355555555555555555555553888355555555550555535555553888335555555555553355555553888835555555550388388355553888835555555538888355555553888355555553888888355555553888355555538888835555555538883555535538888835555555538883555555538388835555555388835555555535388835555553888355555535555388835555538883555555555555388835555388835555555555555388835553888355555555555555388835388883555555333555555388833888835555338883355555388883883555538888888333333333338835555388833888883888388833355538888353888388883888833553888335553383888838888383388835555555338888388883833883555555555338883888338352255555555555333333333335'; //its the proper hammer and sickle, I promise
- 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();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement