Apostolique / Agar.io-bot

The aim of the project is to create a bot that can play Agar.io
MIT License
1.15k stars 1.93k forks source link

Launch multiple bots to gain mass #380

Closed jasikanicolepi closed 8 years ago

jasikanicolepi commented 8 years ago

I been seeing this quite often in the public server on agar.io now a day. After doing some research, I found a video. This is some kind of bot that commands other bots to "meet" at one location by following mouse so the player can make their one massive very big very quickly. Not sure if it is do-able, but it might require multiple IP? https://www.youtube.com/watch?v=oy0R6wVFLeY

Is it possible to edit the existing bot so it mimic the exact same behavior shown in the video?

Apostolique commented 8 years ago

It's definitely possible to edit the code to make that possible, but I don't support doing so.

stefnotch commented 8 years ago

Well, I doubt that this will get added.. Though, @Apostolique it would be great to have a function that makes to bot to go to a certain location. (Like the mouse thing...)

Apostolique commented 8 years ago

While it wouldn't be too hard to add that option in, the follow mouse isn't really a real path finding algorithm. It can easily never make it to the destination if it gets stuck by an obstacle wall.

stefnotch commented 8 years ago

Doesn't matter too much, it would be great to have that kind of function even if it isn't great. We/You can improve it later on...

laxika commented 8 years ago

They don't just follow the mouse if you watch it closely. They avoid other players etc...

stefnotch commented 8 years ago

Yeah, that's what I mean.

Drflash55 commented 8 years ago

I looked at another site for a script that allows bots to suicide into you to help you gain mass, and I found someone's post on here...

http://www.unknowncheats.me/forum/1254025-post106.html

He didn't give a code... The only thing you get close to helper bots are the Agar.io Raga Minions, which you have to pay...

Although, there was one video that was posted 2 hours ago, that cracked it... But, it doesn't work for me... link removed due to high suspicion of RAT program

If someone can tell me how it can work, that would be great... It only opens for a few seconds, then it closes... preventing me from using it.

paulharman commented 8 years ago

That is the same video as on their website. I highly expect the link in the youtube to be a virus

On 8 September 2015 at 23:11, Drflash55 notifications@github.com wrote:

I looked at another site for a script that allows bots to suicide into you to help you gain mass, and I found someone's post on here...

He didn't give a code... The only thing you get close to helper bots are the Agar.io Raga Minions, which you have to pay...

Although, there was one video that was posted 2 hours ago, that cracked it... But, it doesn't work for me... https://www.youtube.com/watch?v=iDSpioyTPEo

If someone can tell me how it can work, that would be great... It only opens for a few seconds, then it closes... preventing me from using it.

— Reply to this email directly or view it on GitHub https://github.com/Apostolique/Agar.io-bot/issues/380#issuecomment-138718485 .

henopied commented 8 years ago

Hmm maybe I should make a node client using pulviscriptor's stuff and the ogar bots that i have been working on to do this I do have a vm for testing and I have made suicide bots before XD

Apostolique commented 8 years ago

There's already an app for that: https://github.com/FliiFe/Agar.io-bot-desktop-app

Drflash55 commented 8 years ago

@henopied Do you still have the script for Suicide bots? I wanna test them out on my private server and see how they work and stuff.

henopied commented 8 years ago

The suicide bots I made are very stupid but ill send you the stuff dumb suicide bots edit: @Apostolique I am not in need of a ui and i like the event based client that he made I have some ideas on how I could make the bot only recalculate when something happens. edit 2: Also you can check the suicide bots on public servers without a ui just use pulviscriptor's streamer.

Drflash55 commented 8 years ago

@henopied I'm looking at the file, and I'm wondering how that gets activated... I don't think it's a executable JS script, but I'll try anyways and see if it does anything.

EDIT: I looked into it more and it says that it requires agario-client.js, so when I looked that up, I needed node.js, so that's what I'm getting right now, so that hopefully I can run it properly...

henopied commented 8 years ago

