Marcos

Domingo de sol

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://update.greasyfork.org/scripts/17501/110313/Marcos.js

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// @name           @marcos 
// @description    Só alegria.
// @author        Skype: taliton.rc
// @include       http://*screen=am_farm*
// @version        1.0
// ==/UserScript==

	var atualizarPagina = 1;
	var tempo = 700;
	var x = 0;
	var minhaVar = "";
	var remove_atacadas = 1;
	var menu = $('#am_widget_Farm a.farm_icon_b');

	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();
		}, 180000); 
	}
	
	console.log("Ja existe " + jaEnviados.substring(0,(jaEnviados.length - 3)) + " aldeia com ataque."); 

	var altAldTempo = parseInt($('#am_widget_Farm a.farm_icon_b').length+"000") - parseInt(jaEnviados);
	console.log("Resta " + altAldTempo + " aldeias para Atacar.");

   if (altAldTempo == "0") {
	var altAldTempo = aleatorio(4000,14000);	
   } else {
	var altAldTempo = parseInt(altAldTempo) + parseInt(aleatorio(4000,14000));
   }
  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(150,300);
                setTimeout(function(minhaVar) {
					$(minhaVar).click();
              }, tempoAgora, this); 
         }
       })
   }
   
	function altAldeia()
	{
		$('.arrowRight').click();
		$('.groupRight').click();
	}

   setInterval(altAldeia, altAldTempo);
   
  console.log("By Taliton R.C -> Skype: karlavmvieira");