Created
June 20, 2015 20:54
-
-
Save fuglede/015cbd676c8b9a4c97a8 to your computer and use it in GitHub Desktop.
Agar with friends
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You might have to change the URL in line 9 to http://m.agar.io if you run into problems.