do the npm that is in pulviscriptor's client readme and place my script in that folder then run my script with node (I tested this on a debian vm and I may or may not have almost crashed the vm with 100 of those bots at the time I only had 2 cpus and 2 gb ram.)

Drflash55 commented 8 years ago

@henopied I have been getting close, like, being able to run your script, but now I'm wondering how do I get the bot to run on my server?

When I try inputting the IP of my server, and running it, it just closes off...

henopied commented 8 years ago

uncomment this line and replace it with your servers ip and make sure not to forget the ws part then comment off this guy

Drflash55 commented 8 years ago

@henopied Okay, it has worked...

When I tested them out, they seem to work fine for a little bit, then they suddenly stop... They sometimes go straight for me, and sometimes just go out on their own...

When I go to shut off the CMD, I have to kick them from the server for them to leave...

Is this a WIP? If so, I'm looking forward to seeing a much better version of this... :)

henopied commented 8 years ago

if they have no enemy to feed themselves into then yes it will not work and I do not plan on fixing that up because I just changed a few numbers from the example that pulviscriptor gave so I would probs make a smarter event driven bot instead. Example on new visible ball sort it into the prey, food or threats list and if it disappears find its index in one of the lists and remove it. and once it eats a cell it will recalculate target

Drflash55 commented 8 years ago

@henopied So, I went and did some more testing with the experimental suicide bot you made...

The number that you changed, made it think that the cell that was roaming around was eatable, so it charges into the cell, but it gets eaten instead. Because it happens, the bot then tries to relocate the cell that eat it, if it's within range. If not, it will idle until another cell comes into it's range.

Which brings up another issue... The bot is not programed to find a certain player, only a nearby cell. So, it's not like Raga Minion which has a whole bunch of bots programmed to beeline into your cell so you can gain incredibly large mass.

This makes me wonder if it's possible to add a script that programs it to find a certain player to feed itself too, the same kind of way that EptunLP did, except they didn't respawn.

henopied said: I would probably make a smarter event driven bot instead.

What do you mean by that exactly?

henopied commented 8 years ago

The suicide bot I made was mainly an attempt at humor tbh because I wanted to see how it would look if I put 100 across all turkey servers its honestly the most basic thing possible and it was a test so I will defiantly make it try and avoid all threats and go to 0,0 for example.

Apostolique commented 8 years ago

Not sure if it's because I'm drunk, but I give myself one hour to try and code something that will do what OP showed.

Drflash55 commented 8 years ago

@Apostolique And... how did that go for you?

henopied commented 8 years ago

@Drflash55 lel almost crashed the node but it was cool though but it didn't have the 0,0 code it was only the one I sent you. @Apostolique how did that work out for you?

Apostolique commented 8 years ago

It's done: https://github.com/Apostolique/AposFeedingBot

jasikanicolepi commented 8 years ago

I don't know if Agar.io made some changes but I am unable to have 2 bots running under the same "party" game. If I have one bot in the game, and another attempt to join, it will cause one bot to refresh it's page, and the 2nd bot (the one that is trying to join) will then join the game.

Endromede commented 8 years ago

you need to be offline ( or just slaves )

KristophPOL commented 8 years ago

hmm i have problem, if i try bots on my server all work good , but if try connect to normal agar.io server i can create 5 bots and no more, have error "connection refused". But on normal server if die don't respawn again... some tips ?

I use @henopied script

Drflash55 commented 8 years ago

@KristophPOL I'm guessing that you're using @henopied 's suiciding bots script.

That thing is just for fun, there's no real effort put into it, so it's bound to have some glitches. He can make something better if he put the time and effort into it.

KristophPOL commented 8 years ago

@henopied hmm , but how works raga.pw program , in 6 sec i have 25 bots on map

KristophPOL commented 8 years ago

@henopied

worker: connecting... worker: connection error: Error: connect ECONNREFUSED worker: Connection failed with reason: Error: connect ECONNREFUSED worker: Server address set to: ws://37.187.163.131:1502 please check if this is correct and working address

henopied commented 8 years ago

