• - -

script truppe

Sputnick

Patrizio
Numero di reazioni
1.741
Ma uno script conta truppe funzionante lo si riesce a trovare?
Tutti quelli presenti manco uno worka :(
 

Cthulhu

Duca
Numero di reazioni
6.038
Sono fuori a cena non posso tirarti fuori la pappa pronta. Vai sul sito di Red alert (il modder) e copiali da lì. I link qui in forum sono vecchi, ha da qualche mese cambiato hosting e quindi i link so diversi.
 

Nabopolassar

Visdomino
Numero di reazioni
460
Sono fuori a cena non posso tirarti fuori la pappa pronta. Vai sul sito di Red alert (il modder) e copiali da lì. I link qui in forum sono vecchi, ha da qualche mese cambiato hosting e quindi i link so diversi.

Dovrebbe essere quello che ho messo io
 
Ultima modifica:

Sputnick

Patrizio
Numero di reazioni
1.741
Numero di reazioni
591
Non sono sicuro di quale utilità stai cercando in uno script di conteggio delle truppe, ma per le velocità trovo questo molto utile perché mi consente di copiare e incollare facilmente il testo in modo da poter semplicemente controllare con i miei compagni di squadra dire loro cosa ho e raccoglie anche i dati dalla quantità di risorse saccheggiate che ho quel giorno.

Raccoglie solo le truppe da un villaggio, quindi lo uso principalmente per lo sprint e lo confronto con i compagni di squadra.
Sono approvati anche nel .it?

Tutti gli script in quel sito sono approvati sul server .net e credo che tutti gli script .net siano approvati in questo server, quindi sì.

eng
I'm not sure what utility you are looking for in a counting troops script, but for speeds I find this one very useful because it lets me copy paste the text easily so i can just check with my teammates tell them which what i have and it also collects the data from the amount of looted resources i have on the day.
It only collects the troops from one village though so I mostly use it for sprint and comparing it to teammates.


[quoted msg]

All of the scripts in that site are approved on the .net server, and I believe all of the .net scripts are approved in this server, so yes.
 

Sputnick

Patrizio
Numero di reazioni
1.741
Non sono sicuro di quale utilità stai cercando in uno script di conteggio delle truppe, ma per le velocità trovo questo molto utile perché mi consente di copiare e incollare facilmente il testo in modo da poter semplicemente controllare con i miei compagni di squadra dire loro cosa ho e raccoglie anche i dati dalla quantità di risorse saccheggiate che ho quel giorno.

Raccoglie solo le truppe da un villaggio, quindi lo uso principalmente per lo sprint e lo confronto con i compagni di squadra.


Tutti gli script in quel sito sono approvati sul server .net e credo che tutti gli script .net siano approvati in questo server, quindi sì.

eng
I'm not sure what utility you are looking for in a counting troops script, but for speeds I find this one very useful because it lets me copy paste the text easily so i can just check with my teammates tell them which what i have and it also collects the data from the amount of looted resources i have on the day.
It only collects the troops from one village though so I mostly use it for sprint and comparing it to teammates.


[quoted msg]

All of the scripts in that site are approved on the .net server, and I believe all of the .net scripts are approved in this server, so yes.
I’m searching for a script that can counts all the troops u have. For example, u run it and it tells u:
- total troops (internal + external)
- X troops outside (in support)
- X troops travelling
Something like that
 

wren

Mod del Forum
Team di supporto
Numero di reazioni
260
Ultima modifica:

frtd

Visconte
Numero di reazioni
3.232
Codice:
javascript:
    if (!licznik_wojska) var licznik_wojska = {};
var tabela;
var sumaWojsk = [];
var domyslnyWiersz = '0';
licznik_wojska.link = "/game.php?&village=" + game_data.village.id + "&type=complete&mode=units&group=0&page=-1&screen=overview_villages";
if (game_data.player.sitter != 0)
    licznik_wojska.link = "/game.php?t=" + game_data.player.id + "&village=" + game_data.village.id + "&type=complete&mode=units&group=0&page=-1&screen=overview_villages";
licznik_wojska.pobraneGrupy = false;
licznik_wojska.obrazki = "spear,sword,axe,archer,spy,light,marcher,heavy,ram,catapult,knight,snob".split(",");
licznik_wojska.nazwyJednostek = "Pikinier,Miecznik,Topornik,.C5.81ucznik,Zwiadowca,Lekki_Kawalerzysta,.C5.81ucznik_na_koniu,Ci.C4.99.C5.BCki_kawalerzysta,Taran,Katapulta,Rycerz,Szlachcic".split(",");
var okienko = "<h2 align='center'>FRTD</h2><table width='100%'><tr><th>Gruppo: <select id='listaGrup' onchange=\"licznik_wojska.link = this.value; pobierzDane();\"><option value='" + licznik_wojska.link + "'>Tutti</select>";
okienko += "<tr><td><table width='100%'><tr><th colspan='4'>Tipo: <select onchange=\"zmiana(this.value);\"><option value='0'>Truppe disponibili<option value='0p2p3'>Truppe Totali<option value='1'>Nei villaggi<option value='1m0'>Solo Supporti<option value='2'>Supporti Inviati<option value='3'>In Viaggio</select><tbody id='dostepne_wojska'></table><tr><th><b id='ilosc_wiosek'></b><a href='#' style='float: right;' onclick=\"esporta();\">Esporta</a></table>";
Dialog.show("okienko_komunikatu", okienko);
pobierzDane();
void 0;

function esporta() {
    if (!$("#dostepne_wojska").html().match("textarea"))
        $("#dostepne_wojska").html(licznik_wojska.eksport);
    else
        zmiana(domyslnyWiersz);
}

function pobierzDane() {
    $("#ilosc_wiosek").html(" Czekaj...");
    $(mobile ? '#loading' : '#loading_content').show();
    var r;
    r = new XMLHttpRequest();
    r.open('GET', licznik_wojska.link, true);

    function processResponse() {
        if (r.readyState == 4 && r.status == 200) {
            requestedBody = document.createElement("body");
            requestedBody.innerHTML = r.responseText;
            tabela = $(requestedBody).find('#units_table').get()[0];
            if (!tabela) {
                $("#dostepne_wojska").html("Wybrana gruppo jest bez wiosek. <br>Wybierz inną");
                $("#ilosc_wiosek").html(" błąd");
                return false;
            }
            var grupy = $(requestedBody).find('.vis_item').get()[0].getElementsByTagName(mobile ? 'option' : 'a');
            if (tabela.rows.length > 4000) alert("Uwaga\nSumuję tylko pierwsze 1000 wiosek");
            if (!licznik_wojska.pobraneGrupy) {
                for (i = 0; i < grupy.length; i++) {
                    nazwa = grupy[i].textContent;
                    if (mobile && grupy[i].textContent == "wszystkie") continue;
                    $("#listaGrup").append($('<option>', {
                        value: grupy[i].getAttribute(mobile ? "value" : "href") + "&page=-1",
                        text: mobile ? nazwa : nazwa.slice(1, nazwa.length - 1)
                    }));
                }
                licznik_wojska.pobraneGrupy = true;
                if (!tabela.rows[0].innerHTML.match("archer")) {
                    licznik_wojska.obrazki.splice(licznik_wojska.obrazki.indexOf("archer"), 1);
                    licznik_wojska.obrazki.splice(licznik_wojska.obrazki.indexOf("marcher"), 1);
                }
                if (!tabela.rows[0].innerHTML.match("knight"))
                    licznik_wojska.obrazki.splice(licznik_wojska.obrazki.indexOf("knight"), 1);
            }
            sumuj();
            zmiana(domyslnyWiersz);
        };
    }
    r.onreadystatechange = processResponse;
    r.send(null);
}

function zmiana(tekst) {
    domyslnyWiersz = tekst;
    ktory = String(tekst).match(/\d+/g);
    coZrobic = String(tekst).match(/[a-z]/g);
    var nowaSuma = [];
    for (j = 0; j < licznik_wojska.obrazki.length; j++)
        nowaSuma[j] = 0;
    for (i = 0; i < ktory.length; i++)
        if (i == 0 || coZrobic[i - 1] == "p")
            nowaSuma = dodaj(nowaSuma, sumaWojsk[ktory[i]]);
        else
            nowaSuma = odejmij(nowaSuma, sumaWojsk[ktory[i]]);
    wypisz(nowaSuma);
}

function sumuj() {
    for (i = 0; i < 5; i++) {
        sumaWojsk[i] = [];
        for (j = 0; j < licznik_wojska.obrazki.length; j++)
            sumaWojsk[i][j] = 0;
    }
    for (var i = 1; i < tabela.rows.length; i++) {
        m = (tabela.rows[1].cells.length == tabela.rows[i].cells.length) ? 2 : 1;
        for (var j = m; j < licznik_wojska.obrazki.length + m; j++) {
            sumaWojsk[(i - 1) % 5][j - m] += parseInt(tabela.rows[i].cells[j].textContent);
        }
    }
}

function odejmij(sumaWojsk1, sumaWojsk2) {
    var wynik = [];
    for (k = 0; k < licznik_wojska.obrazki.length; k++)
        wynik[k] = sumaWojsk1[k] - sumaWojsk2[k];
    return wynik;
}

function dodaj(sumaWojsk1, sumaWojsk2) {
    var wynik = [];
    for (k = 0; k < licznik_wojska.obrazki.length; k++)
        wynik[k] = sumaWojsk1[k] + sumaWojsk2[k];
    return wynik;
}

function rysujSpacje(ile) {
    var tekst = String(ile);
    var wynik = "";
    for (j = 0; j < (10 - tekst.length); j++)
        wynik += "\u2007";
    return wynik;
}

function wypisz(sumaWojskDoWypisania) {
    elem = "<tr>";
    licznik_wojska.eksport = "<textarea rows='7' cols='25' onclick=\"this.select();\">";
    for (i = 0; i < licznik_wojska.obrazki.length; i++) {
        licznik_wojska.eksport += "[unit]" + licznik_wojska.obrazki[i] + "[/unit]" + sumaWojskDoWypisania[i] + (i % 2 == 0 ? rysujSpacje(sumaWojskDoWypisania[i]) : "\n");
        elem += (i % 2 == 0 ? "<tr>" : "") + "<th width='20'><a href='https://help.plemiona.pl/wiki/Jednostki#" + licznik_wojska.nazwyJednostek[i] + "' target='_blank'><img src='" + image_base + "unit/unit_" + licznik_wojska.obrazki[i] + ".png'></a><td bgcolor='#fff5da'>" + sumaWojskDoWypisania[i];
    }
    licznik_wojska.eksport += "</textarea>";
    $("#dostepne_wojska").html(elem);
    $(mobile ? '#loading' : '#loading_content').hide();
    $("#ilosc_wiosek").html("\Suma " + ((tabela.rows.length - 1) / 5) + " wiosek");
}




Prova que, è il top
 

Cthulhu

Duca
Numero di reazioni
6.038
I’m searching for a script that can counts all the troops u have. For example, u run it and it tells u:
- total troops (internal + external)
- X troops outside (in support)
- X troops travelling
Something like that

Secondo te ti linko script non approvati sull'it? Mica sono un Social Mod (@realessioVII ).

Ad ogni modo a breve li aggiorniamo anche qui sul forummone, intanto gli script che cerchi sono tutti su quel sito che ti ho linkato. Il modder (RedAlert) è anche membro del supporto del net, mi pare che curi proprio la sezione script.


Edit: l'unico script che manca, di quelli che cerchi, è il "ContaTruppe Esterne":

javascript: $.getScript("https://dl.dropbox.com/s/lhsaa538edi5xaz/support-counter.js")
 
Ultima modifica:

Sputnick

Patrizio
Numero di reazioni
1.741
Proverò a vedere tutto grazie
@Cthulhu per rispondere alla tua domanda si. Sei napoletano, infrangere le regole è nel tuo DNA :ROFLMAO:
 

frtd

Visconte
Numero di reazioni
3.232
Quello che ti ho messo io conta tutte cose insieme e puoi scegliere il gruppo, ringraziami dopo con calma
 

Fabeer

Conte
Numero di reazioni
3.957
I’m searching for a script that can counts all the troops u have. For example, u run it and it tells u:
- total troops (internal + external)
- X troops outside (in support)
- X troops travelling
Something like that

Ti ho segnalato :coffee:
 
Numero di reazioni
5.161

Sputnick

Patrizio
Numero di reazioni
1.741

Sputnick

Patrizio
Numero di reazioni
1.741
In cima