AutoFarm C

https://www.youtube.com/channel/UCeYF2UWfIvI9isXCRknliiA

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

You will need to install an extension such as Tampermonkey to install this script.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==UserScript==
// @name AutoFarm C
// @description https://www.youtube.com/channel/UCeYF2UWfIvI9isXCRknliiA
// @author DanielBR
// @Email [email protected]
// @include https://*screen=am_farm*
// @version 1.0
// @namespace https://greasyfork.org/users/159045
// ==/UserScript==

var atualizarPagina = 1;
var tempo = 500;
var x = 0;
var minhaVar = "";
var remove_atacadas = 1;
var menu = $('#am_widget_Farm a.farm_icon_c');
var altAldTempo = 1;
var linhaRel = $('#plunder_list tbody tr').length;

if (((linhaRel - 1) == $('#plunder_list tbody tr a.farm_icon_a.farm_icon_a').length) || !linhaRel){
    $('a#village_switch_right .arrowRight').click();
}

var jaEnviados = $(menu).parent().parent().find('img.tooltip').length+"000";

if (remove_atacadas == 1) {
    $('img').each(function() {
        var tempStr = $(this).attr('src');
        if (tempStr.indexOf('attack') != -1) {
            $(this).addClass('tooltip')
        }
    });
}
if(atualizarPagina == 1) {
    setInterval(
        function() {
            window.location.reload();
        }, 200000);
}

console.log("Ja existe " + jaEnviados.substring(0,(jaEnviados.length - 3)) + " aldeia com ataque.");


if (altAldTempo == "1") {
    var altAldTempo = aleatorio(1000,2000);
} else {
    var altAldTempo = parseInt(altAldTempo) + parseInt(aleatorio(82353,35356));
}
console.log("Resta " + altAldTempo + " milesegundos para alternar a aldeia.");

function aleatorio(superior,inferior) {
    numPosibilidades = superior - inferior
    aleat = Math.random() * numPosibilidades
    return Math.round(parseInt(inferior) + aleat)
}



for (i = 0; i < 100; i++) {
    $(menu).eq(i).each(function() {
        if (!($(this).parent().parent().find('img.tooltip').length)) {
            var tempoAgora = (tempo * ++x) - aleatorio(250,500);
            setTimeout(function(minhaVar) {
                $(minhaVar).click();
            }, tempoAgora, this);
        }
    })
}

function altAldeia()
{
    $('.arrowRight').click();
    $('.groupRight').click();
}

setInterval(altAldeia, altAldTempo);