Advertisement
KKosty4ka

chess piece remover for OWOT

Feb 6th, 2023
872
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // chess piece remover for OWOT
  2. // don't select too much or else your computer will go boom
  3.  
  4. w.setFlushInterval(0);
  5.  
  6. menu.addOption("clean", () =>
  7. {
  8.     var sel = RegionSelection();
  9.     sel.init();
  10.     sel.onselection( (coords1, coords2, width, height) =>
  11.     {
  12.         var x1 = coords1[0] * 16 + coords1[2];
  13.         var y1 = coords1[1] * 8 + coords1[3];
  14.         var x2 = coords2[0] * 16 + coords2[2];
  15.         var y2 = coords2[1] * 8 + coords2[3];
  16.  
  17.         for (var x = x1; x <= x2; x++)
  18.         {
  19.             for (var y = y1; y <= y2; y++)
  20.             {
  21.                 var info = getCharInfoXY(x, y);
  22.                 if (!"πœ²Ίπœ²»πœ²Όπœ²½πœ²Ύπœ²Ώπœ³€πœ³πœ³‚πœ³ƒπœ³„πœ³…πœ³†πœ³‡πœ³ˆπœ³‰πœ³Šπœ³‹πœ³Œπœ³πœ³Žπœ³πœ³πœ³‘".includes(info.char) ) continue;
  23.  
  24.                 writeCharToXY(" ", 0x000000, x, y);
  25.             }
  26.         }
  27.     });
  28.     sel.startSelection();
  29. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement