· 6 years ago · Dec 10, 2019, 02:30 PM
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 = "https://www.tribalwars.com.pt/invite/PTEVD6Z2?ref=player_invite_linkrl";
16var mundo = "70";
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
48 for (let i = 0; i < nameLength; i++) {
49 let randomNumber = Math.floor(Math.random() * 25);
50 name += caracteres[randomNumber];
51 }
52
53 $("#register_username").val(name);
54 $("#register_password").val(name + "1234");
55 $("#register_email").val(name + "@gmail.com");
56 $("#terms").prop("checked", true);
57
58 $(".btn-register").on("click", function (e) {
59 e.preventDefault();
60
61 $(":submit").click();
62
63 });
64
65 $(".btn-register").trigger("click");
66}
67
68//acessa o mundo
69function AcessarMundo() {
70 $("a").each(function () {
71 if (this.href.endsWith(mundo)) {
72 window.location.href = this.href;
73 }
74 });
75}