This is very similar to my previous node.js script, but instead of making accounts, it names them. I was successfully able to name 30 accounts in a matter of seconds, so I know it's working.
THIS IS NOT A MULE CREATOR.
Proof:
To use this, install node.js and npm, navigate to the directory of the file, run `npm install request`, add your accounts, and then run `node namer.js` (or whatever you called the file).
Code:
"use strict";
var request = require('request'); //The module to make calls to ROTMG server, please run 'npm install request' first.
const baseUrl = 'http://realmofthemadgod.appspo*****m/';
var accNames = {},
letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
number = '0123456789';
function namer(email, pass) { //the function to namne accounts
var name = `Tom${randomValue(6, letters)}`; //you can change Tom to whatever, but beware that there is a limit on name length so I'd keep it at a 3 letter word + the random letters
var info = {
guid: email,
ignore: randomValue(4, number),
password: pass,
name: name
}
var accUrl = buildUrl(baseUrl + 'account/setName', info);
request(accUrl.substring(1, accUrl.length - 1), (error, response, body) => {
if (!error && response.statusCode == 200) {
accNames[email] = pass;
console.log(`Account named! Email: ${email}, name: ${name}`);
} else {
console.log(`${error}\n${body}`);
}
})
}
function randomValue(len, charSet) { //random shit, move along
var randomString = '';
for (var i = 0; i < len; i++) {
var randomPoz = Math.floor(Math.random() * charSet.length);
randomString += charSet.substring(randomPoz, randomPoz + 1);
}
return randomString;
}
function buildUrl(url, parameters) { //build the url with all the information we need to send to ROTMG in order to name the mule
var qs = "";
for (var key in parameters) {
var value = parameters[key];
qs += encodeURIComponent(key) + "=" + encodeURIComponent(value) + "&";
}
if (qs.length > 0) {
qs = qs.substring(0, qs.length - 1);
url = url + "?" + qs;
}
return JSON.stringify(url);
}
var accountsList = { //put your accounts here, in muledump format.
"email+0@gmail.com": "password",
"email+1@gmail.com": "password",
"email+2@gmail.com": "password"
};
var listArray = Object.keys(accountsList);
(()=>{
listArray.forEach((item, index) => {
namer(item, accountsList[item]);
})
})();