Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // chess piece remover for OWOT
- // don't select too much or else your computer will go boom
- w.setFlushInterval(0);
- menu.addOption("clean", () =>
- {
- var sel = RegionSelection();
- sel.init();
- sel.onselection( (coords1, coords2, width, height) =>
- {
- var x1 = coords1[0] * 16 + coords1[2];
- var y1 = coords1[1] * 8 + coords1[3];
- var x2 = coords2[0] * 16 + coords2[2];
- var y2 = coords2[1] * 8 + coords2[3];
- for (var x = x1; x <= x2; x++)
- {
- for (var y = y1; y <= y2; y++)
- {
- var info = getCharInfoXY(x, y);
- if (!"π²Ίπ²»π²Όπ²½π²Ύπ²Ώπ³π³π³π³π³π³ π³π³π³π³π³π³π³π³π³π³π³π³".includes(info.char) ) continue;
- writeCharToXY(" ", 0x000000, x, y);
- }
- }
- });
- sel.startSelection();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement