Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name COMMANDER
- // @include https://*&screen=place*
- // ==/UserScript==
- //⭐ PRESSIONE A TECLA "T" APÓS ATIVAR O SCRIPT PARA ABRIR A TELA DE AJUDA COM INFORMAÇÕES DETALHADAS SOBRE CADA FUNÇÃO
- //⭐ CONFIGURAÇÕES ACERCA DO ENVIO DE COMANDO AO FINAL DO SCRIPT
- //⭐ O SCRIPT RODA AS COORDENADAS DE FORMA ALEATÓRIA!
- //⭐ LEGENDA ABAIXO:
- //⛔ = NÃO ENCOSTE, IGNORE!
- //⚫ = COSTUMIZAÇÃO LIBERADA
- //⚪ = MEXER APENAS SE TIVER CONSCIÊNCIA
- //⭕ = CONFIGURAÇÕES DE NOTIFICAÇÃO (MENSAGENS DE ERROR)
- //⚡ = INFORMAÇÃO ADICIONAL SOBRE CADA SEÇÃO COSTUMIZÁVEL
- /* ⚫⚫⚫⚫⚫ INÍCIO DA SEÇÃO DE CONFIGURAÇÕES INICIAIS ⚫⚫⚫⚫⚫ */
- /*⚡ DEFINA SE O SCRIPT IRÁ TROCAR DE ALDEIA AUTOMATICAMENTE ⚡*/ var altAldeia = 0;
- /*⚡ SELECIONAR TIPO DO COMANDO (TRUE=ATAQUE)|(FALSE=APOIO) ⚡*/ var Ataque = false;
- /*⚡ DEFINIR NÚMERO DE EXPLORADORES ENVIADOS POR ATAQUE ⚡*/ var Tsalkapone_scouts=0;
- /*⚡ DEFINIR ORDEM PRIORITÁRIA E TROPAS (0=IGNORAR) ⚡*/ var Tsalkapone_units_order={ram:0,catapult:0,sword:0,spear:0,axe:0,light:0,archer:0,marcher:0,heavy:0}; // Altere a Ordem das undiades para definir a ordem prioritária, em seguida selecione a quantidade de unidades a ser enviada a cada Fake!
- /*⚡ DEFINIR AS COORDENADAS A SEREM ATACADAS ⚡*/ var Tsalkapone_coords='397|467';
- /*⚫ SEÇÃO PARA CONFIGURAÇÃO DE NOMES DOS COOKIES ⚫*/
- var config={
- /*⚡ DEFINIR NOME DA LISTA DE ALVOS ⚡*/ Tsalkapone_target:'Topa', // Colocar o Nick dos Jogadores Alvo
- /*⚡ DEFINIR QUANTAS VEZES CADA COORDENADA DEVERÁ SER ATACADA ⚡*/ Tsalkapone_repeat:1,
- /*⚡ COOKIE DOS SCRIPTS (SALVA SEQUÊNCIA ATUAL DE ALDEIAS) ⚡*/ Tsalkapone_cookieID:'ApoioTopa'}; //Sempre utilize Nomes diferentes para cada Scipt. Caso contrário a sequencia das coordenadas atacadas em um irá interferir na outra!
- /*⚫ SEÇÃO PARA PREENCHIMENTO DE TROPAS TOTAIS, SEJA POR UNIDADE OU SELECIONANDO TODAS AS TROPAS DISPONÍVEIS ⚫*/
- /*⚡ TRUE = SELECIONA TODOS OS LANCEIROS DISPONÍVEIS ⚡*/ var spear1 = false;
- /*⚡ TRUE = SELECIONA TODOS OS ESPADACHINS DISPONÍVEIS ⚡*/ var sword1 = false;
- /*⚡ TRUE = SELECIONA TODOS OS BÁRBAROS DISPONÍVEIS ⚡*/ var axe1 = false;
- /*⚡ TRUE = SELECIONA TODOS OS ARQUEIROS DISPONÍVEIS ⚡*/ var archer1 = true;
- /*⚡ TRUE = SELECIONA TODOS OS EXPLORADORES DISPONÍVEIS ⚡*/ var spy1 = false;
- /*⚡ TRUE = SELECIONA TODAS AS CAVALARIAS LEVES DISPONÍVEIS ⚡*/ var light1 = false;
- /*⚡ TRUE = SELECIONA TODOS OS ARQUEIROS À CAVALO DISPONÍVEIS ⚡*/ var marcher1 = false;
- /*⚡ TRUE = SELECIONA TODAS AS CAVALARIAS PESADAS DISPONÍVEIS ⚡*/ var heavy1 = true;
- /*⚡ TRUE = SELECIONA TODOS OS ARÍETES DISPONÍVEIS ⚡*/ var ram1 = false;
- /*⚡ TRUE = SELECIONA TODAS AS CATAPULTAS DISPONÍVEIS ⚡*/ var catapult1 = false;
- /*⚡ TRUE = SELECIONA TODOS OS NOBRES DISPONÍVEIS ⚡*/ var snob1 = false;
- /*⚡ TRUE = SELECIONA TODAS AS TROPAS DISPONÍVEIS NA ALDEIA ⚡*/ var selectAllUnits = false;
- /* ⚫⚫⚫⚫⚫ FIM DA SEÇÃO DE CONFIGURAÇÕES INICIAIS ⚫⚫⚫⚫⚫ */
- /* ⚪⚪⚪ INÍCIO DAS CONFIGURAÇÕES DE TRADUÇÃO ⚪⚪⚪ */
- var get_lang = localStorage.getItem("rally_point_script_lang");
- var lang="";
- if (get_lang === null) {lang = "brazilian";}
- else { lang = ""+get_lang+"";}
- var supported_languages =["greek","english","brazilian"];
- var lang_check = supported_languages.indexOf(lang);
- /*⭕⭕⭕*/ if (lang_check < 0) {UI.ErrorMessage('<font color=gold><b><center><u>'+tsalkapone_trans.general.notification+' Tsalkapone</u></center></b></font> <br><br> The selected language is not supported. Please select one of the supported languages.',/*⭕TEMPO*/ 50);} /* ⚡ DEFINE TEMPO EM QUE A MENSAGEM DE "IDIOMA NÃO SUPORTADO" PERMANECERÁ NA TELA ⚡ */
- else {
- var tsalkapone_trans = (function() {
- var tsalkapone_trans = {};
- tsalkapone_trans.brazilian= {
- general:{
- script:"FAKE ALETATÓRIO (Script Nº2)",
- notification:"Notificação",
- message_no:"Não",
- message_yes:"Sim",
- message_1:"O Script deve ser Ativado na Praça de Reunião",
- message_2:"Você gostaria de ser Redirecionado à Praça?",
- comm:"Sinta-se livre para Relatar qualquer BUG do Script ou Enviar Sugestões de Melhoria.",
- units:"Método de Inserção de Unidades",
- coords:"Método de Inserção de Coordenadas",
- variables:"Variáveis Costumizáveis",
- fake_lang:"Idioma",
- info1:"O Script usará Apenas UM Tipo de unidade, Baseado na Ordem Prioritária. Se o Valor de QUALQUER Unidade for Igual a 0(ZERO) o script irá Ignorar.",
- info2:"O Script Coordena os Ataques de forma ALEATÓRIA, você também pode Selecionar QUALQUER Coordenada da Lista de Alvos",
- info3:"Defina o Número de Exploradores a ser Enviado em cada FAKE",
- info4:"Defina a Ordem Prioritária Alterando a Ordem das Unidades, e a Quantidade a ser Enviada de cada uma.",
- info5:"Escolha as Coordenadas de seus Alvos Desejados. Adicione quantas Desejar, sempre Separando-as com um Espaço",
- info6:"O Idioma de TODOS os scripts da Praça de Reunião é Definido pelo Idioma Selecionado no Script de Comando",
- info7:"Escolha a Palavra que será Utilizada como Nome da Lista de Alvos",
- info8:"Defina quantas vezes o Script irá Atacar cada Coordenada antes de passar à Próxima.",
- info9:"Escolha a Palavra que será Utilizada como o Nome do Cookie nas Configurações do Script",
- },
- notes:{
- coords:"Nenhuma Coordenada Detectada. Definal Alguns Alvos e Tente Novamente.",
- target:"Alvo Atual",
- list:"Lista de Alvos",
- creator:"Criado Por",
- last:"Essas foram as Últimas Coordenadas Selecionadas, Ative o Script Novamente para Reiniciar!",
- no_units:"Não Existem Unidades Disponíveis. Troque de Aldeia ou Modifique as Configurações e tente Novamente.",
- },
- };
- tsalkapone_trans.english= {
- general:{
- script:"Fake Script No2",
- notification:"Notification from",
- message_no:"No",
- message_yes:"Yes",
- message_1:"This script is activated on Rally Point.",
- message_2:" Do you want to automatically assign your location to this page?",
- comm:"Feel free to send any message regarding script bugs or proposing ideas to",
- units:"Units' Inserting Method",
- coords:"Coords' Inserting Method",
- variables:"Customizable Variables",
- fake_lang:"Language",
- info1:"The script will only use one type of unit, based on a customizable priority-order, to insert in the rally point. If the available units of a unit-type are equal to zero or below the selected value the script will skip this unit-type. The scouts are an exception to this rule and their value will be inserted regardless. You may re-order the priority of the units' choice by changing the units' order in the variable",
- info2:"The script chooses a coordinate out of the selected targets to insert in the rally point in a consecutive order. You may select a specific target from the targets' list which is displayed in the rally point",
- info3:"Define the value of the scouts to be inserted",
- info4:"Define the priority-order by changing the units' order and also define the value of each unit-type. The names of the units are the ones used as each unit's id in every server",
- info5:"Enter the coordinates of the desired targets. Add as many as you like separating them with space i.e.",
- info6:"The language of every rally point's script that doesn't display a settings menu is defined by the language selection in the script",
- info7:"Enter a value that will be used as the name of the targets' list",
- info8:"Define how many times the script will use a coordinate before changing to the next one in the list",
- info9:"Enter a value that will be used as cookie name for the script's settings",
- },
- notes:{
- coords:"No selected coords were detected. Define some targets and try again.",
- target:"Current target",
- list:"Target list",
- creator:"Created by",
- last:"These were the last selected coords. Activate the script again to restart.",
- no_units:"There were found no available units. Change village or settings and try again.",
- },
- };
- tsalkapone_trans.greek= {
- general:{
- script:"Fake Script No2",
- notification:"Ειδοποίηση από τον",
- message_no:"Όχι",
- message_yes:"Ναι",
- message_1:"Το συγκεκριμένο script ενεργοποιείται από το Μέρος Συγκέντρωσης.",
- message_2:"Επιθυμείτε αυτόματη ανακατεύθυνση;",
- comm:"Επικοινωνήστε ανά πάσα στιγμή για οποιαδήποτε ιδέα ή πρόταση σχετικά με τα scripts με τον",
- units:"Μέθοδος Εισαγωγής Μονάδων",
- coords:"Μέθοδος Εισαγωγής Συντεταγμένων",
- variables:"Προσαρμόσιμες Μεταβλητές",
- fake_lang:"Επιλογή Γλώσσας",
- info1:"Το script θα επιλέξει μόνο ένα είδος μονάδας για να εισάγει στο Μέρος Συγκέντρωσης. Η επιλογή βασίζεται σε μια σειρά προτεραιότητας που μπορεί να ρυθμιστεί. Αν η τιμή μιας μονάδας εντός του μέρους συγκέντρωσης είναι μικρότερη από την επιλεγμένη τιμή ή ίση με το μηδέν τότε θα αγνοηθεί από το script. Οι ανιχνευτές αποτελούν εξαίρεση του κανόνα και η τιμή τους εισάγεται ανεξάρτητα από τις υπόλοιπες τιμές. Η σειρά προτεραιότητας των μονάδων καθορίζεται στη μεταβλητή",
- info2:"Το script επιλέγει συντεταγμένες, από τη λίστα των επιλεγμένων στόχων, με διαδοχική ακολουθία. Δύναται να επιλέξετε συγκεκριμένο στόχο από τη λίστα στόχων που εμφανίζεται στο Μέρος Συγκέντρωσης. Κάθε φορά που η ακολουθία ολοκληρώνεται θα λαμβάνετε σχετική ενημέρωση",
- info3:"Ορίστε τη τιμή των ανιχνευτών",
- info4:"Ορίστε τη σειρά προτεραιότητας των μονάδων και την τιμή τους. Τα ονόματα των μονάδων είναι αντίστοιχα των id κάθε είδους μονάδας που χρησιμοποιούνται από όλους τους servers",
- info5:"Εισάγετε τις συντεταγμένες των στόχων προσθέτοντας όσες επιθυμείτε διαχωρίζοντας τες με κενό π.χ.",
- info6:"Η γλώσσα κάθε script που λειτουργεί από το Μέρος Συγκέντρωσης και δεν διαθέτει ενσωματωμένο μενού ρυθμίσεων καθορίζεται από την επιλογή γλώσσας στο script",
- info7:"Εισάγετε μια τιμή που θα χρησιμοποιηθεί ως ονομασία της λίστας στόχων",
- info8:"Ορίστε πόσες φορές θα εισαχθεί μια συντεταγμένη πριν επιλεχθεί η επόμενη",
- info9:"Εισάγετε μια τιμή που θα χρησιμοποιηθεί ως ονομασία cookie για τις ρυθμίσεις του script",
- },
- notes:{
- coords:"Δεν εντοπίστηκαν αποθηκευμένες συντεταγμένες. Ορίστε μερικούς στόχους και ενεργοποιήστε εκ νέου το script.",
- target:"Τρέχων στόχος",
- list:"Λίστα στόχων",
- creator:"Δημιουργήθηκε από τον",
- last:"Αυτές ήταν οι τελευταίες αποθηκευμένες συντεταγμένες. Ενεργοποιήστε εκ νέου το script για επανεκκίνηση της ακολουθίας.",
- no_units:"Δεν βρέθηκαν διαθέσιμες μονάδες. Αλλάξτε χωριό ή ρυθμίσεις και δοκιμάστε ξανά.",
- },
- };
- return tsalkapone_trans[lang];
- }());
- }
- var Dialog1;(function(){'use strict';Dialog1={MAX_WIDTH:1200,closeCallback:null,show:function(id,content,closeCallback,options){options=$.extend({class_name:'',close_from_fader:true},options);this.closeCallback=closeCallback;var fullscreenElement=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement,container=fullscreenElement||'body',$container=$('.popup_box_container'),$box,$fader,$content,show_anim=false;if(!$container.length){show_anim=true;$container=$('<div class="popup_box_container" />');$box=$('<div class="popup_box" />').attr('id','popup_box_'+id).addClass(options.class_name).data('name',id).appendTo($container);$fader=$('<div class="fader" />').appendTo($container);$content=$('<div class="popup_box_content" />').appendTo($box);$container.appendTo($(container))}else{$box=$container.find('.popup_box');if($box.data('name')!==id){Dialog1.close();Dialog1.show(id,content,closeCallback,options);return};$content=$container.find('.popup_box_content');$box.css('width','auto')};$content.html(content);var height_buffer=125;if($(window).width()<500||$(window).height()<$content.height()+height_buffer){$box.addClass('mobile');$('.popup_box_content').css({'max-height':$(window).height()-(height_buffer/2)+'px'})};var border_width;if(typeof window.getComputedStyle==='function'){border_width=parseInt(getComputedStyle($box[0],null).borderLeftWidth)}else border_width=parseInt($box.css('border-left-width'));var min_width=200,width=Math.min(this.MAX_WIDTH,$content.width(),$(window).width()-border_width);if(width<min_width)width=min_width;if(!Modernizr.borderimage)width+=20;$box.css('width',width+'px');var hotkey_hint=(!mobile&&!mobiledevice&&HotKeys.enabled)?' :: ΟΟ Ξ½ΟΟΞΌΞ΅Ο ΟΞ· ΟληκΟΟΞΏΞ»ΞΏΞ³Ξ―ΞΏΟ : <b>Esc</b>':'',tooltip_class=(!mobile&&!mobiledevice)?'tooltip-delayed':'',$close=$('<a class="popup_box_close '+tooltip_class+'" title="ΞλΡίΟΞ΅'+hotkey_hint+'" href="#"> </a>').prependTo($content);UI.ToolTip($close,{delay:400});var close_elements=options.close_from_fader?'.fader, .popup_box_close, .popup_closer':'.popup_box_close, .popup_closer';$container.on('click',close_elements,function(){Dialog1.close(true);return false});if(show_anim)setTimeout(function(){$box.addClass('show')},50);UI.init();UnitPopup.init();setTimeout(QuestArrows.init,500)},close:function(by_user){$('.popup_box_container').remove();if(Dialog1.closeCallback)Dialog1.closeCallback(by_user);inlinePopupClose();$('.popup_style').hide();QuestArrows.init();return false},fetch:function(name,screen,get_params,callback,Dialog1_options,closeCallback){TribalWars.get(screen,get_params,function(data){Dialog1.show(name,data.Dialog1,closeCallback,Dialog1_options);if(callback)callback()})}}})();
- window.addEventListener("keydown", tsalentoleskeyboard, false);
- function tsalentoleskeyboard(e) {
- if (e.keyCode == "84") {
- var contact_url = "https://forum.tribalwars.net/member.php?114063-Tsalkapone";
- var content = '<div style=max-width:1000px;>' +
- '<h2 class="popup_box_header"><center><u><font color="darkgreen">Tsalkapone. '+tsalkapone_trans.general.script+'</font></u></center></h2>' +
- '<hr><p><font color=maroon><b><u>1. '+tsalkapone_trans.general.units+'</u></b></font></p>' +
- '<p>'+tsalkapone_trans.general.info1+' <font color="red"><b>Tsalkapone_units_order</b></font>.</p>'+
- '<p><hr><font color=maroon><b><u>2. '+tsalkapone_trans.general.coords+'</u></b></font></p>' +
- '<p>'+tsalkapone_trans.general.info2+'.</p>'+
- '<p><hr><font color=maroon><b><u>3. '+tsalkapone_trans.general.variables+'</u></b></font></p>' +
- '<font color="red"><b>Tsalkapone_scouts:</b></font> '+tsalkapone_trans.general.info3+'.'+
- '<br><br><font color="red"><b>Tsalkapone_units_order:</b></font> '+tsalkapone_trans.general.info4+'.'+
- '<br><br><font color="red"><b>Tsalkapone_coords:</b></font> '+tsalkapone_trans.general.info5+' <i>532|516 451|450 430|420</i>.'+
- '<br><br><font color="red"><b>Tsalkapone_target:</b></font> '+tsalkapone_trans.general.info7+'.'+
- '<br><br><font color="red"><b>Tsalkapone_repeat:</b></font> '+tsalkapone_trans.general.info8+'.'+
- '<br><br><font color="red"><b>Tsalkapone_cookieID:</b></font> '+tsalkapone_trans.general.info9+'.'+
- '<p><hr><font color=maroon><b><u>4. '+tsalkapone_trans.general.fake_lang+'</u></b></font></p>' +
- '<p>'+tsalkapone_trans.general.info6+' <b><font color="blue">Commander Script</font></b>.</p>'+
- '<center><img class="tooltip-delayed" title="<font color=darkgreen>Tsalkapone. '+tsalkapone_trans.general.script+'</font>" src="https://dl.dropboxusercontent.com/s/dt6t7jl1dqkjja9/Tsalkapone_joker.jpg" style="cursor:help; position: relative"></center><br><center>'+tsalkapone_trans.general.comm+' <a href="'+contact_url+'" title="Tsalkapone profile" target="_blank">Tsalkapone</a>.</center>' +
- '</div>';
- Dialog1.show('fakescript1_info', content);
- $("#go_man").click(function () { window.location.assign(game_data.link_base_pure+"place");});
- $("#close_this").click(function () { var close_this = document.getElementsByClassName('popup_box_close'); close_this[0].click(); });
- }
- }
- var doc=document;
- //if(window.frames.length>0)doc=window.main.document;url=document.URL;
- var Tsalactivepage = location.href.indexOf('screen=place') > -1;
- if (!Tsalactivepage) {
- var contact_url = "https://forum.tribalwars.net/member.php?114063-Tsalkapone";
- var content = '<div style=max-width:1000px;>' +
- '<h2 class="popup_box_header"><center><u><font color="darkgreen">Tsalkapone. '+tsalkapone_trans.general.script+'</font></u></center></h2>' +
- '<hr><p><center><font color=maroon><b>'+tsalkapone_trans.general.message_1+'</b></font></center></p>' +
- '<p><center><font color=maroon><b>'+tsalkapone_trans.general.message_2+'</b></font></center></p>' +
- '<br><br><center><input type="button" class="btn evt-confirm-btn btn-confirm-yes" id="go_man" value="'+tsalkapone_trans.general.message_yes+'"> <input type="button" class="btn evt-cancel-btn btn-confirm-no" id="close_this" value="'+tsalkapone_trans.general.message_no+'"></center>'+
- '<br><br><hr><center><img class="tooltip-delayed" title="<font color=darkgreen>Tsalkapone. '+tsalkapone_trans.general.script+'</font>" src="https://dl.dropboxusercontent.com/s/dt6t7jl1dqkjja9/Tsalkapone_joker.jpg" style="cursor:help; position: relative"></center><br><center><p>'+tsalkapone_trans.general.comm+' <a href="'+contact_url+'" title="Tsalkapone profile" target="_blank">Tsalkapone</a>.</p></center>' +
- '</div>';
- Dialog.show('fakescript2_info_intro', content);
- $("#go_man").click(function () { window.location.assign(game_data.link_base_pure+"place");});
- $("#close_this").click(function () { var close_this = document.getElementsByClassName('popup_box_close'); close_this[0].click(); });
- }
- else if(Tsalkapone_coords.replace(/^\s\s*/,'').replace(/\s\s*$/,'')==='')
- /*⭕⭕⭕*/ {UI.ErrorMessage('<font color=gold><b><center><u>'+tsalkapone_trans.general.notification+' Tsalkapone</u></center></b></font> <br><br> '+tsalkapone_trans.notes.coords+'',/*⭕TEMPO*/ 50);} /* ⚡ DEFINE TEMPO EM QUE A MENSAGEM DE "NENHUMA COORDENADA DETECTADA" PERMANECERÁ NA TELA ⚡ */
- else { /* ⚪⚪⚪ FIM DAS CONFIGURAÇÕES DE TRADUÇÃO ⚪⚪⚪ */
- /* ⛔⛔⛔⛔⛔ INICIO DO SCRIPT DO TSALKAPONE ⛔⛔⛔⛔⛔ */
- /*==== register ====*/
- var script = {
- scriptname: 'Fake Script No2',
- version: '1.0',
- author: 'Tsalkapone',
- email: 'tsalkapone@hotmail.com',
- broken: false
- };
- $.post(ScriptAPI.url,script);
- var coords=Tsalkapone_coords.split(' ');
- function escapeStr(text)
- {var specials=['/','.',',','~','`','@','#','%','-','_','*','+','?','|','$','=',':','!','^','<','>','(',')','[',']','{','}','\\'];
- var sRE=new RegExp('(\\'+specials.join('|\\')+')','g');
- return text.replace(sRE,'\\$1');}
- function zeroPad(number,length)
- {var n=number.toString();while(n.length<length){n='0'+n;}return n;}
- function fnWriteCookie(index)
- {var cookie_date=new Date(2099,11,11);
- eleDoc.cookie=vWorld+'$'+config.Tsalkapone_target+'$'+config.Tsalkapone_cookieID+'='+(index+1)+';expires='+cookie_date.toGMTString();}
- function fnAssignTsalkapone_μονάδες(index,isManualReset)
- {if((index<0)||(index>=coords.length))
- {index=0;
- /*⭕⭕⭕*/ if(eleDoc.fakeSequence==1){UI.ErrorMessage('<span id=tsalkaponelastsyn><b><font color=gold><u>'+tsalkapone_trans.general.notification+' Tsalkapone</u></font></b></span><br><br>'+tsalkapone_trans.notes.last+'',/*⭕TEMPO*/ 50);}} /* ⚡ DEFINE TEMPO EM QUE A MENSAGEM DE "ÚLTIMA COORDENADA" PERMANECERÁ NA TELA ⚡ */
- eleDoc.getElementById('fakescript2_Tsalkapone').selectedIndex=index;
- var villa=coords[index].split('|');
- if(!isManualReset&&(eleDoc.fakeSequence<config.Tsalkapone_repeat))
- {eleDoc.fakeSequence++;}
- else{eleDoc.fakeSequence=(isManualReset?2:1);
- fnWriteCookie(isManualReset?index-1:index);}
- var eleForm=document.forms[0];eleForm.x.value=villa[0];eleForm.y.value=villa[1];
- var count;
- if(Tsalkapone_scouts>0)
- {count=parseInt(eleForm.spy.nextSibling.nextSibling.innerHTML.match(/\d+/));
- if(count>0&&Tsalkapone_scouts<count){
- eleForm.spy.value=Math.min(Tsalkapone_scouts,count);}}
- for(var Tsalkapone in Tsalkapone_units_order){
- if(Tsalkapone_units_order.hasOwnProperty(Tsalkapone)){
- if((Tsalkapone_units_order[Tsalkapone]>0)&&(typeof(eleForm[Tsalkapone])!="undefined"))
- {count=parseInt(eleForm[Tsalkapone].nextSibling.nextSibling.innerHTML.match(/\d+/));
- if(count>0&&Tsalkapone_units_order[Tsalkapone]<count)
- {eleForm[Tsalkapone].value=Math.min(Tsalkapone_units_order[Tsalkapone],count);break;}
- }}}}
- // var eleDoc=(window.frames.length>0)?window.main.document:document;
- var eleDoc=document;
- if(typeof(eleDoc.fakeSequence)=='undefined'){eleDoc.fakeSequence=1;}
- var scrape,vScreen=(scrape=eleDoc.URL.match(/\&screen=(\w+)/i))?scrape[1]:null;
- var vWorld=(scrape=eleDoc.URL.match(/\/\/(\w+)\./i))?scrape[1]:null;
- var village=eleDoc.getElementsByTagName('title')[0].innerHTML.match(/\(\d+\|\d+\)/);
- if(vScreen=='place'){
- var index=0;var twCookie=eleDoc.cookie.match('[^|;]s?'+escapeStr(vWorld+'$'+config.Tsalkapone_target+'$'+config.Tsalkapone_cookieID+'=')+'([^;]*)[;|$]');
- if(twCookie){index=parseInt(twCookie[1],10);}
- if(!eleDoc.getElementById('fakescript2_Tsalkapone'))
- {var eleInputs=eleDoc.getElementsByTagName('input');
- if(eleInputs){for(var ii=0;ii<eleInputs.length;ii++)
- {if(eleInputs[ii].name=='support')
- {var optionList='';
- for(var jj=0;jj<coords.length;jj++){optionList+='<option>'+zeroPad(jj+1,4)+':'+coords[jj]+'</option>';}
- var fakeonoma = config.Tsalkapone_target;
- var tsalkapone_div='<TD rowspan="2"><div id="fakes"><table class="main"><tr><td id="tsalkapone_fake_script2"><span style="font-weight:bold">';
- tsalkapone_div+='<font color=darkgreen>'+tsalkapone_trans.notes.list+' ~ <font color=red>'+fakeonoma+'</font> :</font>';
- tsalkapone_div+='</span><select id="fakescript2_Tsalkapone" name="fakescript2_Tsalkapone" size="1" onchange="fnAssignTsalkapone_μονάδες(this.selectedIndex,true);">';
- tsalkapone_div+=''+optionList+'</select><span style="font-weight:100;font-style:italic;text-decoration:none;font-size:x-normal;">';
- tsalkapone_div+='<a href="https://forum.tribalwars.net/member.php?114063-Tsalkapone" target="_blank"> '+tsalkapone_trans.notes.creator+' Tsalkapone</a></span></td></tr></table></div></TD>';
- eleInputs[ii].parentNode.parentNode.innerHTML+=tsalkapone_div;
- break;}
- }}}}
- fnAssignTsalkapone_μονάδες(index,false);
- /* ⛔⛔⛔⛔⛔ FIM DO SCRIPT DO TSALKAPONE ⛔⛔⛔⛔⛔ */
- /* ⚪⚪⚪ CONFIGURAÇÕES DE SELEÇÃO DE UNIDADES ⚪⚪⚪ */
- var allUnits = ['spear1','axe1','sword1','light1','spy1','heavy1','ram1','catapult1','snob1','archer1','marcher1'];
- if(spear1)document.getElementById('units_entry_all_spear').click();
- if(axe1)document.getElementById('units_entry_all_axe').click();
- if(sword1)document.getElementById('units_entry_all_sword').click();
- if(light1)document.getElementById('units_entry_all_light').click();
- if(spy1)document.getElementById('units_entry_all_spy').click();
- if(heavy1)document.getElementById('units_entry_all_heavy').click();
- if(ram1)document.getElementById('units_entry_all_ram').click();
- if(catapult1)document.getElementById('units_entry_all_catapult').click();
- if(snob1)document.getElementById('units_entry_all_snob').click();
- if(archer1)document.getElementById('units_entry_all_archer').click();
- if(marcher1)document.getElementById('units_entry_all_marcher').click();
- if(selectAllUnits)document.getElementById('selectAllUnits').click();
- if (document.getElementById('units_entry_all_spear')) { var spear1 = parseInt( $('#units_entry_all_spear').text().replace(/[^0-9]/gi, ''));} else { spear1 = 0;}
- if (document.getElementById('units_entry_all_axe')) { var axe1 = parseInt( $('#units_entry_all_axe').text().replace(/[^0-9]/gi, ''));} else { axe1 = 0;}
- if (document.getElementById('units_entry_all_sword')) { var sword1 = parseInt( $('#units_entry_all_sword').text().replace(/[^0-9]/gi, ''));} else { sword1= 0;}
- if (document.getElementById('units_entry_all_light')) { var light1 = parseInt( $('#units_entry_all_light').text().replace(/[^0-9]/gi, ''));} else { light1 = 0;}
- if (document.getElementById('units_entry_all_spy')) { var spy1 = parseInt( $('#units_entry_all_spy').text().replace(/[^0-9]/gi, ''));} else { spy1 = 0;}
- if (document.getElementById('units_entry_all_heavy')) { var heavy1 = parseInt( $('#units_entry_all_heavy').text().replace(/[^0-9]/gi, ''));} else { heavy1 = 0;}
- if (document.getElementById('units_entry_all_ram')) { var ram1 = parseInt( $('#units_entry_all_ram').text().replace(/[^0-9]/gi, ''));} else { ram1 = 0;}
- if (document.getElementById('units_entry_all_catapult')) { var catapult1 = parseInt( $('#units_entry_all_catapult').text().replace(/[^0-9]/gi, ''));} else { catapult1 = 0;}
- if (document.getElementById('units_entry_all_snob')) { var snob1 = parseInt( $('#units_entry_all_snob').text().replace(/[^0-9]/gi, ''));} else { snob1 = 0;}
- if (document.getElementById('unit_input_archer')) {
- if (document.getElementById('units_entry_all_archer')) { var archer1 = parseInt( $('#units_entry_all_archer').text().replace(/[^0-9]/gi, '')); }else { archer1 = 0;}
- if (document.getElementById('units_entry_all_marcher')) { var marcher1 = parseInt( $('#units_entry_all_marcher').text().replace(/[^0-9]/gi, ''));} else { marcher1 = 0;}
- } /* ⚪⚪⚪ FIM DAS CONFIGURAÇÕES DE SELEÇÃO DE UNIDADES ⚪⚪⚪ */
- /* ⚫⚫⚫⚫⚫ CONFIGURAÇÕES EXTRAS ACERCA DO ENVIO DE COMANDO ⚫⚫⚫⚫⚫ */
- setTimeout(function() {
- if(Ataque === true) {
- if(mobile === false) $("#target_attack").click(); else $("button[name = 'attack']").click();
- } else {
- if(mobile === false) $("#target_support").click(); else $("button[name = 'support']").click();
- }
- }, 1200,600); /*⚡ SELECIONAR TEMPO PARA CLICAR EM ATAQUE OU APOIO (1000 = 1 SEG) | TEMPO ALEATÓRIO ENTRE OS DOIS SELECIONADOS ⚡*/
- console.log("DEBUG: Done!");
- setTimeout(function() {
- if(altAldeia === 1) {
- console.log("DEBUG: altAldeia: " + altAldeia);
- if(mobile === false)document.getElementByClassName('groupRight').click();
- }
- }, 600,300);
- console.log("DEBUG: Trocar Aldeia!");
- }void (0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement