sadgod
Version:
SadGod helps you extract data from ROTMG's internal SWF files. Currently it allows you to read the names and values of all binary packet ids used in the network communication. This is helpful because the game often changes the packet ids.
20 lines (16 loc) • 646 B
JavaScript
const {readFile} = require('fs-extra')
const {join} = require('path')
const standardPaths = {
gameServerConnection: "scripts\\kabam\\rotmg\\messaging\\impl\\GameServerConnection.as",
parameterSection: "scripts\\com\\company\\assembleegameclient\\parameters\\Parameters.as"
}
async function getFiles(swfData) {
const files = {...standardPaths}
const fileEntries = Object.entries(files)
for (let i = 0; i < fileEntries.length; i++) {
const [name, relativePath] = fileEntries[i]
files[name] = await readFile(join(swfData.extractionFolder, relativePath), 'utf8')
}
return files
}
module.exports = getFiles