@KristophPOL wait a bit and I will have something much better that I will actually give support for. I am currently making a much better ogar bot and once I am done I will make the serverside client itself receive packets from a tamper monkey script that runs on the actual agar io website. I guess I have my work cut out for me.

KristophPOL commented 8 years ago

@henopied Can you tell me how get position on map in agar.io ?

henopied commented 8 years ago

I don't know what you mean by that if you want to get your cells position using the apos launcher you could do something like this

var player = getPlayer();
var playerPos = {x: player[0].x, y: player[0].y};
//console.log('The player pos is: ' + playerPos.x + ', ' + playerPos.y);
KristophPOL commented 8 years ago

ok thx , i have one more question it is possible to auto join party with apos launcher ?

henopied commented 8 years ago

Yea just put in the party url into the url box of your browser.

ghost commented 8 years ago

But keep in mind that there are other party's with the same link. You have to get lucky to connect to the same party.

KristophPOL commented 8 years ago

@henopied

Can you run more bots then 5 ? i can pay you if you help me

henopied commented 8 years ago

I don't know for sure but all I think you would need is every 5 bots you would need to connect to a different proxy

KristophPOL commented 8 years ago

i know , i try but how setup proxy in nodejs? i change ip but don't work , now have 10 servers and have 55 bots ... but this is cheap solution hehehe

KristophPOL commented 8 years ago

My test script , now works only for me but i write more function .... https://youtu.be/fr4HNM5dCZQ

henopied commented 8 years ago

Nice script one thing is you can make thenode file run multiple times with tmux instead of multiple putty instances (less overhead) here ill show you what I used:

for i in {1..100}; do tmux new -d -s agarfeedingbot$i; tmux send -t agarfeedingbot$i node SPACE example.js ENTER; done

and for the proxies but I think launching them separately is counterproductive because they can't easily share info like what their leader board info is. So basically what I am saying is they should be launched by the same js file

Drflash55 commented 8 years ago

Wow, @KristophPOL that's a pretty neat script you have there... Works the same as Raga Minions...

Do you think when it's finished that you can make a repository or something like that, that includes the scripts so it can run? You made a pretty good replica of it.

bIack commented 8 years ago

@KristophPOL Nice!! I can pay if you're willing to share this code. I'd even like to help with features if you want.

KristophPOL commented 8 years ago

I don't sell this now , this is only pseudo code :) but today big update, all works from server side , my own script to bots , etc ... video..

https://www.youtube.com/watch?v=ku3EqLXohNg&feature=youtu.be

henopied commented 8 years ago

@KristophPOL just wondering how did you manage to do the proxie also are you saying you replaced pulviscriptor's client?

KristophPOL commented 8 years ago

i have pulviscriptor's client, but create other code to bot , check my mass , my bots eat cell if have more then 600 mass , and later come to me , sometimes bot eat another bot to gain mass :) sry my english bad ;p

henopied commented 8 years ago

Did you use a standard proxy library for node?

KristophPOL commented 8 years ago

I have still problem with proxy , i don't use this at the moment , I have a lot of servers that communicate with each other.

henopied commented 8 years ago

That is very pricey :P https://github.com/nodejitsu/node-http-proxy could possibly be integrated into pulviscriptor's client.

KristophPOL commented 8 years ago

hi, i don't know why dont work this proxy :P i have something like this : client.connect('ws://' + srv.server , srv.key); // connect to server with party token.

Ok i add proxy to connect

var proxy = new httpProxy.createProxyServer({ target: srv.server, ws: true }).listen(1111);

And i change connect function :

client.connect('ws://127.0.0.1:1111', srv.key); worker1: connection error: Error: connect ECONNREFUSED worker1: Connection failed with reason: Error: connect ECONNREFUSED worker1: Server address set to: ws://127.0.0.1:1111 please check if this is correct and working address

if i remove ws from connection client.connect('127.0.0.1:1111', srv.key);

worker1: connecting... worker1: connection error: Error: connect EINVAL worker1: Connection failed with reason: Error: connect EINVAL worker1: Server address set to: 127.0.0.1:1111 please check if this is correct and working address