Advertisement
Guest User

Untitled

a guest
May 21st, 2019
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.47 KB | None | 0 0
  1. // ==UserScript==
  2. // @name farm alarme
  3. // @author ...
  4. // @email ...
  5. // @namespace ...
  6. // @version 2.1 (JUL/2017;)
  7. // @grant Publico
  8. // @description Script facilitador de saques para Tribal Wars, com alerta sonoro para captcha.
  9. // @include http*://*.die-staemme.de/*
  10. // @include http*://*.staemme.ch/*
  11. // @include http*://*.tribalwars.net/*
  12. // @include http*://*.tribalwars.nl/*
  13. // @include http*://*.plemiona.pl/*
  14. // @include http*://*.tribalwars.se/*
  15. // @include http*://*.tribos.com.pt/*
  16. // @include http*://*.divokekmeny.cz/*
  17. // @include http*://*.bujokjeonjaeng.org/*
  18. // @include http*://*.triburile.ro/*
  19. // @include http*://*.voyna-plemyon.ru/*
  20. // @include http*://*.fyletikesmaxes.gr/*
  21. // @include http*://*.tribalwars.no.com/*
  22. // @include http*://*.divoke-kmene.sk/*
  23. // @include http*://*.klanhaboru.hu/*
  24. // @include http*://*.tribalwars.dk/*
  25. // @include http*://*.plemena.net/*
  26. // @include http*://*.tribals.it/*
  27. // @include http*://*.klanlar.org/*
  28. // @include http*://*.guerretribale.fr/*
  29. // @include http*://*.guerrastribales.es/*
  30. // @include http*://*.tribalwars.fi/*
  31. // @include http*://*.tribalwars.ae/*
  32. // @include http*://*.tribalwars.co.uk/*
  33. // @include http*://*.vojnaplemen.si/*
  34. // @include http*://*.genciukarai.lt/*
  35. // @include http*://*.wartribes.co.il/*
  36. // @include http*://*.plemena.com.hr/*
  37. // @include http*://*.perangkaum.net/*
  38. // @include http*://*.tribalwars.jp/*
  39. // @include http*://*.tribalwars.bg/*
  40. // @include http*://*.tribalwars.asia/*
  41. // @include http*://*.tribalwars.us/*
  42. // @include http*://*.tribalwarsmasters.net/*
  43. // @include http*://*.tribalwars.com.br/*
  44. // ==/UserScript==
  45.  
  46. var botProtect = $('body').data('bot-protect');
  47. if (document.URL.indexOf('screen=am_farm') == -1)
  48. console.log('Você deve executar o script no assistente de farm!');
  49. else if (botProtect !== undefined) {
  50. $("<audio id='audio' autoplay><source src='http://protettordelinks.com/wp-content/baixar/bomba_relogio_alerta_www.toquesengracadosmp3.com.mp3' type='audio/mp3' /></audio>").appendTo("body");
  51. $("body").focus()
  52. } else {
  53. var x = 1, // NÃO ALTERAR!
  54. menu = $('#am_widget_Farm a.farm_icon_a'),
  55. tempo = 500, // Tempo em milesegundos
  56. minhaVar = "", // NÃO ALTERAR!
  57. altAldTempo = true, // Tempo em milesegundos para alternar as aldeias (Use 'true' para aleatório)
  58. atualizarPagina = true, // Atualizar a página automaticamente? ('true' = SIM, 'false' = NÃO)
  59. boxCaptcha = $("#bot_check"); // NÃO ALTERAR!
  60.  
  61. var aleatorio = function(superior, inferior) {
  62. var numPosibilidades = superior - inferior,
  63. aleat = Math.random() * numPosibilidades;
  64.  
  65. return Math.round(parseInt(inferior) + aleat);
  66. };
  67.  
  68. $('img').each(function() {
  69. var tempStr = $(this).attr('src');
  70. if (tempStr.indexOf('attack') != -1)
  71. $(this).addClass('tooltip');
  72. });
  73.  
  74. if (atualizarPagina === true) {
  75. setInterval(function() {
  76. window.location.reload();
  77. }, 60000);
  78. }
  79.  
  80. if (altAldTempo === true)
  81. altAldTempo = aleatorio(5000, 10000);
  82. else
  83. altAldTempo = parseInt(altAldTempo) + parseInt(aleatorio(500, 1000));
  84.  
  85. for (i = 0; i < 50; i++) {
  86. $(menu).eq(i).each(function() {
  87. if (!($(this).parent().parent().find('img.tooltip').length)) {
  88. var tempoAgora = tempo * x;
  89. setTimeout(function(minhaVar) {
  90. $(minhaVar).click();
  91. }, tempoAgora, this);
  92.  
  93. ++x;
  94. }
  95. });
  96. }
  97.  
  98. //var altVillage = setInterval(function () {
  99. //$('.arrowRight, .groupRight').click();
  100.  
  101. //clearInterval(altVillage);
  102. //}, altAldTempo);
  103.  
  104. var checkCaptcha = setInterval(function() {
  105. if (boxCaptcha.length) {
  106. $("<audio id='audio' autoplay><source src='http://protettordelinks.com/wp-content/baixar/bomba_relogio_alerta_www.toquesengracadosmp3.com.mp3' type='audio/mp3' /></audio>").appendTo("body");
  107.  
  108. clearInterval(checkCaptcha);
  109. clearInterval(altVillage);
  110. }
  111. }, 100);
  112. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement