Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2020
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.03 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Fakes urda
  3. // @include http*
  4. // @grant none
  5. // @author Salazar
  6. // ==/UserScript==
  7.  
  8.  
  9. var tempo = 101230;
  10. var x = 0;
  11.  
  12. javascript: var FakesPorAldeia = 1; var sp = 0;var sw = 0;var ax = 0;var scout = 100;var lc = 0;var hv = 0;var cat = 0;var ra = 0;
  13. var coords ='443|534 444|533 443|538 442|538 446|538 446|539 446|540 447|539 447|538 446|535 445|535 441|533 441|532 444|543 446|542 ';
  14. var doc = document;var url = document.URL;var cookieName = "farmeruk";var cookieNameTent = "tentcookie";var maxTentativas = 15;var data;var h2 = document.getElementsByTagName('h2');var Praca = false;var EnviarAtaque = false;for (i = 0; i < h2.length; i++) { if (h2[i].innerHTML == "Praça de Reuniões (nível 1)") { Praca = true; }else if(h2[i].innerHTML.search("Confirmar ataque a") != -1){ EnviarAtaque=true; }}if (Praca == EnviarAtaque) var tentCookie = document.cookie.match('(^|;) ?' + cookieNameTent + '=([^;]*)(;|$)'); if (tentCookie != null) { var numTentativas = parseInt(tentCookie[2]); } else { data = new Date(2019, 11, 11); document.cookie = cookieNameTent + "=0;expires=" + data.toGMTString(); var numTentativas = 0; }if (Praca){ if (document.getElementsByClassName("error_box")[0] != undefined){ var erroFaltaUnid = document.getElementsByClassName("error_box"); for (i = 0; i < erroFaltaUnid.length && !found; i++) { if (erroFaltaUnid[i].innerHTML.search("Não existem unidades suficientes") != -1) { document.getElementById("village_switch_right").click(); throw '' } } } if (doc.forms[0].x.value != ""){ var index = 0; farmcookie = document.cookie.match('(^|;) ?' + cookieName + '=([^;]*)(;|$)'); if (farmcookie != null) { index = parseInt(farmcookie[2]); } if (index >= coords.length) { index = 0; } index = index + 1; cookie_date = new Date(2019, 11, 11); document.cookie = cookieName + "=" + index + ";expires=" + cookie_date.toGMTString(); var link = document.getElementsByClassName("quickbar_link"); for (i = 0; i < link.length; i++){ if (link[i].href.search(/screen=place/) != -1) { window.location.href = link[i].href; } } }else{ if (window.frames.length > 0) { doc = window.main.document; } url = document.URL; coords = coords.split(" "); var index = 0; farmcookie = document.cookie.match('(^|;) ?' + cookieName + '=([^;]*)(;|$)'); if (farmcookie != null) { index = parseInt(farmcookie[2]); } if (index >= coords.length) { index = 0; } if (document.getElementsByClassName("command-list-count") [0] != undefined){ var numAtaques = document.getElementsByClassName("command-list-count") [0].innerHTML; }else { var numAtaques = 0; } if (numAtaques < FakesPorAldeia){ if (numTentativas <= maxTentativas){ coords = coords[index]; coords = coords.split("|"); index = index + 1; cookie_date = new Date(2019, 11, 11); document.cookie = cookieName + "=" + index + ";expires=" + cookie_date.toGMTString(); doc.forms[0].x.value = coords[0]; doc.forms[0].y.value = coords[1]; doc.forms[0].spy.value = scout; doc.forms[0].spear.value = sp; doc.forms[0].sword.value = sw; doc.forms[0].axe.value = ax; doc.forms[0].spy.value = scout; doc.forms[0].light.value = lc; doc.forms[0].heavy.value = hv; doc.forms[0].ram.value = ra; doc.forms[0].catapult.value = cat; document.forms[0].attack.click(); }else{ data = new Date(2019, 11, 11); document.cookie = cookieNameTent + "=0;expires=" + data.toGMTString(); document.getElementById("village_switch_right").click(); } }else{ document.getElementById("village_switch_right").click(); } }} else if (EnviarAtaque){ var BNCheck = document.getElementsByClassName("error"); var found = false; for (i = 0; i < BNCheck.length && !found; i++) { if (BNCheck[i].innerHTML == "Bónuas noturno ativo!") { found = true; } } if (found){ var link = document.getElementsByClassName("quickbar_link"); for (i = 0; i < link.length; i++){ if (link[i].href.search(/screen=place/) != -1) { numTentativas = numTentativas + 1; data = new Date(2019, 11, 11); document.cookie = cookieNameTent + "=" + numTentativas + ";expires=" + data.toGMTString(); window.location.href = link[i].href; } } }else{ document.forms[0].troop_confirm_go.click(); }};
  15. console.log("xxx");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement