· 6 years ago · Dec 09, 2019, 12:30 AM
1// ==UserScript==
2// @name Account Cretor
3// @version 0.2
4// @description Cria contas fakes para o famoso mar de BBs
5// @author Victor Garé
6// @include https://*?ref=player_invite_linkrl*
7// @include https://*?welcome=1*
8// @include https://*?screen=overview&intro*
9// @require https://code.jquery.com/jquery-2.2.4.min.js
10// @downloadURL https://raw.githubusercontent.com/victorgare/tribalwars/master/UserScript/AccountCreator.user.js
11// @updateURL https://github.com/victorgare/tribalwars/raw/master/UserScript/AccountCreator.user.js
12// @run-at document-end
13// ==/UserScript==
14
15var url = "";
16var mundo = "";
17
18const caracteres = "abcdefghijklmnopqrstuvxzwy";
19var nameLength = Math.floor(Math.random() * 10) + 5;
20const criarConta = "?ref=player_invite_linkrl";
21const escolherMundo = "?welcome=1";
22const logado = "?screen=overview&intro";
23
24$(window).load(function () {
25 var urlAtual = window.location.href;
26
27 if (urlAtual.indexOf(criarConta) !== -1) {
28 console.log("criou a conta");
29 CriarConta();
30
31 }
32
33 if (urlAtual.indexOf(escolherMundo) !== -1) {
34 console.log("escolheu o mundo");
35 AcessarMundo();
36 }
37
38 if (urlAtual.indexOf(logado) !== -1) {
39 console.log("voltou pro inicio");
40 window.location.href = url;
41 }
42});
43
44//primeiro passo, preencher o form para criar a conta
45function CriarConta() {
46 var name = "";
47 var pass = "";
48 var email = "";
49
50 for (let i = 0; i < nameLength; i++) {
51 let randomNumber = Math.floor(Math.random() * 25);
52 name += caracteres[randomNumber];
53 }
54
55 for (let o = 0; o < nameLength; o++) {
56 let randomNumber1 = Math.floor(Math.random() * 25);
57 pass += caracteres[randomNumber1];
58 }
59
60 for (let u = 0; u < nameLength; u++) {
61 let randomNumber2 = Math.floor(Math.random() * 25);
62 email += caracteres[randomNumber2];
63 }
64
65 $("#register_username").val(name);
66 $("#register_password").val(pass + "1234");
67 $("#register_email").val(email + "@gmail.com");
68 $("#terms").prop("checked", true);
69
70 $(".btn-register").on("click", function (e) {
71 e.preventDefault();
72
73 $(":submit").click();
74
75 });
76
77 $(".btn-register").trigger("click");
78}
79
80//acessa o mundo
81function AcessarMundo() {
82 $("a").each(function () {
83 if (this.href.endsWith(mundo)) {
84 window.location.href = this.href;
85 }
86 });
87}