SHARE
TWEET

Untitled

a guest Apr 2nd, 2017 106 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //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 "
  2. r['placeModule']('hns', mod => {
  3.     const hns = '5555555555555335555555555555555555555538833555555555550555555555533883355555555555555555555553888355555555550555535555553888335555555555553355555553888835555555550388388355553888835555555538888355555553888355555553888888355555553888355555538888835555555538883555535538888835555555538883555555538388835555555388835555555535388835555553888355555535555388835555538883555555555555388835555388835555555555555388835553888355555555555555388835388883555555333555555388833888835555338883355555388883883555538888888333333333338835555388833888883888388833355538888353888388883888833553888335553383888838888383388835555555338888388883833883555555555338883888338352255555555555333333333335'; //its the proper hammer and sickle, I promise
  4.   const place = window['r']['place'];
  5.   const getCooldownTimeRemaining = place['getCooldownTimeRemaining'].bind(place);
  6.   const getPaletteColorABGR = place['getPaletteColorABGR'].bind(place);
  7.   const getPaletteColor = place['getPaletteColor'].bind(place);
  8.   const enable = place['enable'].bind(place);
  9.   const setColor = place['setColor'].bind(place);
  10.   const drawTile = place['drawTile'].bind(place);
  11.   const inspectTile = place['inspectTile'].bind(place);
  12.   const xBase = 3;
  13.   const yBase = 413;
  14.   const w = 26;
  15.   const h = 26;
  16.   const timePasses = n => new Promise(resolve => setTimeout(resolve, n));
  17.   const c = mod('canvasse');
  18.   const world = mod('world');
  19.  
  20.   const getTileColor = (x, y) => {
  21.       return c.readBuffer[x + xBase + (y + yBase) * w];
  22.   }
  23.  
  24.   const canDraw = () => getCooldownTimeRemaining() === 0;
  25.  
  26.   const waitToDraw = () => new Promise(resolve => {
  27.     const check = () => {
  28.       if (canDraw()) {
  29.         resolve();
  30.       } else {
  31.         setTimeout(check, 1000);
  32.       }
  33.     }
  34.  
  35.     setTimeout(check, 1000);
  36.   });
  37.  
  38.     const color = (x, y) => hns.charCodeAt(x + y * w) - 48;
  39.  
  40.   const matches = (x, y) =>
  41.       getPaletteColorABGR(color(x, y)) ===
  42.         c['writeBuffer'][xBase + x + (yBase + y) * 1000];
  43.  
  44.   const draw = () => {
  45.       for(let i = 0; i < hns.length; i++) {
  46.           const rand = Math.floor(Math.random()*hns.length);
  47.           const x = rand % w;
  48.           const y = Math.floor(rand / h);
  49.           if (!matches(x, y)) {
  50.               console.log(x + xBase);
  51.               console.log(y + yBase);
  52.               console.log(color(x, y));
  53.               enable();
  54.               setColor(color(x, y));
  55.               drawTile(xBase + x, yBase + y);
  56.               break;
  57.           }
  58.       }
  59.       world['updateActivity'](1);
  60.     waitToDraw().then(window.start);
  61.   };
  62.  
  63.   let stop = false;
  64.  
  65.   window['start'] = function() {
  66.     if (stop) {
  67.       stop = false;
  68.       return;
  69.     }
  70.  
  71.     inspectTile(xBase, yBase);
  72.     setTimeout(draw, 100);
  73.   };
  74.  
  75.   window['stop'] = function() {
  76.     stop = true;
  77.   };
  78. });
  79.  
  80. start();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top