Forked klayveR/poe-log-monitor
Install with npm:
$ npm install poe-log-monitor
Usage:
var PathOfExileLog = require("poe-log-monitor");
var poeLog = new PathOfExileLog({
logfile: "C:/Program Files (x86)/Grinding Gear Games/Path of Exile/logs/Client.txt"
});
poeLog.on("message", (message) => {
console.log("(" + message.chat + ") " + message.player.name + ": " + message.message);
});
options
- An optional object containing some of the following optionslogfile
- The path to Path of Exile's Client.txt- default:
C:/Program Files (x86)/Grinding Gear Games/Path of Exile/logs/Client.txt
- default:
interval
- The interval, in milliseconds, to check for changes in the log file- default:
1000
- default:
Constructs a new PathOfExileLog
. If the path to the log file is valid, the script will automatically start monitoring it. You can pause or resume monitoring using the pause()
or start()
method respectively.
Pauses monitoring the logfile.
Resumes monitoring the logfile.
Parses the full logfile.
The parameters listed below each event are stored in an object emitted by the event.
server
- The gateway the player logged intolatency
- The time, in milliseconds, it took to log in
Emitted when the player logs into the game.
address
- Instance server the player connected to
Emitted when the player changes the instance server. This can be useful for determining whether a player enters an area instance the player previously entered, or a newly created one.
name
- The name of the area that has been enteredtype
- The type of the areainfo
- An array of objects containing additional information about the area and their variants, if data is available. The emitted object has a different format based on thetype
.
Emitted when the player enters an area. See AREA.md for more information about this event.
player
name
- Name of the player who joined the area
Emitted when another player enters the area the player is in.
player
name
- Name of the player who joined the area
Emitted when another player leaves the area the player is in.
chat
- Chat which the player joinedchannel
- Channel the player joinedlanguage
- Language of the channel
Emitted when the player joins a chat channel.
chat
- Chat in which the message appeared- Possible values:
global
,trade
,guild
,party
,local
- Possible values:
player
guild
- Guild tag of the player who sent the message, if presentname
- Name of the player who sent the message
message
- Message the player sent
Emitted when a message appears in any of the active chat channels.
direction
- Direction of the whispered message- Possible values:
To
,From
- Possible values:
player
guild
- Guild tag of the player who sent the whisper, if presentname
- Name of the player who sent the whisper
message
- Message the player sent
Emitted when a whisper is received or sent.
name
- Name of the player that died
Emitted when the player dies.
name
- Name of the playercharacterClass
- Character class of the playerlevel
- Level of the player after level up
Emitted when the player levels up.
accepted
-true
if the player accepted the trade
Emitted when the player finishes a trade.
name
- Name of the NPCmessage
- Dialogue of the NPC
Emitted when when the player encounters a talking NPC in the wild.
⚠
Output Dialogue To Game
must be activated in the game UI options for this to work.
⚠ The list of supported NPCs is currently incomplete. Feel free to add NPCs that a player might encounter in the wild to the
resource/npc.json
file.
name
- Name of the Mastermessage
- Dialogue of the Master
Emitted when the player encounters a master in an area.
⚠
Output Dialogue To Game
must be activated in the game UI options for this to work
status
-true
if the player is AFKautoreply
- The auto reply set by the player
Emitted when the players AFK status changes.
status
-true
if the player enabled DND modeautoreply
- The auto reply set by the player
Emitted when the players changes their DND mode status.
deaths
- Times the player died
Emitted when the player uses the /deaths
command in game.
monsters
- The amount of remaining monsters in an area
Emitted when the player uses the /remaining
command in game.
days
- Days since the character has been createdhours
- Hours since the character has been createdminutes
- Minutes since the character has been createdseconds
- Seconds since the character has been created
Emitted when the player uses the /age
command in game.
days
- Days spent playing the characterhours
- Hours spent playing the characterminutes
- Minutes spent playing the characterseconds
- Seconds spent playing the character
Emitted when the player uses the /played
command in game.
Emitted when the script resumes monitoring the log file. This event emits no additional data.
Emitted when the script pauses monitoring the log file. This event emits no additional data.