Network protocol for diablo 2 : create client and servers for diablo 1.13 and 1.14.
npm install diablo2-protocol
Follow bot in a few lines
const { createClientDiablo } = require('diablo2-protocol')
async function start () {
const clientDiablo = await createClientDiablo({
host: 'battlenetIp',
username: 'myUser',
password: 'myPassword',
version: '1.14',
keyClassic: 'my16CharsKey',
keyExtension: 'my16CharsKey'
})
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 [-h] [-v] -au USERNAME -ap PASSWORD -c CHARACTER -gn \
GAMENAME -gp GAMEPASSWORD -gs GAMESERVER -s SIDSERVER \
[-dv DIABLOVERSION] -k1 KEYCLASSIC -k2 KEYEXTENSION
Sniffer (Linux / MacOS only)
cd example/sniffer
npm install
sudo node sniffer.js