Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-zanarkand-ffxiv

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-zanarkand-ffxiv

An event-based Node.js wrapper for Zanarkand.

  • 1.4.11
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

node-zanarkand-ffxiv

A WIP Node.js wrapper for acchan's Zanarkand network capture library.

Event type names and all packet structures are taken from the Sapphire project.

NOTE: Most features besides the any data event will break after every patch release until the IPC opcodes are updated in the Sapphire repo.

Installation

npm install node-zanarkand-ffxiv

Be sure to also install Go to build ZanarkandWrapperJSON and place the output in the ZanarkandWrapper folder.

Example

import { ZanarkandFFXIV } from "node-zanarkand-ffxiv"
const Zanarkand = new ZanarkandFFXIV();

Zanarkand.start(async () => {
    console.log("Zanarkand started!");
    await Zanarkand.reset(); // Also promisified!
});

// Assign event handlers
Zanarkand.on('initZone', (content) => {
    console.log(`[${getTime()}]Zone loaded.`);
});

Zanarkand.on('marketBoardItemListing', (content) => {
    var output = "HQ\tMateria\tPrice\tQuantity\tTotal\tCity\t\tRetainer\n";
    for (let i = 0; i < content.prices.length; i++) {
        output += `${content.qualities[i]}\t${content.materiaCounts[i]}\t${content.prices[i]}\t${content.quantities[i]}\t\t${content.totals[i]}\t${content.cities[i] !== "Ul'dah" && content.cities[i] !== "Kugane" && content.cities[i] !== "Ishgard" ? content.cities[i] :
                    (content.cities[i] === "Kugane" ? "Kugane\t" : (content.cities[i] === "Ishgard" ? "Ishgard\t" : "Ul'dah\t"))}\t${content.retainers[i]}\n`;
        if (content.materia[i].length > 0) output += `Materia: ${content.materia[i].toString()}\n`;
    }
    console.log(output);
});

FAQs

Package last updated on 26 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc