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-place-bot
cd reddit-place-bot
npm install
Change users.example.json
to users.json
and add your username and password
of your account and all your throwaways.
If you run it as it is, is going to connect to the placebot-argentina-target repository and try to draw
the official_target.bmp
. If you don't want to do that you can open config.js
and
set autoupdateRemoteTarget: false
. This will make it use target.bmp
instead.
Every time it's time to place a pixel the bot will download the board (and latest remote target) and find the first pixel that doesn't match the target, and fill it with the correct color.
Since I honestly couldn't figure out how to make transparent BMP files I just
set it so that the color #ff00ff
is considered transparent. Anything transparent
will be ignored.
You have to use the exact same colors as the board or the app is gonna throw an error, it's not smart enough to guess the colors based on similarity.
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