Skip to content

Instantly share code, notes, and snippets.

@fuglede
Created June 20, 2015 20:54
Show Gist options
  • Save fuglede/015cbd676c8b9a4c97a8 to your computer and use it in GitHub Desktop.
Save fuglede/015cbd676c8b9a4c97a8 to your computer and use it in GitHub Desktop.
Agar with friends
// How to play with your friends on agar:
// 1) Paste the script below into the console.
// 2) Find some entries with the same IP.
// 3) Run one of the commands yourself and give the
// others to the people you want to play with
// 4) Repeat until you end up on the same server.
function makeServerList() {
jQuery.ajax("https://m.agar.io/", {
success: function(a) {
a = a.split("\n");
console.log("connect(\"ws://" + a[0] + "\", \"" + a[1] + "\")")
},
dataType: "text",
method: "POST",
data: "EU-London"
})
}
$('document').ready(function(){
for (i=0;i<20;i++) {
makeServerList();
}
});
@fuglede
Copy link
Author

fuglede commented Jun 20, 2015

You might have to change the URL in line 9 to http://m.agar.io if you run into problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment