maple2-packetlib-ts
v1.0.0
Published
MapleStory2 Packet Library in TypeScript
Downloads
4
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
pnpm install maple2-packetlib-ts
Installation
To install the dependencies, run:
pnpm install
Building the Project
To build the project, run:
pnpm run build
Usage
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