l2-api

Lineage 2 API for managing databases.

Usage no npm install needed!

<script type="module">
  import l2Api from 'https://cdn.skypack.dev/l2-api';
</script>

README

L2 Api

NPM version Downloads

Intro

L2 Api is a module that helps you to intereact with your L2OFF and L2J (in the future) projects.

const L2Api = require('l2-api');

const l2 = new L2Api('mssql_user', 'mssql_password', 'mssql_host');

const topPVP = await l2.getTopPVP(20);

As you can see, we can easily get the top 20 PVP of our project.

Getting Started

Installing L2Api

Locally

$ npm install l2-api

Configuring your credentials

The only thing you should do is requiring the module and initialize the L2Api with your credentials.

const L2Api = require('l2-api');

const l2 = new L2Api('mssql_user', 'mssql_password', 'mssql_host');

Now you should be able to do:

const topPVP = await l2.getTopPVP(20);

Available functions

Account

  • l2.getAccountByName('account_name')

Chars

  • l2.getCharByName('char_name')
  • l2.getTopPVP(limit)
  • l2.getTopPK(limit)