diablo2-protocol

1.4.1 • Public • Published

diablo2-protocol

NPM version Build Status

Network protocol for diablo 2 : create client and servers for diablo 1.13.

Usage example

Installation

npm install diablo2-protocol

Usage

Follow bot in a few lines

const { createClientDiablo } = require('diablo2-protocol')
 
async function start () {
  const clientDiablo = await createClientDiablo({
    host: 'battlenetip',
    username: 'myuser',
    password: 'mypassword'
  })
  clientDiablo.on('D2GS_PLAYERMOVE', ({ targetX, targetY }) => {
    clientDiablo.write('D2GS_RUNTOLOCATION', {
      x: targetX,
      y: targetY
    })
  })
 
  await clientDiablo.selectCharacter('mycharacter')
  await clientDiablo.createGame('mygame', '', '21', 0)
  console.log('Has joined the game')
}
 
start()
 

See docs/API.md

Follow bot example

node examples/simpleBot.js myusername mypassword mycharacter mygamename mygamepassword 4 myserverip

Sniffer (Linux / MacOS only)

cd example/sniffer
npm install
sudo node sniffer.js

Projects using diablo-protocol

  • diablo2-live-viewer displaying a live diablo map and live packets table
  • AutoTathamet Create Diablo2 bots with a powerful, stable, and high level JavaScript API.

Roadmap

  • Test all packets
  • Sniffer
  • more documentation
  • Proxy ?
  • More examples
  • Web / mobile interface

Docs

Diablo

Libs

Readme

Keywords

Package Sidebar

Install

npm i diablo2-protocol

Weekly Downloads

8

Version

1.4.1

License

MIT

Unpacked Size

323 kB

Total Files

61

Last publish

Collaborators

  • rom1504