1.4.11 • Published 2 years ago

node-zanarkand-ffxiv v1.4.11

Weekly downloads
22
License
ISC
Repository
github
Last release
2 years ago

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);
});
1.4.11

2 years ago

1.4.10

3 years ago

1.4.9

3 years ago

1.4.4

3 years ago

1.4.3

3 years ago

1.4.2

3 years ago

1.4.8

3 years ago

1.4.7

3 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.2.2

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.2.1

4 years ago

1.1.0

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago