npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@perion/perion

v0.1.6

Published

A library that contains all the utilities for creating a MapleStory server emulator

Downloads

19

Readme

@perion/perion Travis CI Build Status Code coverage

A library of Node.js modules that help bring MapleStory private server development to the npm ecosystem.

npm i --save @perion/perion
  • Note this project is in early development, use with caution

Overview

Core Packages

  • calc

A calculator library that implements standard MapleStory specific calculations such as damage, stat modifiers, experience, and levels.

const calc = require('@perion/calc');

/** Example player stats object */
const playerStats = {base: {str: 4, ...}, hyper: {str: 1, ...}};

/** crypto.calc example */
const modifiedStats = calc.HyperStats(playerStats).applyAll().get();

/** Returns {str: 34, ...} */
  • crypto

A cryptography library that exposes everything you need to encrypt/decrypt data for MapleStory.

const crypto = require('@perion/crypto');

/** Example data */
const payload = Buffer.from([0x1]);
const sendIv = Buffer.from([0x0, 0x2, 0x3, 0x4]);
const recvIv = Buffer.from([0x4, 0x2, 0x1, 0x0]);

/** crypto.Shanda example */
const encrypted = crypto.Shanda.encrypt(payload);
const decrypted = crypto.Shanda.decrypt(payload);

/** Returns the input buffer with the payload encrypted/decrypted using Maple Custom Shanda */

/** crypto.AES example */
/**
  * You must initialize the AES class with:
  * - an IV (Initialization Vector)
  * - a MapleStory version number
  *
  * The IV must have a length of 4
  * As the server, you must send the IV for both send and recv to the client
  */
const sendAES = new crypto.AES(sendIv, 83);
const recvAES = new crypto.AES(recvIv, 83);

const encryptedOut = sendAES.transform(payload);
const decryptedIn = recvAES.transform(payload);

/** Returns the input buffer with the payload encrypted/decryped using Maple AES */
  • net

A packet parser using method-chaining syntax for compact and efficient parsing/writing of packet structures.

const net = require('@perion/net');

/** Example buffer */
const data = Buffer.from([1, 2]);

/** net.Packet.Parser example */
const packet = new net.Packet.Parser(data);
const fields = ['id', 'name', 'hp'];
const unpacked = packet.int().mapleascii().int().collect(fields);

/** Returns {id: <number>, name: <string>, hp: <number>} */

/** net.Packet.Writer example */

/** Initialize with length */
let packet = new net.Packet.Writer(5);
packet = packet.byte(0x0).int(9).buffer();

/** Returns the buffer with data */
  • script

A generic scripting engine for NPCs, events, maps, etc.

  • wz

A WZ library that can read and write to the WZ file format.

Neat Features

  • Uses Google's recommended JS style guidelines, fully documented code including full JSDoc comments
  • Modular packages, so use what you want
  • Full test coverage, with a minimum coverage threshold of 90%
  • Zero dependencies

Project Goals

In Progress

  • Networking protocol
  • Damage calculations
  • Event timers
  • WZ and NX file format
  • Generic MapleStory abstractions
  • Multiple MapleStory versions

Project Overview

Linter

npm run lint

Test

npm run test
npm run lcov

Documentation

Click here for the code documentation!

Contributing

For now, there are no contribution guidelines. I only ask that you follow the eslint rules when contributing a pull request. Thanks!

ForTheBadge built-with-love