1.0.1 • Published 1 year ago

last-oasis-logs v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

LastOasisLogs

This library is designed for the game LastOasis, it will give you the ability to easily parse game logs. It is possible to read the file locally. I hope this will be useful to you!

Installation

This is a Node.js module available through the npm registry.

Before installing, download and install Node.js.

If this is a brand new project, make sure to create a package.json first with the npm init command.

Installation is done using the

$ npm install last-oasis-logs

or

$ yarn add last-oasis-logs

Quick Start

LOCAL

import { LogsReader } from 'last-oasis-logs';

(async () => {
  const logsReader = new LogsReader({
    id: 1,
    autoReconnect: true,
    filePath: '/Mist/Saved/Logs/Mist.log',
  });

  await logsReader.init();

  logsReader.on('CHAT_MESSAGE', (data) => {
    console.log(data);
  });
})();

LogsReader return some pre-defined functions:

Functions

FunctionReturnTypeEmitter
initPromisePromise
closePromisePromise
getTileNameString?String or Undefined

Events

EventReturnType
CHAT_MESSAGEresponseTChatMessage
TILE_NAMEresponseTTileName
connectednullnull
closenullnull
1.0.1

1 year ago

1.0.0

1 year ago