A script to monitor an RDM database and syncronize it with a PMSF database.
Install node.js (https://nodejs.org/en/) then run:
npm install mysql
npm install moment
npm install @rodrigogs/mysql-events
npm install pm2 (Optional. Can run in the background using tmux or pm2
You need to be on a branch of PMSF that supports manual submitting with a submitted_by column in raids and sightings.
4: Fill out the sync_config.json.example file that is located in /files and rename to sync_config.json.
pm2 start sync.js
You can start RDM before or after running sync.js. You will begin to see console outputs once RDM begins to populate its database.
RAIDS table:
id, external_id, fort_id, level, pokemon_id, move_1, move_2, time_spawn, time_battle, time_end, cp, submitted_by, form
SIGHTINGS table:
id, pokemon_id, spawn_id, expire_timestamp, encounter_id, lat, lon, atk_iv, def_iv, sta_iv, move_1, move_2, gender, form, cp, level, updated, weather_boosted_condition, weather_cell_id, weight
FORTS table:
id, external_id, lat, lon, name, url, sponsor, weather_cell_id, park, parkid, edited_by
FORT_SIGHTINGS table:
id, fort_id, last_modified, team, guard_pokemon_id, slots_available, is_in_battle, updated