3.0.8 • Published 1 year ago
scenexe v3.0.8
scenexe
Description
Connect to scenexe.io game servers and make scenexe bots.
Worked on scenexe.io version ALPHA 0.11.6.
Does not work on scenexe.io version ≥ ALPHA 0.11.7.
Installation
npm install scenexe
Usage
const { Hub, GameSocket } = require('scenexe');
var hub = new Hub('main', { interval: true });
hub.on('ready', () => {
var server = hub.findServer('2 teams', 'new york');
joinServer(server.address);
})
function joinServer(address) {
var bot = new GameSocket(address, hub);
bot.on('open', () => {
bot.spawn('hi');
});
bot.on('ready', () => {
console.log('Joined game.');
console.log('bot is on team', bot.team.type);
})
}
Documentation
in progress at https://discordtehe.github.io/scenexe.html
Credits
- the structure of src/gamesocket.js borrows heavily from the structure of https://github.com/Cazka/diepsocket/blob/master/src/diepsocket.js
- scenexe.io version ≥ 0.11.3