This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import struct, zlib, sys, re | |
| BLK = 0x100000 | |
| DEFAULT_WINDOW = 0x104 # end of the map-identity header: first per-save field seen in the aba3/aba4 diffs | |
| DEFAULT_EXTRA = ['0x10e:4'] # stable 4-byte field beyond that window (offset:length) | |
| fold = lambda x: (x ^ x >> 16) & 0xFFFF | |
| def chk(n, u, comp): | |
| return fold(zlib.crc32(comp)) << 16 | fold(zlib.crc32(struct.pack('<III', n, u, 0))) | |
| def hdr_crc(h): | |
| h = bytearray(h); h[-4:] = bytes(4); return zlib.crc32(h) | |
| def blocks(d): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name PlaceNL Bot Yet another edition | |
| // @namespace https://github.com/ | |
| // @version 24 | |
| // @description Bot for r place, based on CZ | |
| // @author NoahvdAa, GravelCZ, MartinNemi03, ... | |
| // @match https://www.reddit.com/r/place/* | |
| // @match https://new.reddit.com/r/place/* | |
| // @match https://reddit.com/r/place/* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=reddit.com |