maple2-packetlib-ts
v1.2.0
Published
MapleStory2 Packet Library in TypeScript
Readme
Maple2-PacketLib-TS
Maple2-PacketLib-TS is a TypeScript library designed to read and parse MapleShark2 Sniffs and MapleStory2 packet data.
Features
- MSB File Reading: Read and parse MSB files to extract metadata and packets.
- CLI Commands:
metadata-builder: Build metadata cache for the given folderduplicate-finder: Find and optionally delete duplicate files in the given folderversion-finder: Find files matching the given version in the folder
NPM
https://www.npmjs.com/package/maple2-packetlib-ts
pnpm install maple2-packetlib-ts
Installation
To install the dependencies, run:
pnpm installBuilding the Project
To build the project, run:
pnpm run buildUsage
Reading MSB Files
To read and parse an MSB file, use the MsbReader class:
The MsbReader class automatically extracts metadata upon initialization:
const msbReader = new MsbReader('path/to/file.msb');
console.log(msbReader.metadata);To read the packets, use the function readPackets:
import { MsbReader } from './src/tools/file-loader';
const msbReader = new MsbReader('path/to/file.msb');
const packets = msbReader.readPackets();
console.log(packets);CLI Commands
metadata-builder
Build metadata cache for the given folder:
maple2-packetlib-ts metadata-builder .duplicate-finder
Find and optionally delete duplicate files in the given folder:
maple2-packetlib-ts duplicate-finder .version-finder
Find files matching the given version in the folder:
maple2-packetlib-ts version-finder . 12