Advertisement
Guest User

Untitled

a guest
Mar 24th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. var atualizarPagina = 1;
  2. var tempo = 2000;
  3. var x = 0;
  4. var minhaVar = "";
  5. var remove_atacadas = 1;
  6. var menu = $('#am_widget_Farm a.farm_icon_a');
  7. var altAldTempo = 1;
  8. var jaEnviados = $(menu).parent().parent().find('img.tooltip').length+"000";
  9. if (remove_atacadas == 0) {
  10. $('img').each(function() {
  11. var tempStr = $(this).attr('src');
  12. if (tempStr.indexOf('attack') != -1) {
  13. $(this).addClass('tooltip')
  14. }
  15. });
  16. }
  17. if(atualizarPagina == 1) {
  18. setInterval(
  19. function() {
  20. window.location.reload();
  21. }, 16000);
  22. }
  23. console.log("Ja existe " + jaEnviados.substring(0,(jaEnviados.length - 3)) + " aldeia com ataque.");
  24. if (altAldTempo == "0") {
  25. var altAldTempo = aleatorio(15000,22000);
  26. } else {
  27. var altAldTempo = parseInt(altAldTempo) + parseInt(aleatorio(15000,22000));
  28. }
  29. console.log("Resta " + altAldTempo + " milesegundos para alternar a aldeia.");
  30. function aleatorio(superior,inferior) {
  31. numPosibilidades = superior - inferior
  32. aleat = Math.random() * numPosibilidades
  33. return Math.round(parseInt(inferior) + aleat)
  34. }
  35. for (i = 0; i < 50; i++) {
  36. $(menu).eq(i).each(function() {
  37. if (!($(this).parent().parent().find('img.tooltip').length)) {
  38. var tempoAgora = (tempo * ++x) - aleatorio(150,300);
  39. setTimeout(function(minhaVar) {
  40. $(minhaVar).click();
  41. }, tempoAgora, this);
  42. }
  43. })
  44. }
  45. function altAldeia()
  46. {
  47. $('.arrowRight').click();
  48. $('.groupRight').click();
  49. }
  50. setInterval(altAldeia, altAldTempo);
  51. console.log("Script changed and modified by channel Tw100");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement