-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBLT_AutoFarmC.js
37 lines (35 loc) · 1.01 KB
/
BLT_AutoFarmC.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// ==UserScript==
// @name #TW - AutoFarmC - BLT
// @version 0.1
// @description Auto Farm
// @author BiLeT
// @match http*://*.tribalwars.com.br/*screen=am_farm*
// @grant none
// ==/UserScript==
(function () {
'use strict';
let x = 0;
function farmarComC() {
document.querySelector('title').textContent = 'FARM';
if (document.getElementsByClassName('farm_icon_c')) {
document.getElementsByClassName('farm_icon_c')[x].click();
x = x + 1;
console.log('farmarComC_Click - x:', x);
}
}
var farmarComCTempo = setInterval(
farmarComC,
Math.floor(Math.random() * 1000) + 500,
);
var tempoAleatorioMudarAldeiasOuReload =
Math.floor(Math.random() * 10000) + 40000;
console.log(
'Mudar de Aldeias:',
tempoAleatorioMudarAldeiasOuReload / 1000,
'segundos...',
);
setInterval(function () {
window.location.reload();
// document.querySelector('#village_switch_right > span').click();
}, tempoAleatorioMudarAldeiasOuReload);
})();