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

poe-log-events

v4.0.0

Published

Monitors the PoE log file and emits events

Downloads

146

Readme

Path of Exile Log Events

NPM Version LICENSE TOP LANGUAGE ISSUES TEST_WORKFLOW codecov

Table of Contents

Introduction

The purpose of this library is to provide an easy to use event emitter for the game Path of Exile (PoE) by Grinding Gear Games to be used by other applications listening to events. Therefore, this library monitors the log file of the PoE client and emits events when something interesting happens ingame.

Note: This product isn't affiliated with or endorsed by Grinding Gear Games in any way.

Overview

The key objectives of this library are:

  • Provide an event emitter for the PoE log file
  • Fire custom events with detailed event-specific data
  • Support all languages

Installation

Install the latest stable version of this library:

 npm install --save poe-log-events

Getting started

import { Language, LogOptions, PathOfExileLog } from "poe-log-events";

const logOptions: LogOptions = {
  // default path for windows
  logFilePath: "C:\\Program Files (x86)\\Grinding Gear Games\\Path of Exile\\logs\\Client.txt",
  // can be ignored by most applications
  ignoreDebug: true,
  language: Language.English,
};

const poeLog = new PathOfExileLog(logOptions);

// register event handlers

poeLog.on("areaChanged", (event) => {
  console.log(`Entered new area ${event.newArea} at ${event.date.toISOString()}`);
});

poeLog.on("buyItemWhisperSent", (event) => {
  console.log(
    `Sent buy request to buy ${event.item} for ${event.price} ${event.currency} from ${event.player}`
  );
});

poeLog.on("sellItemWhisperReceived", (event) => {
  console.log(
    `Received request to sell item ${event.item} for ${event.price} ${event.currency} to ${event.player}`
  );
});

poeLog.on("error", (err) => {
  console.error(err);
});

Handling errors

Errors are emitted in the error event. Hence, add a listener to the error event:

poeLog.on("error", (err) => {
  console.error(err);
});

Events

The available events are defined by the interface PathOfExileLogEvents. See below for a list.

| Name | Description | Type | | ----------------------- | -------------------------------------------------------- | -------- | | error | Error occured | - | | line | New line was parsed | INFO | | whisperReceived | A whisper was received | INFO | | whisperSent | A whisper was sent | INFO | | sellItemWhisperReceived | A trade whisper for selling an item was received | INFO | | buyItemWhisperSent | A trade whisper for buying an item was sent | INFO | | sellBulkWhisperReceived | A trade whisper for selling an item in bulk was received | INFO | | buyBulkWhisperSent | A trade whisper for buying an item in bulk was sent | INFO | | areaEntered | A new area was entered | INFO | | areaJoinedBy | The current area was joined by another player | INFO | | areaLeftBy | The current area was left by another player | INFO | | tradeAccepted | A trade was completed | INFO | | tradeCancelled | A trade was cancelled | INFO | | connected | Client connected to the PoE server | INFO | | afk | AFK mode started | INFO | | afkEnd | AFK mode ended | INFO | | dnd | DND mode started | INFO | | dndEnd | DND mode ended | INFO | | login | Client logged in | INFO | | chatJoined | A chat channel was joined | INFO | | deathCount | /deaths command was executed | INFO | | remainingMonster | /remaining command was executed | INFO | | slain | Player was slain | INFO | | level | Player leveled up/down | INFO | | playedQuery | /played command was executed | INFO | | createdQuery | /age command was executed | INFO | | areaGenerated | A new area was generated and entered by the player | DEBUG |