Apostolique / AposFeedingBot

This is an Agar bot designed to blatantly cheat with an army of feeding bots.
22 stars 11 forks source link

communication problems #15

Open agarioBotDev opened 8 years ago

agarioBotDev commented 8 years ago

Hi Apos :-),

do you have an idea how can i communicate bewteen pulviscriptor's multiple.js and an google chrome extension ?

greets, David

Apostolique commented 8 years ago

I wish I did, but I've never done that before.

henopied commented 8 years ago

you would need an extension that would create a websocket between chrome and your nodejs app.

agarioBotDev commented 8 years ago

I tried connecting via socket.io, adding this to multiple.js:

function startServerTest() {
    var Server = require('socket.io').listen(3000).sockets;

    Server.on('connection', function (socket) {
        console.log('connected');

        socket.on('party', function (party) {
            var log = party.party;
            console.log('new party: ' + log);
        });

    });

}

when i try to connect with my extension and do (in the extension):

testSocket.emit('party', { party:  'something' }); // testSocket is already connected to multiple.js 

it seems to work, because it logs 'connected' but multiple.js do not receive any data.....

by the way: you can only connect 4 bots on a party server with one ip, how can i avoid this ? something like a proxy ? ;-) an idea would be great.