This is a bot I made for the Reddit /r/place event of 2017 April Fools Day.
I made this bot to protect our national flag on /r/argentina
You need to have NodeJS installed
git clone https://github.com/zequez/reddit-placebot
cd reddit-placebot
npm install
Change users.example.json to users.json and add your username and password
of your account and all your throwaways.
The target file must meet the following requirements:
- Format: BMP
- Dimensions: 1000x1000
- Compression: NONE! Should weight about 3mb, 4 bytes per color
- Colors: exactly the same colors used in the board
- Transparency: Color
#ff00ffffis considered transparent (a bright purple color), and will be ignored by the bots
You can check the colors on colors.js, but is easier to
import board.example.bmp to your image editor, and use the eyedropper tool
from there. You can use that image as a template and go from there too, covering
parts that you don't use in #ff00ffff
With an advanced image editor is recommended to have the board in a separate layer so you actually know what you're modifying.
The bot downloads the board each time it's time to draw, so it only changes the necessary pixels that don't match the target.
You can configure the target to be downloaded from a remote image by
settin on config.js:
autoupdateRemoteTarget: trueREMOTE_TARGET_URL: "http://example.com/remote_target.bmp"
The image will be downloaded before paining and saved to target.bmp.
Just use the file target.bmp and set autoupdateRemoteTarget: false on config.js.
npm run start
It'll keep keep drawing forever and if it can't draw anymore it's gonna wait until something breaks and fix it.
LOL
You can npm run watch, but that's about it.
Thanks to trosh/rplace to figure out how to actually read the bitmap from the server. I just ported that to Node.
MIT
