Povolený skript Zoznam práve cestujúcich jednotiek

Paiton

Herná podpora
Člen tímu
Herná podpora
Reakčné skóre
25
Predstavenie skriptu


Skript vytvorí kopírovateľný prehľad práve útočiacich/podporujúcich jednotiek s ich počtami a cieľovými dedinami.

Premium.png
Vyžaduje sa aktívny prémiový účet.

Použitie skriptu

1. Nasledujúci skript pridajte do svojho rýchleho náhľadu:

Svet bez lukostrelcov:
Kód:
javascript:
/**
* Created by Trsak
*/var units = {};
var msg = '';
$("#commands_table .nowrap").each(function (index) {
var id = 0;
var village = $(this).children('td').text();
var regExp = /\([0-9]{3,3}\|[0-9]{3,3}\)/g;
var coord = regExp.exec(village);
if (typeof units[coord] == 'undefined') {
units[coord] = [];
for(i = 0; i < 10; i++) {
units[coord].push(0);
}
}
$(this).children('.unit-item').each(function(tdEL) {
units[coord][id++] += Number($(this).text());
});
});
$.each(units , function(index, coord) {
msg += 'Na ceste: [coord]'+index+'[/coord]:\n';

msg += '[unit]spear[/unit] '+units[index][0]+' ';
msg += '[unit]sword[/unit] '+units[index][1]+' ';
msg += '[unit]axe[/unit] '+units[index][2]+' ';
msg += '[unit]spy[/unit] '+units[index][3]+' ';
msg += '[unit]light[/unit] '+units[index][4]+' ';
msg += '[unit]heavy[/unit] '+units[index][5]+' ';
msg += '[unit]ram[/unit] '+units[index][6]+' ';
msg += '[unit]catapult[/unit] '+units[index][7]+' ';
msg += '[unit]knight[/unit] '+units[index][8]+' ';
msg += '\n';
msg += '\n';
});
function SelectText(element) {
var doc = document, text = doc.getElementById(element), range, selection;
if (doc.body.createTextRange) {
range = document.body.createTextRange();
range.moveToElementText(text);
range.select();
} else if (window.getSelection) {
selection = window.getSelection();
range = document.createRange();
range.selectNodeContents(text);
selection.removeAllRanges();
selection.addRange(range);
}
}
document.onclick = function(e) {
if (e.target.className === 'click') {
SelectText('skript_export');
}
};
$("#quickbar_contents").append('<textarea style="width:550px; height:350px; padding: 3px;" id="skript_export">'+msg+'</textarea><br><button class="click">Označiť</button><br>');

Svet s lukostrelcami:
Kód:
javascript:
/**
* Created by Trsak
*/var units = {};
var msg = '';
$("#commands_table .nowrap").each(function (index) {
var id = 0;
var village = $(this).children('td').text();
var regExp = /\([0-9]{3,3}\|[0-9]{3,3}\)/g;
var coord = regExp.exec(village);
if (typeof units[coord] == 'undefined') {
units[coord] = [];
for(i = 0; i < 12; i++) {
units[coord].push(0);
}
}
$(this).children('.unit-item').each(function(tdEL) {
units[coord][id++] += Number($(this).text());
});
});
$.each(units , function(index, coord) {
msg += 'Na ceste: [coord]'+index+'[/coord]:\n';

msg += '[unit]spear[/unit] '+units[index][0]+' ';
msg += '[unit]sword[/unit] '+units[index][1]+' ';
msg += '[unit]axe[/unit] '+units[index][2]+' ';
msg += '[unit]archer[/unit] '+units[index][3]+' ';
msg += '[unit]spy[/unit] '+units[index][4]+' ';
msg += '[unit]light[/unit] '+units[index][5]+' ';
msg += '[unit]marcher[/unit] '+units[index][6]+' ';
msg += '[unit]heavy[/unit] '+units[index][7]+' ';
msg += '[unit]ram[/unit] '+units[index][8]+' ';
msg += '[unit]catapult[/unit] '+units[index][9]+' ';
msg += '[unit]knight[/unit] '+units[index][10]+' ';
msg += '[unit]snob[/unit] '+units[index][11]+' ';
msg += '\n';
msg += '\n';
});
function SelectText(element) {
var doc = document, text = doc.getElementById(element), range, selection;
if (doc.body.createTextRange) {
range = document.body.createTextRange();
range.moveToElementText(text);
range.select();
} else if (window.getSelection) {
selection = window.getSelection();
range = document.createRange();
range.selectNodeContents(text);
selection.removeAllRanges();
selection.addRange(range);
}
}
document.onclick = function(e) {
if (e.target.className === 'click') {
SelectText('skript_export');
}
};
$("#quickbar_contents").append('<textarea style="width:550px; height:350px; padding: 3px;" id="skript_export">'+msg+'</textarea><br><button class="click">Označiť</button><br>');

2. Otvorte si "Príkazy" v náhľadoch.

3. Podľa potreby si zvoľte skupinu "Útoky", alebo "Podpora".

4. Kliknite na skript z rýchleho náhľadu.

Ďalšie informácie

V hornej časti stránky sa zobrazí okno s textom, ktorý je možné skopírovať na fórum, prípadne do správy (celý text je v BB kódoch).
utoky.png
utoky_oznam.png

Ak máte akékoľvek prípomienky či otázky ohľadom povolených skriptov, môžete ich písať do konkrétnej témy ku každému skriptu, prípadne sa zúčastniť diskusnej témy, nachádzajúcej sa v tomto odkaze. Pokiaľ ste daný skript v tejto časti fóra nenašli, postupujte podľa postupu opísaného v tejto téme a kontaktujte nás ticket správou na hernú podporu.

Ďakujeme a prajeme vám príjemnú hru!
Váš DK tím :sermiar:
 
Naposledy upravené moderátorom:
Hore