Todos os scripts devem ser aprovados pela Equipe de Suporte. Se não tiver certeza se um script ou ferramenta é permitido, deve sempre perguntar primeiro à equipe de suporte em um ticket de suporte.
Lista de Scripts
2023
Frontline Stacks Planner Novo
javascript:
/* https://forum.tribalwars.net/index.php?threads/291478/ */
$.getScript('https://twscripts.dev/scripts/frontlineStacks.js');
Devil's Noble Spam Planner Enhancer
javascript:
/* https://forum.tribalwars.net/index.php?threads/291222/ */
$.getScript('https://media.innogames.com/com_DS_NL/scripts/Devils-Noble-Spam-Planner-Enhancer_206110.js');
Group placer
javascript:
/* https://forum.tribalwars.net/index.php?threads/291099/ */
$.getScript('https://media.innogames.com/com_DS_NL/scripts/GroupPlacer_206126.js');
Troop Overview Summary
javascript:
/* https://forum.tribalwars.net/index.php?threads/291067/ */
$.getScript('https://rawcdn.githack.com/higamy/higamy.github.io/main/TW/Scripts/Approved/TroopSummaryRows.js');
Profile coordinate grabber
javascript:
/* https://forum.tribalwars.net/index.php?threads/290945/ */
$.getScript('https://shinko-to-kuma.com/scripts/findNonAttackedVillages.js');
Paste troops in Recruitment site
javascript:
/* https://forum.tribalwars.net/index.php?threads/290837/ */
Speer = "";
Schwert = "";
Axt = "";
Bogen = "";
Spy = "";
LK = "";
BB = "";
SK = "";
Ramme = "";
Katta = "";
$.getScript('https://media.innogames.com/com_DS_DE/Scriptdatenbank/slscript/truppen_in_der_rekrutierungsseite_einfuegen_mausmajor.js');
void(0);
Toxic Donut's Group Placer
javascript:
/* https://forum.tribalwars.net/index.php?threads/290680/ */
$.getScript('https://toxicdonut.dev:8080/js/Toxic_Donut_s_Group_Placer.js');
Multicolor Coord grabber/picker
javascript:
/* https://forum.tribalwars.net/index.php?threads/290679/ */
$.getScript('https://media.innogames.com/com_DS_NL/scripts/Multicollor-Coordgrab_207233_f7gcp9yt.js');
Village Marker v1.1
javascript:
/* https://forum.tribalwars.net/index.php?threads/290617/ */
$.getScript('https://dl.dropboxusercontent.com/s/b0c26qwh0wh6183/village_marker.js');
Invite to Tribe Novo
javascript:
/* https://forum.tribalwars.net/index.php?threads/290612/ */
$.getScript('https://twscripts.dev/scripts/inviteToTribe.js');
Next building completion time in AM
javascript:
/* https://forum.tribalwars.net/index.php?threads/290608/ */
Array.from(buildings_table.rows).forEach(function(row, i) {
while (row.cells.length > 21) {
row.removeChild(row.lastChild);
}
if (i == 0) {
let th = document.createElement('th');
th.appendChild(document.createTextNode('Next building'));
row.appendChild(th);
} else {
let queue_icon = row.cells.item(20).querySelector('#order_0 .queue_icon img');
let time_text = queue_icon ? .getAttribute('data-title').split(' - ').at(1) || '';
row.insertCell().appendChild(document.createTextNode(time_text));
}
});
Troop Template for Trains
javascript:
/* https://forum.tribalwars.net/index.php?threads/290548/ */
$.getScript('https://rawcdn.githack.com/Jummox/TroopTemplateTrains/main/troopTemplateTrains.js');
FarmGod
javascript:
/* https://forum.tribalwars.net/index.php?threads/290356/ */
$.getScript('https://swtools.be/FarmGod/FarmGod.js');
Hide commands
javascript:
/* https://forum.tribalwars.net/index.php?threads/290336/ */
var commandFilter = ['/return_', '/back.png', '/farm.png', '/support.png', '/attack_small.png'];
var commandFilterRegex = 'img[src*="' + commandFilter.join('"], img[src*="') + '"]';
var mapElement = new MapObject();
if (window.location.href.match("screen=map"))
mapElement.changeMap();
else if (window.location.href.match('screen=info_village'))
removeUndesiredCommands($('tr.command-row'));
else if (window.location.href.match('mode=command'))
removeUndesiredCommands($('#commands_table tr'));
function MapObject() {
var self = this;
this.changeMap = function() {
this.twmap = window.TWMap;
this.twmap.popup.saveConsentHandleMouseMove = this.twmap.popup.handleMouseMove;
this.twmap.popup.handleMouseMove = this.handleMouseMove;
};
this.handleMouseMove = function(event) {
self.twmap.popup.saveConsentHandleMouseMove(event);
removeUndesiredCommands($('tr.command-row'));
};
}
function removeUndesiredCommands(tr) {
tr.filter((_, el) => $(el).find(commandFilterRegex, el).length > 0).remove();
}
Preventive stack planner
javascript:
/* https://forum.tribalwars.net/index.php?threads/290244/ */
$.getScript('https://dl.dropboxusercontent.com/s/vugcaw796xo8ixt/villi%20a%20rischio.js');
Mass deletion of notes
javascript:
/* https://forum.tribalwars.net/index.php?threads/290229/ */
$.getScript('https://media.innogames.com/com_DS_FR/Scripts/Gestion/suppressionNote_lau.js');
Mass Snipe
javascript:
/* https://forum.tribalwars.net/index.php?threads/290217/ */
$.getScript('https://twscripts.dev/scripts/massSnipe.js');
Small modification to a Wall Clear script
javascript:
/* https://forum.tribalwars.net/index.php?threads/290181/ */
var WCS = {
troops: [{
axe: 40,
ram: 4,
spy: 1
}, {
axe: 50,
ram: 7,
spy: 1
}, {
axe: 50,
ram: 10,
spy: 1
}, {
axe: 80,
ram: 16,
spy: 1
}, {
axe: 120,
ram: 20,
spy: 1
}, {
axe: 160,
ram: 25,
spy: 1
}, {
axe: 400,
ram: 50,
spy: 1
}],
urlCount: 15,
newTabWait: 400,
ramGreens: true,
};
(() => {
if (window.location.href.indexOf("am_farm") < 0) {
alert('Run this on the Loot Assistant page!');
}
console.log('Extracting village info');
let urls = [];
$('#plunder_list')
.find('tr')
.filter((i, el) => $(el).attr('id'))
.each((i, el) => {
var wallLevel = $(el).find('td:nth-of-type(7)').text();
var iconUrl = $(el).find('td:nth-of-type(2) img').attr('src');
if (wallLevel < 1 || (!WCS.ramGreens && iconUrl.indexOf('green.png') >= 0)) {
return;
}
var id = $(el).attr('id').match(/(\d+)/)[1];
console.log('Found village ' + id);
var cv = /village=(\w+)/.exec(window.location.href)[1];
var rp = `/game.php?village=${cv}&screen=place&target=${id}`;
var troops = wallLevel <= WCS.troops.length ? WCS.troops[wallLevel - 1] : WCS.troops[WCS.troops.length - 1]
var tpParams = Object.keys(troops).map(u => `${u}=${troops[u]}`).join('&')
urls.push(`${rp}&${tpParams}`);
});
console.log('Made URLs: ', urls)
urls = urls.slice(0, WCS.urlCount);
urls.forEach((url, i) => setTimeout(() => window.open(url, '_blank'), i * WCS.newTabWait));
})();
void(0);
script withdrawal
javascript:
/* https://forum.tribalwars.net/index.php?threads/290178/ */
var heavyCav = 4;
$.getScript('https://dl.dropboxusercontent.com/s/gdvx73xf89ksrcu/supportWithdrawal.js');
Toxic Donut's Remaining build time clears
javascript:
/* https://forum.tribalwars.net/index.php?threads/290174/ */
$.getScript('https://toxicdonut.dev:8080/js/Toxic_Donut_s_Remaining_Build_Time_Clears.js');
2022
Catapulting barbs
javascript:
/* https://forum.tribalwars.net/index.php?threads/290160/ */
var numScoot = 4;
var unitUsed = ["axe", "light", "heavy", "sword", "spear"];
var buildingIds = ["wall", "smith", "barracks", "snob", "stable", "garage", "market", "farm"];
var extraCata = true;
var minLevels = {
'farm': 22,
'main': 20
};
$.getScript('https://media.innogamescdn.com/com_DS_FR/Scripts/Pillage/catapultage-de-barbares_lau.js');
void(0);
Export premium log (csv)
javascript:
/* https://forum.tribalwars.net/index.php?threads/290155/ */
$.getScript('https://dev.nonreal.de/scripts/pp_log_sui.js');
Calc time till nuke is full
javascript:
/* https://forum.tribalwars.net/index.php?threads/290151/ */
$.getScript('https://dev.nonreal.de/scripts/nukedone.js');
BetterMap
javascript:
/* https://forum.tribalwars.net/index.php?threads/290010/ */
var config = [{
'tribes': ['', ''],
'color': 'RED'
}, {
'tribes': ['', ''],
'color': 'BLUE'
}, {
'players': [''],
'color': 'GREEN'
}, {
'villages': '500|500 000|000'.split(" "),
'color': 'BLACK'
}];
var barb = {
'min_points': 26,
'color': 'RED'
};
var text_color = '#FFFFFF';
var default_color = 'rgba(0, 0, 0, 0.6)';
var doc = document;
var win = (window.frames.length > 0) ? window.main : window;
function fnHilightMap() {
var height = 12;
var ii, col, row, coord, village, player, tribe;
for (row = 0; row < TWMap.size[1]; row++) {
for (col = 0; col < TWMap.size[0]; col++) {
var coord = TWMap.map.coordByPixel(TWMap.map.pos[0] + (TWMap.tileSize[0] * col), TWMap.map.pos[1] + (TWMap.tileSize[1] * row));
if (coord) {
player = null;
tribe = null;
village = TWMap.villages[coord.join("")];
if (village) {
village.points = village.points.replace(".", "");
if (village.owner) {
player = TWMap.players[village.owner];
}
if (doc.getElementById("map_village_" + village.id)) {
var tox = doc.getElementById("map_village_" + village.id);
var cssval = tox.style;
} else {
return
}
bk_color = default_color;
for (ii = 0; ii < config.length; ii++) {
if (config[ii].villages && (config[ii].villages.indexOf(coord.join("|")) >= 0)) {
bk_color = config[ii].color;
break;
}
if (player) {
if (config[ii].players && (config[ii].players.indexOf(player.name) >= 0)) {
bk_color = config[ii].color;
break;
}
tribe = TWMap.allies[player.ally];
if (tribe && config[ii].tribes && (config[ii].tribes.indexOf(tribe.tag) >= 0)) {
bk_color = config[ii].color;
break;
}
}
}
if (!player && (bk_color == default_color)) {
bk_color = barb.color;
}
if ((!player && (village.points >= barb.min_points)) || (player && (player.name != myself))) {
if ((!doc.getElementById("dalesmckay_map_hilight_" + coord.join("")))) {
var div = doc.createElement('div');
div.id = "dalesmckay_map_hilight_" + coord.join("");
div.style.position = cssval.position;
div.style.left = cssval.left;
div.style.top = (parseInt(cssval.top, 10) + 22) + 'px';
div.style.fontSize = '11px';
div.style.fontWeight = 'normal';
div.style.width = (TWMap.tileSize[0] - 1) + 'px';
div.style.height = height + 'px';
div.style.zIndex = 3;
div.style.display = 'block';
div.style.color = text_color;
div.style.textAlign = 'center';
div.style.opacity = '0.7';
div.style.border = '1px solid black';
div.style.borderRadius = '3px';
div.style.textShadow = "0 0 3px black,0 0 3px black";
div.innerHTML = (player ? player.name : (village.points + 'pct'));
if (div.innerHTML.split(" ").length > 1) {
var re = div.innerHTML.split(" ");
div.innerHTML = re[0] + "\n" + re[1];
div.style.height = height * 2 + 'px';
div.style.top = (parseInt(cssval.top, 10) + 10) + 'px';
div.style.fontSize = '10px';
} else if (div.innerHTML.length > 8) {
var re = div.innerHTML;
div.innerHTML = re.substring(8, 0) + "\n" + re.substring(8);
div.style.height = height * 2 + 'px';
div.style.top = (parseInt(cssval.top, 10) + 10) + 'px';
div.style.fontSize = '10px';
}
div.style.backgroundColor = (player ? bk_color : barb.color);
$(tox).after(div);
}
}
}
}
}
}
}
function fnCustomOnMove(x, y) {
win.$("div [id*=dalesmckay_map_hilight_]").remove();
if (chainedHandler) {
chainedHandler(x, y);
}
fnHilightMap()
}
var myself = game_data['player']['name'];
if (game_data['screen'] == "map") {
if ((typeof(chainedHandler) == "undefined") || !chainedHandler) {
var curCentre = [parseInt(win.$("#inputx").attr("value") || "0", 10), parseInt(win.$("#inputy").attr("value") || "0", 10)];
var chainedHandler = TWMap.mapHandler.onMove;
TWMap.mapHandler.onMove = fnCustomOnMove;
}
win.$("div [id*=dalesmckay_map_hilight_]").remove();
fnHilightMap();
} else {
alert("Acest script trebuie rulat pe hartă.\nVă redirecţionez acum...");
self.location = game_data['link_base_pure'].replace(/screen\=/i, "screen=map");
}
void(0);
Watchtower Evolved
javascript:
/* https://forum.tribalwars.net/index.php?threads/290009/ */
$.getScript('https://twscripts.dev/scripts/watchtowerEvolved.js');
Map SDK - Tool to assist scripters to draw on the map
javascript:
/* https://forum.tribalwars.net/index.php?threads/290008/ */
$.getScript('https://shinko-to-kuma.com/scripts/mapSdk.js');
Calculate total resource production
javascript:
/* https://forum.tribalwars.net/index.php?threads/289993/ */
var bonusProd = 0.2,
useFlags = true;
$.getScript('https://dev.nonreal.de/scripts/res_add.js');
Change village on map
javascript:
/* https://forum.tribalwars.net/index.php?threads/289975/ */
$.getScript('https://media.innogames.com/com_DS_NL/scripts/Dorpsswitch-via-kaart_206246.js');
Calculate supporting troops in village
javascript:
/* https://forum.tribalwars.net/index.php?threads/289950/ */
$.getScript('https://rawcdn.githack.com/Boudichon/tribal-wars-scripts/main/total-support-calculator.js');
Old School Ms Timer V2
javascript:
/* https://forum.tribalwars.net/index.php?threads/289943/ */
! function() {
function e() {
var e = $("#serverDate").text(),
r = $("#serverTime").text(),
t = e.match(/(..)\/(..)\/(....)/);
return t[3] + "-" + t[2] + "-" + t[1] + " " + r
}
function r(e) {
var r = (new Date).getMilliseconds();
return (1e3 + r - e) - (1e3 * Math.floor((1e3 + r - e) / 1e3))
}
function t(e) {
var t = setInterval(function() {
var t = r(e);
$("#serverMs").text(":" + ("00" + t).substr(-3))
}, 80);
return t
}
if (!$("#serverMs").length) {
$("#date_arrival").append('<span id="serverMs"></span>'), $("#serverMs").css({
color: "black",
"font-weight": "Bold"
});
var n, s = e(),
i = s,
a = setInterval(function() {
s = e(), s !== i && (n = (new Date).getMilliseconds(), clearInterval(a), t(n)), i = s
}, 20)
}
}();
Defense Health Check
javascript:
/* https://forum.tribalwars.net/index.php?threads/289880/ */
$.getScript('https://twscripts.dev/scripts/defenseHealthCheck.js');
Support Counter Evolved
javascript:
/* https://forum.tribalwars.net/index.php?threads/289857/ */
$.getScript('https://twscripts.dev/scripts/supportCounterEvolved.js');
Toxic Donut's Snipe Calculator.
javascript:
/* https://forum.tribalwars.net/index.php?threads/289835/ */
$.getScript('https://toxicdonut.dev:8080/js/Toxic_Donut_s_Snipe_Calculator_1.2.js');
Support Counter
javascript:
/* https://forum.tribalwars.net/index.php?threads/289688/ */
$.getScript('https://dl.dropboxusercontent.com/s/c2viqw737b3mlwi/Support%20Counter.js');
Mint Helper
javascript:
/* https://forum.tribalwars.net/index.php?threads/289685/ */
$.getScript('https://twscripts.dev/scripts/mintHelper.js');
localStorage Manager
javascript:
/* https://forum.tribalwars.net/index.php?threads/289684/ */
$.getScript('https://twscripts.dev/scripts/localStorageManager.js');
fake/nuke/fang script
javascript:
/* https://forum.tribalwars.net/index.php?threads/289682/ */
$.getScript('https://dl.dropboxusercontent.com/s/b6e56t9qbpthseg/generateFakeScript.js');
Tribe Inc overview (shows per village the inc)
javascript:
/* https://forum.tribalwars.net/index.php?threads/289636/ */
$.getScript('https://dl.dropboxusercontent.com/s/oy16zihcrmtul4k/tribeinc.js');
Display Mass Support travel duration on mobile
javascript:
/* https://forum.tribalwars.net/index.php?threads/289543/ */
$.getScript('https://rawcdn.githack.com/Boudichon/tribal-wars-scripts/main/massSupportTravelTime.js');
Rename incoming attack with backtime
javascript:
/* https://forum.tribalwars.net/index.php?threads/289502/ */
$.getScript('https://gistcdn.githack.com/duckiquack/2a2f6155fc45731b48a8177c779afd63/raw/backtimerename.js');
Hide rows
javascript:
/* https://forum.tribalwars.net/index.php?threads/289487/ */
(function() {
$("a.farm_icon_c, a.farm_icon_b, a.farm_icon_a").click(function() {
$(this).closest("tr").remove();
});
})();
Total Troop Count
javascript:
/* https://forum.tribalwars.net/index.php?threads/289358/ */
$.getScript('https://rawcdn.githack.com/higamy/higamy.github.io/main/TW/troopCountSummary.js');
TimeTool
javascript:
/* https://forum.tribalwars.net/index.php?threads/289352/ */
var timeColor = "green";
var waitingColor = "#ff9933";
var noDateColor = "green";
var timeBarWidth = false;
$.getScript('https://toxicdonut.dev:8080/js/bottenkraker.js');
Backtime calculator from report
javascript:
/* https://forum.tribalwars.net/index.php?threads/289337/ */
$.getScript('https://shinko-to-kuma.com/scripts/backTimeFromReport.js');
Discord Support Tool
javascript:
/* https://forum.tribalwars.net/index.php?threads/289204/ */
var config = {
webhookURL: "",
username: "Discord Support Tool",
avatar: "https://twscripts.dev/scripts/tribal-wars-icon.png",
colorCode: 12690020,
};
$.getScript('https://twscripts.dev/scripts/discordSupportTool.js');
Coordinate Map picker
javascript:
/* https://forum.tribalwars.net/index.php?threads/289145/ */
$.getScript('https://media.innogamescdn.com/com_DS_FR/Scripts/Carte/extracteur-de-coordonnees-manuel_lau.js');
Collect tribe coordinates
javascript:
/* https://forum.tribalwars.net/index.php?threads/289066/ */
function addLoader() {
var widget = document.createElement('div');
widget.id = 'loaders';
widget.style.position = 'fixed';
widget.style.width = '24px';
widget.style.height = '24px';
widget.style.top = '50%';
widget.style.left = '50%';
$(widget).css("margin-left", "-12px");
$(widget).css("margin-top", "-12px");
widget.style.zIndex = 13000;
$(widget).append($("<img src='graphic/throbber.gif' height='24' width='24'></img>"));
$('#contentContainer').append($(widget));
}
function removeLoader() {
$('#loaders').remove();
}
function addFader() {
var fader = document.createElement('div');
fader.id = 'fader';
fader.style.position = 'fixed';
fader.style.height = '100%';
fader.style.width = '100%';
fader.style.backgroundColor = 'black';
fader.style.top = '0px';
fader.style.left = '0px';
fader.style.opacity = '0.6';
fader.style.zIndex = '12000';
document.body.appendChild(fader);
}
function removeFader() {
$('#fader').remove();
}
function wait(ms) {
return new Promise((resolve, reject) => setTimeout(resolve, ms));
}
function getProfile(link) {
return $.ajax({
url: link,
type: "GET",
});
}
async function getVillagesCoords(link) {
let response = await getProfile(link);
return $(response).find('#villages_list').text().match(/[0-9]+\|[0-9]+/g);
}
async function getTribeCoords() {
addFader();
addLoader();
let tr_tags = null;
let link = null;
let tribe_coords = [];
if (window.location.href.indexOf('guest') != -1) {
tr_tags = $('#content_value > tbody > tr > td > table:nth-child(6) > tbody > tr > td:nth-child(1) > table:nth-child(3) > tbody > tr');
} else {
tr_tags = $('#content_value > table > tbody > tr > td:nth-child(1) > table:nth-child(3) > tbody > tr');
}
for (let it = 1; it < tr_tags.length; it++) {
link = $(tr_tags[it]).find('td:eq(0) a').attr('href');
tribe_coords = tribe_coords.concat(await getVillagesCoords(link));
await wait(250);
}
removeFader();
removeLoader();
let prefix = '<textarea cols=80 rows=10>';
let postfix = '<\/textarea>';
let S = '<html>' + '<head>' + '<title>Coletor de Coordenadas</title>' +
'<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\" />' + '</head>' + '<body>' +
'<b>Coletor de Coordenadas</b><hr>Todas as Aldeias da tribo:<br>' + prefix + tribe_coords.join(' ') + postfix + "</body></html>";
let popup = window.open('about:blank', 'twcc', 'width=720,height=480,scrollbars=1');
popup.document.open('text/html', 'replace');
popup.document.write(S);
popup.document.close();
}
(async function() {
'use strict';
$('#content_value').prepend("<input type='button' class='btn' value='Get tribe coords' id='get_tribe_coords'/>");
$('#get_tribe_coords').on('click', await getTribeCoords);
})();
Convert Text to Village Note
javascript:
/* https://forum.tribalwars.net/index.php?threads/288987/ */
$.getScript('https://twscripts.dev/scripts/convertTextToNote.js');
LA Press B
javascript:
/* https://forum.tribalwars.net/index.php?threads/288962/ */
$('#plunder_list .farm_icon_b:not(.farm_icon_disabled):first').click()
Balanced Scavenging
javascript:
/* https://forum.tribalwars.net/index.php?threads/288909/ */
gameURL = window.location.href.substr(0, window.location.href.indexOf('&'));
if (gameURL == '') {
gameURL = window.location.href;
}
if (window.location.href.includes("&screen=place&mode=scavenge")) {
swa = parseInt(document.getElementById('scavenge_screen').getElementsByTagName('td')[1].querySelector('.units-entry-all').innerHTML.match(/\d+/)[0]);
swInput = $('#scavenge_screen td input').eq(1);
spa = parseInt(document.getElementById('scavenge_screen').getElementsByTagName('td')[0].querySelector('.units-entry-all').innerHTML.match(/\d+/)[0]);
spInput = $('#scavenge_screen td input').eq(0);
if (document.getElementsByClassName('scavenge-option')[3].children[2].lastChild.className == 'inactive-view') {
swInput.val(Math.ceil(swa / 13)).trigger("change");
spInput.val(Math.ceil(spa / 13)).trigger("change");
$('.free_send_button').eq(3).focus();
} else if (document.getElementsByClassName('scavenge-option')[2].children[2].lastChild.className == 'inactive-view') {
swInput.val(Math.ceil(swa / 8)).trigger("change");
spInput.val(Math.ceil(spa / 8)).trigger("change");
$('.free_send_button').eq(2).focus();
} else if (document.getElementsByClassName('scavenge-option')[1].children[2].lastChild.className == 'inactive-view') {
swInput.val(Math.ceil(swa / 7 * 2)).trigger("change");
spInput.val(Math.ceil(spa / 7 * 2)).trigger("change");
$('.free_send_button').eq(1).focus();
} else if (document.getElementsByClassName('scavenge-option')[0].children[2].lastChild.className == 'inactive-view') {
swInput.val(swa).trigger("change");
spInput.val(spa).trigger("change");
$('.free_send_button').eq(0).focus();
} else {
alert("No Available Slots");
}
} else {
window.location.href = gameURL + "&screen=place&mode=scavenge";
}
Import/Export Dynamic Groups
javascript:
/* https://forum.tribalwars.net/index.php?threads/288897/ */
$.getScript('https://twscripts.dev/scripts/importExportDynamicGroups.js');
Fake Script Client
javascript:
/* https://forum.tribalwars.net/index.php?threads/288771/ */
var config = {
sendMode: 'random',
unitsAndAmounts: [],
playersInput: '',
tribesInput: '',
continents: '',
minCoord: '',
maxCoord: '',
distCenter: '',
center: '',
whatSend: '',
excludedPlayers: '',
enable20To1Limit: false,
minPoints: '',
maxPoints: '',
};
$.getScript('https://twscripts.dev/scripts/fakeScriptClient.js');
Helper to create attack messages
javascript:
/* https://forum.tribalwars.net/index.php?threads/288682/ */
$.getScript('https://dl.dropboxusercontent.com/s/g78wdn9er9jqdy3/planejadorOP.js');
Coin Minting Calculator
javascript:
/* https://forum.tribalwars.net/index.php?threads/288648/ */
$.getScript('https://twscripts.dev/scripts/coinMintingCalculator.js');
Confirm Enhancer
javascript:
/* https://forum.tribalwars.net/index.php?threads/288614/ */
$.getScript('https://media.innogames.com/com_DS_NL/scripts/ConfirmEnhancer_206293.js');
Optimize push villages
javascript:
/* https://forum.tribalwars.net/index.php?threads/288597/ */
$.getScript('https://dl.dropboxusercontent.com/s/sk9e092l4svw2ln/pp_push_AM.js');
Village Renamer
javascript:
/* https://forum.tribalwars.net/index.php?threads/288541/ */
$.getScript('https://b.catgirlsare.sexy/67kFW7JF-hEU.js');
Redirector
javascript:
/* https://forum.tribalwars.net/index.php?threads/288171/ */
$.getScript('https://twscripts.dev/scripts/redirector.js');
2021
Player Finder
javascript:
/* https://forum.tribalwars.net/index.php?threads/288076/ */
$.getScript('https://twscripts.dev/scripts/playerFinder.js');
Notebook conversion
javascript:
/* https://forum.tribalwars.net/index.php?threads/288071/ */
$.getScript('https://www.shinko-to-kuma.com/scripts/notebook.js');
Dynamic Fake Script
javascript:
/* https://forum.tribalwars.net/index.php?threads/288061/ */
$.getScript('https://corndog-tribalwars.herokuapp.com/fake.js');
Reports Overview Helper
javascript:
/* https://forum.tribalwars.net/index.php?threads/288014/ */
$.getScript('https://twscripts.dev/scripts/reportsOverviewHelper.js');
Scavenging script "Outstanding Organizer" (Maximizes resources / hour)
javascript:
/* https://forum.tribalwars.net/index.php?threads/287985/ */
$.ajaxSetup({
dataType: 'script'
});
$.getScript('https://www.minecraft.as/tw_scripts/outstanding_organizer.js');
void(0);
Mass scavenging overview++
javascript:
/* https://forum.tribalwars.net/index.php?threads/287920/ */
var only_summarize = true;
$.getScript('https://media.innogamescdn.com/com_DS_HU/scripts/active_scav_res.js');
New Quest system reward counter
javascript:
/* https://forum.tribalwars.net/index.php?threads/287919/ */
var wood = 0,
stone = 0,
iron = 0;
$.ajaxSetup({
complete: function(xhr, settings, response) {
if (xhr.responseText.includes("claim")) {
const object = xhr.responseJSON.response.rewards_all;
for (const property in object) {
wood += parseInt(object[property].wood);
stone += parseInt(object[property].stone);
iron += parseInt(object[property].iron);
}
alert(`Wood: ${wood} \nClay: ${stone} \nIron: ${iron}`);
}
}
});
void(0);
Total production counter
javascript:
/* https://forum.tribalwars.net/index.php?threads/287918/ */
var fa = 0,
agyag = 0,
vas = 0,
sitter = "";
if (game_data.player.sitter != "0") {
sitter = "t=" + game_data.player.id + "&";
}
function createHead() {
$("#production_table").find("tr:eq(0)").append("<th>Fa</th>");
$("#production_table").find("tr:eq(0)").append("<th>Agyag</th>");
$("#production_table").find("tr:eq(0)").append("<th>Vas</th>");
}
createHead();
var link = "https://" + window.location.host + "/game.php?" + sitter + "village=";
function getPage(id, pages) {
if (id < pages) {
var url = link + $(`#production_table .quickedit-vn:eq(${id})`).attr("data-id");
$.ajax({
type: 'GET',
url: url,
dataType: "html",
success: function(data) {
$("#show_prod strong", data).each(function(k, v) {
if (k == 0) {
classname = "fa";
} else if (k == 1) {
classname = "agyag";
} else {
classname = "vas";
}
$("#production_table").find(`tr:eq(${id+1})`).append(`<td class=${classname}>` + $(this).html() + `</td>`);
});
setTimeout(function() {
getPage(id + 1, pages);
}, 200);
}
});
} else {
sum()
}
}
getPage(0, totalPages());
function totalPages() {
return parseInt($("#production_table").find("th:eq(1)").text().match(/\d+/)[0]);
}
function numberWithCommas(x) {
var parts = x.toString().split(".");
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ".");
return parts.join(".");
}
function sum() {
$(".fa").each(function(key, value) {
fa += parseInt($(value).text().replace(".", ""));
});
$(".agyag").each(function(key, value) {
agyag += parseInt($(value).text().replace(".", ""));
});
$(".vas").each(function(key, value) {
vas += parseInt($(value).text().replace(".", ""));
});
console.log(fa, agyag, vas);
var prod = {
text: [`Total`,
`<br/>`,
`<br/>`,
`Wood: ${numberWithCommas(fa) + ", daily production: " + numberWithCommas(24 * fa)}`,
`<br/>`,
`Clay: ${numberWithCommas(agyag) + ", daily production: " + numberWithCommas(24 * agyag)}`,
`<br/>`,
`iron: ${numberWithCommas(vas) + ", daily production: " + numberWithCommas(24 * vas)}`
].join('')
};
UI.SuccessMessage(prod.text, 20000);
}
void(0);
Build and troop template calculator
javascript:
/* https://forum.tribalwars.net/index.php?threads/287917/ */
$.getScript('https://media.innogamescdn.com/com_DS_HU/scripts/building-unit-calculator.js');
Coord grabber from map
javascript:
/* https://forum.tribalwars.net/index.php?threads/287916/ */
var alapertelmezes = {
bbkodos: 'nem',
ujsor: 'igen'
};
var fejleszto = "IronFist";
var verzio = "2.3";
$.getScript('https://media.innogamescdn.com/com_DS_HU/scripts/koordinata.js');
Incoming support counter into a village
javascript:
/* https://forum.tribalwars.net/index.php?threads/287915/ */
$.getScript('https://media.innogamescdn.com/com_DS_HU/scripts/incom_supp.js');
Mass coordinates grabber (extract coordinates from any page)
javascript:
/* https://forum.tribalwars.net/index.php?threads/287914/ */
var villas = $("table[class=content-border]").html().match(/\d+\|\d+/g);
alert((villas && (villas.length > 0) ? villas.join(" ") : "No co-ordinates were found"));
void(0);
Request for support converter (add unit icon on support request)
javascript:
/* https://forum.tribalwars.net/index.php?threads/287913/ */
(function() {
var area = $("#simple_message");
var text = area.val();
text = text
.replace(/Spy/gim, "[unit]spy[/unit]").replace(/Ram/gim, "[unit]ram[/unit]").replace(/Noble/gim, "[unit]snob[/unit]").replace(/Axe/gim, "[unit]axe[/unit]").replace(/Sword/gim, "[unit]sword[/unit]").replace(/LCav/gim, "[unit]light[/unit]").replace(/HCav/gim, "[unit]heavy[/unit]");
area.val(text);
})();
Report-to-forum converter (add spoiler on reports)
javascript:
/* https://forum.tribalwars.net/index.php?threads/287912/ */
var szoveg = $('#message').text().replace(/- \[report\]/g, "[spoiler][report_display]").replace(/\[\/report\]/g, "[/report_display][/spoiler]").replace("Forwarded reports:", "").trim();
$('#message').text(szoveg).select();
document.execCommand("Copy");
UI.InfoMessage("Reports copied to the clipboard! <br> Author: öreg", 3000);
void(0);
Evolved Fake Train
javascript:
/* https://forum.tribalwars.net/index.php?threads/287900/ */
$.getScript('https://twscripts.dev/scripts/evolvedFakeTrain.js');
Find percent of available farm
javascript:
/* https://forum.tribalwars.net/index.php?threads/287894/ */
$.getScript('https://rawcdn.githack.com/leopoliveira/TW-Scripts/main/percentPopDisp.js');
RedAlert's Scripts Pack
javascript:
/* https://forum.tribalwars.net/index.php?threads/287832/ */
$.getScript('https://twscripts.dev/scripts/scriptsPack.js');
QoL Improvements for Sophie Scavenging Overview Script
javascript:
/* https://forum.tribalwars.net/index.php?threads/287813/ */
$.getScript('https://dl.dropboxusercontent.com/s/bahhtqlrnrxkdxn/WildWang_sophieUpdatedScavOverview.js');
Support Counter
javascript:
/* https://forum.tribalwars.net/index.php?threads/287790/ */
if (document.URL.match(/mode=commands/)) {
var troopsArray = new Array();
var numvil = 0;
var main = $("#commands_table")[0];
var names = new Array();
var vilCoords = new Array();
var village = new Array();
var CurVill;
var units = ['[unit]spear[/unit]', '[unit]sword[/unit]', '[unit]axe[/unit]', '[unit]archer[/unit]', '[unit]spy[/unit]', '[unit]light[/unit]', '[unit]marcher[/unit]', '[unit]heavy[/unit]', '[unit]ram[/unit]', '[unit]catapult[/unit]', '[unit]knight[/unit]'];
var farmused = ['1', '1', '1', '1', '0', '4', '5', '4', '5', '8', '10'];
var rows = main.getElementsByTagName('tr');
for (var j = 1; j < rows.length; j++) {
var cells = rows[j].getElementsByTagName('td');
if ($(cells[0]).text().match(/Support/) == "Support") {
CurVill = $(cells[0]).text().split(/\(/);
CurVill = CurVill[CurVill.length - 1];
CurVill = CurVill.match(/\d+\|\d+/);
var val = 0;
if (vilCoords[CurVill] == null) {
village.push(CurVill);
vilCoords[CurVill] = new Array();
var p = 0;
for (var k = 3; k <= (cells.length - 1); k++) {
val = cells[k].firstChild.nodeValue;
if (!val) {
val = cells[k].firstChild.innerHTML.replace(/<[^>]*>/g, '').replace(/\s+/, '').match(/\d+/)[0];
}
vilCoords[CurVill][p] = parseInt(val);
p = p + 1;
}
} else {
var p = 0;
for (var k = 3; k <= (cells.length - 1); k++) {
val = cells[k].firstChild.nodeValue;
if (!val) {
val = cells[k].firstChild.innerHTML.replace(/<[^>]*>/g, '').replace(/\s+/, '').match(/\d+/)[0];
}
vilCoords[CurVill][p] += parseInt(val);
p = p + 1;
}
}
}
}
var msg = "Total Support Sent<br>" + "---------------------------------<br>";
for (var g = 0; g < village.length; g++) {
msg += "Sent to <b>" + village[g] + "</b> -- ";
var villageCoords = village[g];
var troops = vilCoords[villageCoords];
var farmspace = 0;
for (var h = 0; h <= 11; h++) {
if (troops[h] == 0) {} else {
msg += units[h] + troops[h] + " ";
farmspace += parseInt(troops[h] * farmused[h]);
var packets = Math.round(farmspace / 1500);
}
}
msg += " (farm pop: " + farmspace + ")<br><br>";
}
function openPopup() {
var TheNewWin = window.open('', 'name', 'height=255,width=800, toolbar=no,directories=no,status=no,menubar=no');
TheNewWin.document.write('<html>');
TheNewWin.document.write('<head><title>Popup<\/title><\/head><body style="overflow:auto; font-family:verdana,arial;font-size:10pt"> <p>' + msg + '<\/p>');
TheNewWin.document.write(' <hr \/> <p align="right"><a href="#" onclick="self.close(); return false;">Close');
TheNewWin.document.write(' Window<\/a><\/p> <\/body><\/html>');
}
openPopup();
} else {
self.location = "http://" + window.location.hostname + "/game.php?screen=overview_villages&mode=commands";
}
void 0;
Advanced Report Filters
javascript:
/* https://forum.tribalwars.net/index.php?threads/287778/ */
$.getScript('https://twscripts.dev/scripts/advancedReportFilters.js');
Own Notes Manager
javascript:
/* https://forum.tribalwars.net/index.php?threads/287765/ */
$.getScript('https://twscripts.dev/scripts/ownNotesManager.js');
Find Frontline Villages
javascript:
/* https://forum.tribalwars.net/index.php?threads/287751/ */
$.getScript('https://twscripts.dev/scripts/findFrontlineVillages.js');
Make nobles script
javascript:
/* https://forum.tribalwars.net/index.php?threads/287689/ */
$.getScript('https://rawcdn.githack.com/rayandefreitas/twscripts/master/snob_train.js');
Model adjust for fake limit
javascript:
/* https://forum.tribalwars.net/index.php?threads/287610/ */
window.fakeLimit = 1;
$.getScript('https://gistcdn.githack.com/filipemiguel97/6f08d10b60009cba4587aa4f5ec91b8b/raw/editTemplate.js');
Bonus Finder Evolved
javascript:
/* https://forum.tribalwars.net/index.php?threads/287608/ */
$.getScript('https://twscripts.dev/scripts/bonusFinderEvolved.js');
Nobles Resources Calculator
javascript:
/* https://forum.tribalwars.net/index.php?threads/287583/ */
$.getScript('https://twscripts.dev/scripts/nobleCalculator.js');
Friend Request
javascript:
/* https://forum.tribalwars.net/index.php?threads/287581/ */
$.getScript('https://twscripts.dev/scripts/friendRequest.js');
Commands Overview
javascript:
/* https://forum.tribalwars.net/index.php?threads/287538/ */
$.getScript('https://twscripts.dev/scripts/commandsOverview.js');
Fake Script Generator
javascript:
/* https://forum.tribalwars.net/index.php?threads/287521/ */
$.getScript('https://twscripts.dev/scripts/fakeScriptGenerator.js');
Incomings mapper
javascript:
/* https://forum.tribalwars.net/index.php?threads/287511/ */
var speeds = {
spy: 9,
light: 10,
heavy: 11,
axe: 18,
sword: 22,
ram: 30,
snob: 35
};
var preferredGroup = 0,
tags = {
"ram": speeds.ram,
"cat": speeds.ram,
"noble": speeds.snob,
"scout": speeds.spy,
"light": speeds.light,
"heavy": speeds.heavy,
"axe": speeds.axe,
"sword": speeds.sword
};
$.getScript('https://dl.dropboxusercontent.com/s/r2bzsz3g9d9pyl9/incomings-mapper.js');
AM templater
javascript:
/* https://forum.tribalwars.net/index.php?threads/287487/ */
var groupings = {
troops: {
"group name": "template name"
},
research: {
"group name": "template name"
},
buildings: {
"group name": "template name"
}
};
function selectItem(itemName, selectObject) {
var l = selectObject.length;
while (l--) {
console.log(selectObject.options[l].text.trim(), itemName);
if (selectObject.options[l].text.trim() == itemName) {
selectObject.selectedIndex = l;
return;
}
}
throw Error();
}
if (game_data.screen == "am_troops") {
var group = $("strong.group-menu-item")[0].textContent.trim().slice(1, -1);
var select = $("#content_value").find("select")[0];
selectItem(groupings.troops[group], select);
Accountmanager.applyTrooplate(select, false);
var checkbox = $("input.selectAll")[0];
if (!checkbox.checked)
checkbox.click();
checkbox.nextElementSibling.nextElementSibling.focus();
} else if (game_data.screen == "am_research") {
var group = $("strong.group-menu-item")[0].textContent.trim().slice(1, -1);
var select = $('select[name=template]');
selectItem(groupings.research[group], select[0]);
selectItem(groupings.research[group], select[1]);
var checkbox = $("#select_all_top")[0];
if (!checkbox.checked)
checkbox.click();
$('select[name=template]')[1].nextElementSibling.focus();
} else if (game_data.screen == "am_village") {
var group = $("strong.group-menu-item")[0].textContent.trim().slice(1, -1);
var select = $('select[name=template]');
selectItem(groupings.buildings[group], select[0]);
selectItem(groupings.buildings[group], select[1]);
var checkbox = $("#select_all_top")[0];
if (!checkbox.checked)
checkbox.click();
$('select[name=template]')[1].nextElementSibling.focus();
}
RP confirmation links
javascript:
/* https://forum.tribalwars.net/index.php?threads/287410/ */
if (!window.location.href.includes("try=confirm")) throw new Error;
document.getElementById("target_incomings") && document.getElementById("target_incomings").remove(), document.getElementById("target_outgoings") && document.getElementById("target_outgoings").remove(), $.get(document.getElementsByClassName("village_anchor contexted")[0].firstElementChild.href, function(e) {
var t, n;
$("#commands_incomings", e)[0] && (t = $("#commands_incomings", e).children()[1].innerHTML, (n = document.createElement("div")).innerHTML = t, n.id = "target_incomings", document.getElementById("content_value").prepend(n), $("#target_incomings").find(".rename-icon").each(function() {
this.remove()
}), $("#target_incomings").find(".widget-command-timer").each(function() {
this.parentElement.remove()
}), document.getElementById("target_incomings").firstElementChild.rows[0].cells[1].colSpan = "1", n.style.width = "70%", $(".command-row", $("#target_incomings")).each(function() {
var e = this.firstElementChild.firstElementChild.firstElementChild.firstElementChild,
t = this.lastElementChild.textContent;
e.onclick = function() {
return editToggle("default_name_span", "edit_name"), document.getElementById("new_attack_name").value = t.trim(), renameAttack("new_attack_name", "default_name", "attack_name"), editToggle("edit_name", "default_name_span"), !1
}
})), $("#commands_outgoings", e)[0] && (t = $("#commands_outgoings", e)[0].innerHTML, (n = document.createElement("div")).innerHTML = t, n.id = "target_outgoings", document.getElementById("content_value").prepend(n), $("#target_outgoings").find(".rename-icon").each(function() {
this.remove()
}), $("#target_outgoings").find(".widget-command-timer").each(function() {
this.parentElement.remove()
}), document.getElementById("target_outgoings").firstElementChild.rows[0].cells[2].remove(), n.style.width = "70%", $(".command-row", $("#target_outgoings")).each(function() {
var e = this.firstElementChild.firstElementChild.firstElementChild.firstElementChild,
t = this.lastElementChild.textContent;
e.onclick = function() {
return editToggle("default_name_span", "edit_name"), document.getElementById("new_attack_name").value = t.trim(), renameAttack("new_attack_name", "default_name", "attack_name"), editToggle("edit_name", "default_name_span"), !1
}
}))
});
Commander Script
javascript:
/* https://forum.tribalwars.net/index.php?threads/287369/ */
$.getScript('https://dl.dropboxusercontent.com/s/1kfp8ja9k9io86b/Tsalkapone.rally_point_script.js');
farm pp script
javascript:
/* https://forum.tribalwars.net/index.php?threads/287358/ */
$.getScript('https://dl.dropboxusercontent.com/s/w0v5wge03d85jl8/farmInfoPP.js');
resources sender script
javascript:
/* https://forum.tribalwars.net/index.php?threads/287357/ */
$.getScript('https://dl.dropboxusercontent.com/s/gijrksuvyynuzlp/resSender.js');
Fake Script - Minor Modification
javascript:
/* https://forum.tribalwars.net/index.php?threads/287347/ */
coords = '';
var doc = document;
if (window.frames.length > 0 && window.main != null) doc = window.main.document;
url = doc.URL;
if (url.indexOf('screen=place') == -1) alert('Use the script in the rally point page!');
coords = coords.split(' ');
index = 0;
farmcookie = document.cookie.match('(^|;) ?farm=([^;]*)(;|$)');
if (farmcookie != null) index = parseInt(farmcookie[2]);
if (index >= coords.length) alert('All villages were extracted, now start from the first!');
if (index >= coords.length) index = 0;
coords = coords[index];
coords = coords.split('|');
index = index + 1;
cookie_date = new Date(2022, 3, 27);
document.cookie = 'farm=' + index + ';expires=' + cookie_date.toGMTString();
doc.forms[0].x.value = coords[0];
doc.forms[0].y.value = coords[1];
$('#place_target').find('input').val(coords[0] + '|' + coords[1]);
if (doc.forms[0].spy.dataset.allCount > 0) {
doc.forms[0].spy.value = 1;
}
if (doc.forms[0].ram.dataset.allCount > 0) {
doc.forms[0].ram.value = 1;
} else if (doc.forms[0].catapult.dataset.allCount > 0) {
doc.forms[0].catapult.value = 1;
} else if (doc.forms[0].sword.dataset.allCount > 0) {
doc.forms[0].sword.value = 1;
} else if (doc.forms[0].spear.dataset.allCount > 0) {
doc.forms[0].spear.value = 1;
} else if (doc.forms[0].axe.dataset.allCount > 0) {
doc.forms[0].axe.value = 1;
}
end();
Filter incomings
javascript:
/* https://forum.tribalwars.net/index.php?threads/287330/ */
$.getScript('https://shinko-to-kuma.com/scripts/filterOrigins.js');
In Transit Support Counter
javascript:
/* https://forum.tribalwars.net/index.php?threads/287316/ */
$.getScript('https://dl.dropboxusercontent.com/s/4rxnlyqnrkbjn64/InTransitSupportCounter.js');
Single a farm
javascript:
/* https://forum.tribalwars.net/index.php?threads/287284/ */
$.getScript('https://dl.dropboxusercontent.com/s/kogr1dqrq325ndb/farma.js');
Fill Troops In Simulator
javascript:
/* https://forum.tribalwars.net/index.php?threads/287256/ */
$.getScript('https://twscripts.dev/scripts/fillTroopsInSimulator.js');
command renamer with interface
javascript:
/* https://forum.tribalwars.net/index.php?threads/287214/ */
var popPackets = 1000;
var heavyPop = 4;
var troopsName = {
archer: "arc",
axe: "axe",
catapult: "cat",
heavy: "HC",
light: "LC",
marcher: "MC",
ram: "ram",
snob: "noble",
spy: "spy",
sword: "sw",
spear: "sp",
knight: "pal",
packets: "packets"
};
$.getScript('https://dl.dropboxusercontent.com/s/943wux6kq026hft/commandRenamerInterface.js');
New Incoming Op Spotter
javascript:
/* https://forum.tribalwars.net/index.php?threads/287212/ */
$.getScript('https://dl.dropboxusercontent.com/s/flt8iokmg7pomow/IncomingOpSpotter.js');
Support troop counter
javascript:
/* https://forum.tribalwars.net/index.php?threads/287193/ */
$.getScript('https://rawcdn.githack.com/fardelian/tribalstuff/main/client/support-counter.js');
Last Village Growth
javascript:
/* https://forum.tribalwars.net/index.php?threads/287184/ */
$.getScript('https://twscripts.dev/scripts/lastVillageGrowth.js');
PP Log Filter
javascript:
/* https://forum.tribalwars.net/index.php?threads/287177/ */
$.getScript('https://dl.dropboxusercontent.com/s/x0aq12mbjza85cs/WildWang_ppFilter.js');
mass village renamer
javascript:
/* https://forum.tribalwars.net/index.php?threads/287162/ */
$.getScript('https://www.tribalwars.top/tribalwars/renameVillages/nameVillages.js');
Last Time Attacked
javascript:
/* https://forum.tribalwars.net/index.php?threads/287161/ */
$.getScript('https://twscripts.dev/scripts/lastTimeAttacked.js');
French Keypress
javascript:
/* https://forum.tribalwars.net/index.php?threads/287112/ */
cookieName = "fakeypress";
$.getScript('https://media.innogamescdn.com/com_DS_FR/Scripts/Pillage/fakeypress_lau.js');
Tribe Players Under Attack (Tribe Leader)
javascript:
/* https://forum.tribalwars.net/index.php?threads/287111/ */
$.getScript('https://twscripts.dev/scripts/tribePlayersUnderAttack.js');
Find Villages in Range
javascript:
/* https://forum.tribalwars.net/index.php?threads/287098/ */
$.getScript('https://twscripts.dev/scripts/villagesInRange.js');
resources balancer
javascript:
/* https://forum.tribalwars.net/index.php?threads/287064/ */
$.getScript('https://dl.dropboxusercontent.com/s/bytvle86lj6230c/resBalancer.js');
Simple Fang Calculator Script
javascript:
/* https://forum.tribalwars.net/index.php?threads/287035/ */
$.getScript('https://dl.dropboxusercontent.com/s/qa6uxns2uoue9gg/FangCalc.js');
Incoming Train Spotter
javascript:
/* https://forum.tribalwars.net/index.php?threads/286990/ */
$.getScript('https://dl.dropboxusercontent.com/s/btos8zohl73j4ih/ts2.js');
Random fakes (server and client)
javascript:
/* https://forum.tribalwars.net/index.php?threads/286978/ */
$.getScript('https://rawcdn.githack.com/fardelian/tribalstuff/main/client/fakes.js');
Get Incomings for Player
javascript:
/* https://forum.tribalwars.net/index.php?threads/286977/ */
$.getScript('https://twscripts.dev/scripts/getIncsForPlayer.js');
Clear Barbarian Walls
javascript:
/* https://forum.tribalwars.net/index.php?threads/286971/ */
$.getScript('https://twscripts.dev/scripts/clearBarbarianWalls.js');
Command filler
javascript:
/* https://forum.tribalwars.net/index.php?threads/286960/ */
var units = {
'spear': 0,
'sword': 0,
'axe': 0,
'archer': 0,
'spy': true,
'light': 0,
'marcher': 0,
'heavy': true,
'catapult': 0,
'ram': 0,
'knight': 0,
'snob': 0
};
var coords = '';
$.getScript('https://gistcdn.githack.com/duckinScripts/8fb6aa435f68f5452212a50492000604/raw/command_filler.js');
Redirecting to rally point
javascript:
/* https://forum.tribalwars.net/index.php?threads/286959/ */
if (typeof edificio == 'undefined') var edificio = 'place';
$('tr:not(:first) td span a').each(function(i, e) {
e.href = e.href.replace('&screen=overview', '&screen=' + edificio);
});
Hide villages already being attacked
javascript:
/* https://forum.tribalwars.net/index.php?threads/286958/ */
var aux = 0;
var villages_total = $('table #villages_list tbody tr:last td a');
var element = $('table #villages_list tbody tr td span[class="icon command command-attack-ally"]');
var element1 = $('table #villages_list tbody tr td span[class="icon command command-attack"]');
if (villages_total.length) {
villages_total.click();
}
element.parent().parent().remove();
element1.parent().parent().remove();
void(0);
Collect coordinates from someone's profile
javascript:
/* https://forum.tribalwars.net/index.php?threads/286957/ */
$.getScript('https://gistcdn.githack.com/duckinScripts/b55c77dabc107d1537ddaa0c8fbd2f85/raw/collect_coords_profile.js');
Collect coordinates of the villages that are attacking you
javascript:
/* https://forum.tribalwars.net/index.php?threads/286956/ */
$.getScript('https://gistcdn.githack.com/duckinScripts/4b2a1403d828e0d040f277b0f8dc348c/raw/collect_inc.js');
Collect barbarian coordinates in the map
javascript:
/* https://forum.tribalwars.net/index.php?threads/286955/ */
/* https://forum.tribos.com.pt/index.php?threads/80463/ */
var radius = 5.0;
var barb_size = {
min: 10,
max: 12500
};
var village_size = {
min: 10,
max: 15
};
$.getScript('https://media.innogamescdn.com/com_DS_PT/scripts/coords.barbaras.js');
Counting army / loot
javascript:
/* https://forum.tribalwars.net/index.php?threads/286953/ */
$.getScript('https://gistcdn.githack.com/duckinScripts/16eafdcaa7e67ddad9730d1f75db1307/raw/troop_counter.js');
Coordinates extractor
javascript:
/* https://forum.tribalwars.net/index.php?threads/286949/ */
$.getScript('https://gistcdn.githack.com/filipemiguel97/a611e6fa1ea7af8f287c037c63a7f2e7/raw/coordExtractor.js');
Tribe member troop counter
javascript:
/* https://forum.tribalwars.net/index.php?threads/286941/ */
$.getScript('https://shinko-to-kuma.com/scripts/tribeMembersTroopCalculator.js');
Collect coordinates in the map
javascript:
/* https://forum.tribalwars.net/index.php?threads/286932/ */
$.getScript('https://gistcdn.githack.com/duckinScripts/bbcc2749339e2b37f217defe50bd1471/raw/collect_map_coords.js');
Large Packet Identifier
javascript:
/* https://forum.tribalwars.net/index.php?threads/286911/ */
$.getScript('https://dl.dropboxusercontent.com/s/p1yobrxt9a3uwtb/WildWang_identifyBigStacks_1.0.0.js');
Overwatch - Defensive tool for tribe leaders
javascript:
/* https://forum.tribalwars.net/index.php?threads/286899/ */
$.getScript('https://shinko-to-kuma.com/scripts/overwatch.js');
Smart simple fake script
javascript:
/* https://forum.tribalwars.net/index.php?threads/286887/ */
window.coords = '';
window.ram_spy_ratio = 8;
window.fakeLimit = 1;
$.getScript('https://gistcdn.githack.com/filipemiguel97/0b885ae622e7901dd4a48666e732e517/raw/smart_fakes.js');
Lightning Support
javascript:
/* https://forum.tribalwars.net/index.php?threads/286886/ */
$.getScript('https://glcdn.githack.com/CanIGetAnMR/lightning-support/-/raw/e7706cf055957ca0bbabf87c1b01f7eb4a5b2728/Lightning%20Support%20Script.js');
Bash points in reports
javascript:
/* https://forum.tribalwars.net/index.php?threads/286883/ */
$.getScript('https://gistcdn.githack.com/filipemiguel97/8bbf097ae3510014390958b71c48975b/raw/bashPointsInReports.js');
Support Withdrawal
javascript:
/* https://forum.tribalwars.net/index.php?threads/286865/ */
var settings = {
minTroopCounts: {
'spear': 0,
'sword': 0,
'axe': 0,
'archer': 0,
'spy': 0,
'light': 0,
'marcher': 0,
'heavy': 0,
'ram': 0,
'catapult': 0,
'knight': 0,
'snob': 0
},
coords: '',
troopWithdrawRatio: 1,
};
$.getScript('https://dl.dropboxusercontent.com/s/4wphvlnxl4i631q/WildWang_supportWithdraw_1.0.0.js');
/* $.getScript('https://dl.dropboxusercontent.com/s/jwv88sheoew4pau/WildWang_supportWithdraw_noFill_0.0.1.js'); */
Tag incomings with backtime time
javascript:
/* https://forum.tribalwars.net/index.php?threads/286862/ */
var FORMAT = "#unit# from #coords# - #player# Backtime: #backtime#";
$.getScript('https://gistcdn.githack.com/filipemiguel97/6470af210c44fe3ad2838415ccfb5518/raw/commadTaggerWithBacktimeTime.js');
Display incomings tribe members
javascript:
/* https://forum.tribalwars.net/index.php?threads/286857/ */
$.getScript('https://dl.dropboxusercontent.com/s/ikunxd5d59059b4/scriptMostrarAtaquesACaminho.js');
Command Renamer with colors
javascript:
/* https://forum.tribalwars.net/index.php?threads/286841/ */
var font_size = 8;
var attack_layout = 'column';
var settings = {
0: ['[Morto]', 'D', 'green', 'white'],
1: ['[Apoiar]', 'S', 'lime', 'white'],
2: ['[Desviado]', 'D!', 'orange', 'white'],
3: ['[Desviar]', 'D', 'dorange', 'white'],
4: ['[Reconquistado]', 'R!', 'gray', 'white'],
5: ['[Reconquistar]', 'R', 'white', 'black'],
6: ['[Snipado]', 'S!', 'lblue', 'black'],
7: ['[Snipar]', 'S', 'blue', 'white'],
8: ['[Fubar]', 'F', 'black', 'white'],
9: ['[Fubado]', 'F!', 'white', 'black'],
10: ['[Fake]', 'Fk', 'pink', 'black'],
11: [' | Alerta', 'A!', 'yellow', 'black']
};
var colors = {
'red': ['#e20606', '#b70707'],
'green': ['#31c908', '#228c05'],
'blue': ['#0d83dd', '#0860a3'],
'yellow': ['#ffd91c', '#e8c30d'],
'orange': ['#ef8b10', '#d3790a'],
'lblue': ['#22e5db', '#0cd3c9'],
'lime': ['#ffd400', '#ffd400'],
'white': ['#ffffff', '#dbdbdb'],
'black': ['#000000', '#2b2b2b'],
'gray': ['#adb6c6', '#828891'],
'dorange': ['#ff0000', '#ff0000'],
'pink': ['#ff69b4', '#ff69b4']
}
$.getScript('https://gistcdn.githack.com/filipemiguel97/076df367a5f0f3272abc90136749c121/raw/AttackRenamerColors.js');
Mass snipe calculator
javascript:
/* https://forum.tribalwars.net/index.php?threads/286834/ */
$.getScript('https://shinko-to-kuma.com/scripts/massSnipe.js');
Auto notes from reports
javascript:
/* https://forum.tribalwars.net/index.php?threads/286827/ */
$.getScript('https://dl.dropboxusercontent.com/s/mpir3x1wh36z2jn/scriptCriarNotaRelatorio.js');
Import Export Quickbar
javascript:
/* https://forum.tribalwars.net/index.php?threads/286825/ */
$.getScript('https://gistcdn.githack.com/filipemiguel97/2887acafce48632b649cae4f4b174419/raw/importExportQuickBar.js');
incoming renamer
javascript:
/* https://forum.tribalwars.net/index.php?threads/286824/ */
$.getScript('https://gistcdn.githack.com/filipemiguel97/75395bee1b5d49f1576f1df7913354e1/raw/Tsalkapone.Central_Intelligence_Script.js');
Shinko to Kuma Rally point opener
javascript:
/* https://forum.tribalwars.net/index.php?threads/286819/ */
if (window.location.href.indexOf('&screen=overview_villages') < 0) {
window.location.assign(game_data.link_base_pure + "&screen=overview_villages");
} else {
var villageOverviews = $("a[href$='screen=overview']");
var villageIds = [];
var targetUrls = [];
for (var i = 1; i < villageOverviews.length; i++) {
thisURL = villageOverviews[i].href;
villageIds.push(thisURL.match('[\?&]village=([^&#]*)')[1]);
}
for (var j = 0; j < villageIds.length; j++) {
targetUrls.push(`${window.location.origin}/game.php?village=${villageIds[j]}&screen=place`);
}
targetUrls.forEach((url, i) => {
setTimeout(() => window.open(url), i * 200);
});
}
Old School Ms Timer
javascript:
/* https://forum.tribalwars.net/index.php?threads/286816/ */
! function() {
function e() {
var e = $("#serverDate").text(),
r = $("#serverTime").text(),
t = e.match(/(..)\/(..)\/(....)/);
return t[3] + "-" + t[2] + "-" + t[1] + " " + r
}
function r(e) {
var r = (new Date).getMilliseconds();
return (1e3 + r - e) - (1e3 * Math.floor((1e3 + r - e) / 1e3))
}
function t(e) {
var t = setInterval(function() {
var t = r(e);
$("#serverMs").text(":" + ("00" + t).substr(-3))
}, 80);
return t
}
if (!$("#serverMs").length) {
$("#serverTime").after('<span id="serverMs"></span>'), $("#serverMs, #serverTime").css({
color: "Black",
"font-weight": "Bold",
"font-size": "20px"
});
var n, s = e(),
i = s,
a = setInterval(function() {
s = e(), s !== i && (n = (new Date).getMilliseconds(), clearInterval(a), t(n)), i = s
}, 20)
}
}();
Incoming Op Spotter
javascript:
/* https://forum.tribalwars.net/index.php?threads/286812/ */
$.getScript('https://moderndemokrati.se/tribalwars/Qbox.js');
Notebook Troop Counter
javascript:
/* https://forum.tribalwars.net/index.php?threads/286811/ */
(function() {
var url_prefix = window.game_data.link_base_pure;
var url = url_prefix + "overview_villages&mode=units";
var overviews_url = url_prefix + "overview_villages";
var parse_html = function(html_string) {
var parser = new DOMParser();
return parser.parseFromString(html_string, "text/html");
};
var parse_row = function(row, unit_labels) {
var trs = row.querySelectorAll('tr');
var units = [];
var available_tds = trs[0].querySelectorAll('td.unit-item');
var outward_tds = trs[2].querySelectorAll('td.unit-item');
var transit_tds = trs[3].querySelectorAll('td.unit-item');
available_tds.forEach(function(td, i) {
units.push({
label: unit_labels[i],
current: td.textContent.trim(),
supporting: outward_tds[i].textContent.trim(),
total: (parseInt(td.textContent) +
parseInt(outward_tds[i].textContent) +
parseInt(transit_tds[i].textContent)).toString(),
});
});
units = units.filter(function(unit) {
return parseInt(unit.total);
});
return {
village: '',
units: units,
};
};
var parse_rows = function(rows, labels) {
var coord_regex = /\(([0-9]{3}\|[0-9]{3})\)/;
return Array.prototype.map.call(rows, function(row) {
var village_string = row.querySelector('a span[data-text]').textContent;
var regex_result = coord_regex.exec(village_string);
var parsed = parse_row(row, labels);
parsed.village = regex_result[1];
return parsed;
});
};
var total_villages = function(villages, labels) {
var total_units = {};
labels.forEach(function(label) {
total_units[label] = {
current: 0,
supporting: 0,
total: 0,
};
});
villages.forEach(function(village, i) {
var units = village.units;
units.forEach(function(unit) {
var key = unit.label;
var value = total_units[key];
value.label = key;
value.current += parseInt(unit.current);
value.supporting += parseInt(unit.supporting);
value.total += parseInt(unit.total);
total_units[key] = value;
});
});
var total_units_array = [];
for (var i in total_units) {
total_units_array.push(total_units[i]);
}
total_units_array = total_units_array.filter(function(unit) {
return parseInt(unit.total);
});
return total_units_array;
};
var most_chars = function(units, property) {
var character_lengths = units.map(unit => String(unit[property]).length);
return Math.max(...character_lengths);
};
var pad_left = function(string, length) {
string = String(string);
if (string.length >= length)
return string;
var to_pad = length - string.length;
var padding = Array(to_pad).fill(' ').join('');
return padding + string;
};
var grid = function(units) {
var grid_sizes = {
label: most_chars(units, 'label'),
current: most_chars(units, 'current'),
supporting: most_chars(units, 'supporting'),
total: most_chars(units, 'total'),
};
var unit_strings = units.map(function(unit) {
return pad_left(unit.label, grid_sizes.label) + " | Available: " +
pad_left(unit.current, grid_sizes.current) + " | Supporting: " +
pad_left(unit.supporting, grid_sizes.supporting) + " | Total: " +
pad_left(unit.total, grid_sizes.total);
});
return unit_strings.join("\n");
};
var request_rows = function(all_present_rows, callback) {
var requested_rows = [];
var inputs_html = Array.prototype.map.call(all_present_rows, function(row, i) {
return '<label><input type="checkbox" checked value="' + i + '" />' + row.querySelector('a span[data-text]').textContent.trim() + '</label><br />';
}).join('');
var $all = $('<div><label><input type="checkbox" checked />' + _('All') + '</label></div>');
var $inputs = $('<div>' + inputs_html + '</div>');
var $buttons = $('<div class="center"><button class="btn btn-confirm-yes">' + _('Confirm') + '</button>' +
'<button class="btn btn-confirm-no">' + _('Cancel') + '</button></div>');
$all.find('input').change(function() {
$inputs.find('input').prop('checked', this.checked);
});
$inputs.find('input').change(function() {
var $all_checkbox = $all.find('input');
if ($inputs.find('input:checked').length !== $inputs.find('input').length) {
$all_checkbox.prop('checked', false);
} else {
$all_checkbox.prop('checked', true);
}
});
$buttons.find('button.btn-confirm-yes').click(function() {
Dialog.close();
var result = $inputs.find('input:checked').map(function() {
var input = this;
return all_present_rows[input.value];
});
callback(result);
});
$buttons.find('button.btn-confirm-no').click(function() {
Dialog.close();
});
var $dialog = $all.add($inputs).add($buttons);
Dialog.show('ls_tw_troop_report', $dialog);
};
var target = document.querySelector('textarea');
if (!target) {
UI.ErrorMessage(_('Could not find a text box to fill'));
} else {
var restore_url;
$.ajax(overviews_url, {
success: function(body) {
var other_document = parse_html(body);
restore_url = other_document.querySelector('#overview_menu td.selected a, #paged_view_content td.selected a').href;
$.ajax(url, {
success: function(body) {
var other_document = parse_html(body);
var container = other_document.querySelector('table#units_table');
var label_containers = container.querySelectorAll('th [title]');
var labels = Array.prototype.map.call(label_containers, function(container) {
return container.title;
});
var rows = container.querySelectorAll('tbody');
request_rows(rows, function(requested_rows) {
var villages = parse_rows(requested_rows, labels);
var totals = total_villages(villages, labels);
target.value += _('Total units') + '\n[code]\n' + grid(totals) + '\n[/code]';
villages.forEach(function(village) {
target.value += '\n[coord]' + village.village + '[/coord]\n[code]\n' + grid(village.units) + '\n[/code]';
});
});
$.ajax(restore_url);
},
});
},
});
}
})();
Rename Outbound Packet Support
javascript:
/* https://forum.tribalwars.net/index.php?threads/286810/ */
$.getScript('https://dl.dropboxusercontent.com/s/sdmu3afvk76f2d5/packet.js');
Proximity G2K
javascript:
/* https://forum.tribalwars.net/index.php?threads/286809/ */
$.getScript('https://dl.dropboxusercontent.com/s/woxdn78ozwcxexk/proximity.js');
Coord Picker
javascript:
/* https://forum.tribalwars.net/index.php?threads/286807/ */
$.getScript('https://media.innogamescdn.com/com_DS_UK/Scripts/map_coord_picker.js');
Support Sender
javascript:
/* https://forum.tribalwars.net/index.php?threads/286798/ */
var heavyCav = 4;
$.getScript('https://dl.dropboxusercontent.com/s/idwa7mmpn6nxl3l/supportSender.js');
support sent counter
javascript:
/* https://forum.tribalwars.net/index.php?threads/286797/ */
var heavyCav = 4;
var pop_packet = 1000;
$.getScript('https://dl.dropboxusercontent.com/s/kg6tt4o3t7eu2v2/calc_stacks.js');
Tribe Troop Counter Using Tribe Settings
javascript:
/* https://forum.tribalwars.net/index.php?threads/286795/ */
$(function() {
var world = 'https://en117.tribalwars.net/game.php?screen=ally&mode=members_troops'
$('<table class="vis w100" id="troopCounterAll"> <tr> <th style="min-width: 200px">Village</th> <th><img src="https://dsen.innogamescdn.com/asset/cf618eb/graphic/unit/unit_spear.png" alt="" class="tooltip" title="Spear fighter" /></th> <th><img src="https://dsen.innogamescdn.com/asset/cf618eb/graphic/unit/unit_sword.png" alt="" class="tooltip" title="Swordsman" /></th> <th><img src="https://dsen.innogamescdn.com/asset/cf618eb/graphic/unit/unit_axe.png" alt="" class="tooltip" title="Axeman" /></th> <th><img src="https://dsen.innogamescdn.com/asset/1d2499b/graphic/unit/unit_archer.png" alt="" class="tooltip" title="Archer" /></th> <th><img src="https://dsen.innogamescdn.com/asset/cf618eb/graphic/unit/unit_spy.png" alt="" class="tooltip" title="Scout" /></th> <th><img src="https://dsen.innogamescdn.com/asset/cf618eb/graphic/unit/unit_light.png" alt="" class="tooltip" title="Light cavalry" /></th> <th><img src="https://dsen.innogamescdn.com/asset/1d2499b/graphic/unit/unit_marcher.png" alt="" class="tooltip" title="Mounted Archer" /></th> <th><img src="https://dsen.innogamescdn.com/asset/cf618eb/graphic/unit/unit_heavy.png" alt="" class="tooltip" title="Heavy cavalry" /></th> <th><img src="https://dsen.innogamescdn.com/asset/cf618eb/graphic/unit/unit_ram.png" alt="" class="tooltip" title="Ram" /></th> <th><img src="https://dsen.innogamescdn.com/asset/cf618eb/graphic/unit/unit_catapult.png" alt="" class="tooltip" title="Catapult" /></th> <th><img src="https://dsen.innogamescdn.com/asset/1d2499b/graphic/unit/unit_knight.png" alt="" class="tooltip" title="Paladin" /></th> <th><img src="https://dsen.innogamescdn.com/asset/cf618eb/graphic/unit/unit_snob.png" alt="" class="tooltip" title="Nobleman" /></th> <th><img src="https://dsen.innogamescdn.com/asset/cf618eb/graphic/unit/unit_militia.png" alt="" class="tooltip" title="Militia" /></th> <th><img src="https://dsen.innogamescdn.com/asset/cf618eb/graphic/icons/commands_outgoing.png" alt="" class="tooltip" title="Active commands" /></th> <th><img src="https://dsen.innogamescdn.com/asset/cf618eb/graphic/unit/att.png" alt="" class="tooltip" title="Incoming attacks" style="vertical-align: -3px" /></th> </tr> </table>').appendTo($('select[name=player_id]').parent())
if (document.URL.indexOf("screen=ally&mode=members_troops") > 0) {
function parse_troop_counts(data) {
var overview_patt = /The troops overview shows the counts of troops owned by each village, including troops currently not in the village./i;
var location = overview_patt.exec(data).index;
var shorterText = data.substr(location, data.indexOf('</table>', location) - location);
var troopPatt = /<tr>.*?<\/tr>/gis;
var troops = [...shorterText.matchAll(troopPatt)];
troops.shift();
var getSelectedUsername = /<option value="\d+" selected>\s+(.+?)\s+<\/option>/gis;
var username = getSelectedUsername.exec(data);
username = username[1];
for (var i = 0; i < troops.length; i++) {
$(troops[i][0].replace(/(<a href.+a>)/i, username.concat(" - $1"))).appendTo($('#troopCounterAll'));
}
}
$.each($('select[name=player_id] option:not([disabled],[hidden])'), function(index, opt) {
setTimeout(function() {
$.get(world + '&player_id=' + opt.value, parse_troop_counts);
}, 500 * index);
});
} else {
window.location = world;
}
});
rename villages
javascript:
/* https://forum.tribalwars.net/index.php?threads/286793/ */
$.getScript('https://dl.dropboxusercontent.com/s/9rpgd3weuj0vp7z/renameVillages.js');
Tsalkapone Village Renamer
javascript:
/* https://forum.tribalwars.net/index.php?threads/286791/ */
$.getScript('https://dl.dropboxusercontent.com/s/kkaro0wvg8ec03t/Tsalkapone.Village_Renamer.js');
view more than 1000 incomings
javascript:
/* https://forum.tribalwars.net/index.php?threads/286789/ */
$.getScript('https://dl.dropboxusercontent.com/s/e66v7a763vi0zxu/incomingsAll.js');
Modified support packet counter script
javascript:
/* https://forum.tribalwars.net/index.php?threads/286785/ */
if (document.URL.match(/mode=commands/)) {
var troopsArray = new Array();
var numvil = 0;
var main = $("#commands_table")[0];
var names = new Array();
var vilCoords = new Array();
var village = new Array();
var CurVill;
var units = ['Spear', 'Sword', 'Axe', 'Archer', 'Scout', 'LC', 'Mounted Archer', 'HC', 'Ram', 'Cat', 'Paladin', 'Noble'];
var farmused = ['1', '1', '1', '1', '0', '4', '5', '4', '5', '8', '10', '100'];
var rows = main.getElementsByTagName('tr');
for (var j = 1; j < rows.length; j++) {
var cells = rows[j].getElementsByTagName('td');
if ($(cells[0]).text().match(/Support/) == "Support") {
CurVill = $(cells[0]).text().split(/\(/);
CurVill = CurVill[CurVill.length - 1];
CurVill = CurVill.match(/\d+\|\d+/);
var val = 0;
if (vilCoords[CurVill] == null) {
village.push(CurVill);
vilCoords[CurVill] = new Array();
var p = 0;
for (var k = 3; k <= (cells.length - 1); k++) {
val = cells[k].firstChild.nodeValue;
if (!val) {
val = cells[k].firstChild.innerHTML.replace(/<[^>]*>/g, '').replace(/\s+/, '').match(/\d+/)[0];
}
vilCoords[CurVill][p] = parseInt(val);
p = p + 1;
}
} else {
var p = 0;
for (var k = 3; k <= (cells.length - 1); k++) {
val = cells[k].firstChild.nodeValue;
if (!val) {
val = cells[k].firstChild.innerHTML.replace(/<[^>]*>/g, '').replace(/\s+/, '').match(/\d+/)[0];
}
vilCoords[CurVill][p] += parseInt(val);
p = p + 1;
}
}
}
}
var msg = "Total Support Sent<br>" + "---------------------------------<br>";
for (var g = 0; g < village.length; g++) {
msg += "Sent to <b>" + village[g] + "</b> -- ";
var villageCoords = village[g];
var troops = vilCoords[villageCoords];
var farmspace = 0;
for (var h = 0; h < units.length; h++) {
if (troops[h] == 0) {} else {
msg += units[h] + ": " + troops[h] + " ";
farmspace += parseInt(troops[h] * farmused[h]);
}
}
msg += " (farm pop: " + farmspace + ")<br><br>";
}
function openPopup() {
var TheNewWin = window.open('', 'name', 'height=255,width=800, toolbar=no,directories=no,status=no,menubar=no');
TheNewWin.document.write('<html>');
TheNewWin.document.write('<head><title>Popup<\/title><\/head><body style="overflow:auto; font-family:verdana,arial;font-size:10pt"> <p>' + msg + '<\/p>');
TheNewWin.document.write(' <hr \/> <p align="right"><a href="#" onclick="self.close(); return false;">Close');
TheNewWin.document.write(' Window<\/a><\/p> <\/body><\/html>');
}
openPopup();
} else {
self.location = "http://" + window.location.hostname + "/game.php?screen=overview_villages&mode=commands&type=support";
}
void 0;
//$.getScript('https://shinko-to-kuma.com/scripts/supportTracker.js');
Shinko To Kuma HQ Resources Request
javascript:
/* https://forum.tribalwars.net/index.php?threads/286783/ */
$.getScript('https://shinko-to-kuma.com/scripts/requestScript.js');
Manual import of villages using coordinates
javascript:
/* https://forum.tribalwars.net/index.php?threads/286765/ */
$.getScript('https://shinko-to-kuma.com/scripts/groupImport.js');
Extracting Coordinates from the Map by Clicking
javascript:
/* https://forum.tribalwars.net/index.php?threads/286764/ */
if (game_data.player.premium == false) {
alert("Premium Account is necessary to use this script");
end();
}
javascript: var win = (window.frames.length > 0) ? window.main : window;
var coords = [];
var outputID = 'villageList';
var encodeID = 'cbBBEncode';
var isEncoded = true;
function fnRefresh() {
$("#coord_picker").draggable();
win.$('#' + outputID).text(
coords.map(function(e) {
return isEncoded ? '[coord]' + e + '[\/coord]' : e;
}).join(isEncoded ? '\n' : ' ')
);
}
win.$(win.document).ready(function() {
if (win.$('#' + outputID).length <= 0) {
if (win.game_data.screen == 'map') {
var srcHTML = '<div id="coord_picker" style="z-index: 99; position: absolute; top: 90px; width: auto; height: auto; background-color:#CEBC98; background-image: url(../graphic/index/bg-tile.jpg); border:2px solid; visibility: visible; cursor:pointer">' + '<center><span style="color:blue;text-decoration:underline;align:center;">Extract Coordinates from the Map</span><br/><br/>' + '<center><input type="checkbox" id="cbBBEncode" onClick="isEncoded=this.checked;fnRefresh();"' + (isEncoded ? 'checked' : '') + '/>BB-Codes<br/>' + '<center><input type="radio" id="drag" onClick="drag=this.checked;fnRefresh();"' + (isEncoded ? '' : '') + '/>Release (select to be able to drag the window)<br/>' + '<textarea id="' + outputID + '" cols="40" rows="10"resize="none" value="" onFocus="this.select();"></textarea><br/><input type=button value="Close Window" onClick="document.getElementById(\'coord_picker\').style.display=\'none\'">' + '</div>';
ele = win.$('body').append(win.$(srcHTML));
win.TWMap.map._handleClick = function(e) {
var pos = this.coordByEvent(e);
var coord = pos.join("|");
var ii = coords.indexOf(coord);
if (ii >= 0) {
coords.splice(ii, 1);
} else {
coords.push(coord);
}
fnRefresh();
return false;
};
} else {
alert("The script only works on the map screen, you'll be redirected now");
self.location = win.game_data.link_base_pure.replace(/screen\=\w*/i, "screen=map");
}
}
});
void(0);
MS Clock Visual
javascript:
/* https://forum.tribalwars.net/index.php?threads/286758/ */
$.getScript('https://shinko-to-kuma.com/scripts/timer.js');
Group Count
javascript:
/* https://forum.tribalwars.net/index.php?threads/286740/ */
$.getScript('https://dl.dropboxusercontent.com/s/ry6d9uu2m0mcxsb/group%20counts.js');
Warehouse Percentages
javascript:
/* https://forum.tribalwars.net/index.php?threads/286734/ */
var notifyPercentage = 90;
var minWarehouseSize = 60000;
$.getScript('https://dl.dropboxusercontent.com/s/8j8yi1ojbq3af3u/WHperc_minified.js');
Single Village Snipe
javascript:
/* https://forum.tribalwars.net/index.php?threads/286731/ */
$.getScript('https://twscripts.dev/scripts/singleVillageSnipe.js');
Tribal Attack Script
javascript:
/* https://forum.tribalwars.net/index.php?threads/286730/ */
var jumpToRandomVillage = false,
fakesPerVillage = 1,
forceEqualTroopCount = false,
distributeByPopulation = false,
troops = {
"spear": 0,
"sword": 0,
"axe": 0,
"archer": 0,
"spy": 'min',
"light": 0,
"marcher": 0,
"heavy": 0,
"ram": 0,
"catapult": 'min!'
},
minExclamationCount = 1,
dockMode = false;
var useForumCoords = true,
forumLink = "forum_id=3076&thread_id=7006",
forumSpoilerName = "coordsA",
hoursBeforeCheckingForum = 0.5,
coords = "",
populationLim = 0.01;
function m() {
if (!location.href.includes("overview_villages") || dockMode) {
if (jumpToRandomVillage) {
var e = localStorage.getItem("fs_fakecount");
if (null == e && localStorage.setItem("fs_fakecount", 0), "" == document.forms[0].x.value && null == $(".village-item")[0]) {
if (e >= fakesPerVillage) return localStorage.setItem("fs_fakecount", 0), void gtrv();
localStorage.setItem("fs_fakecount", Number(e) + 1)
}
}
it(), jumpToRandomVillage && !ci() && (localStorage.setItem("fs_fakecount", 0), gtrv())
} else sc()
}
function it() {
var e = guti(geu()),
o = grc();
document.forms[0].x.value = o.split("|")[0], document.forms[0].y.value = o.split("|")[1];
for (var t = 0; t < e.length; t++) $("input[id*=" + e[t][0] + "]")[0].value = e[t][1]
}
function gtrv() {
var e = $("a[href*=selectVillage]", "#group_popup"),
o = Math.floor(Math.random() * e.length);
if (dockMode) {
if (e = $("a[href*=selectVillage]", "#group_popup"), o = Math.floor(Math.random() * e.length), 0 == e.length) throw villageDock.open(), new Error("Village dock not open!");
e[o].click()
} else {
if (villageIds = localStorage.getItem("fs_villagedata"), null == villageIds) return void alert("No villages found, please run the script from the overview page to update own villages");
villageIds = villageIds.split(","), o = Math.floor(Math.random() * villageIds.length), window.location.href = window.location.href.replace(/(village=)\d+/, "village=" + villageIds[o])
}
}
function geu() {
var e = [];
for (key in troops) 0 != troops[key] && e.push([key, troops[key]]);
return e
}
function guti(e) {
for (var o = [], t = {
spear: 1,
sword: 1,
axe: 1,
archer: 1,
spy: 2,
light: 4,
marcher: 5,
heavy: 6,
ram: 5,
catapult: 8,
knight: 10,
snob: 100
}, r = [], l = [], a = 0, i = 0; i < e.length; i++) {
var n = 0;
isNaN(Number(e[1])) ? e[1].includes("min") ? (r.push(e[0]), n = 0, l.push(i), e[1].includes("min!") && (n = minExclamationCount)) : "max" == e[1] && (n = Number($("#units_entry_all_" + e[0])[0].innerText.match(/\d+/)[0])) : n = e[1], o.push([e[0], n]), a += n * t[e[0]]
}
for (var u = game_data.village.points * populationLim, s = (i = 0, [0, 3e4 * populationLim]); a < u && 0 != r.length;) {
var c = Number($("#units_entry_all_" + o[l][0])[0].innerText.match(/\d+/g)[0]);
if ((o[l][1] < c || forceEqualTroopCount) && o[l][1] < s[0] && (!distributeByPopulation || o[l][1] < s[0] / t[o[l][0]]) && (o[l][1] += 1, a += t[o[l][0]]), i < r.length - 1 ? i++ : (i = 0, s[0] += 1), s[0] > s[1]) {
o[l][1] += Math.ceil((u - a) / t[o[l][0]]), a += t[o[l][0]];
break
}
}
return o
}
function grc() {
if (useForumCoords) {
var e = Timing.getCurrentServerTime(),
o = forumLink.split("forum_id=")[1].split("&")[0],
t = forumLink.split("thread_id=")[1].split("&")[0],
r = "fs_coords_" + t + "_" + forumSpoilerName,
l = "fs_lastforumcheck_" + t + "_" + forumSpoilerName,
a = localStorage.getItem(l);
if (null != a && e - Number(a) < 36e5 * hoursBeforeCheckingForum) coords = localStorage.getItem(r);
else try {
$.get("/game.php?screen=forum&screenmode=view_thread&forum_id=" + o + "&thread_id=" + t).then(function(o) {
try {
if (coords = $(o).find(".spoiler").has("[value='" + forumSpoilerName + "']").find("pre").html(), null == coords) throw Exception;
localStorage.setItem(r, coords), localStorage.setItem(l, e.toString())
} catch {
throw alert("Coordinates could not be retrieved from forum post, make sure to format your coords like this: \n\n[" + "spoiler=" + forumSpoilerName + "][" + "code]123|456 456|789 876|543[" + "/code][" + "/spoiler]"), new Error("Could not get coords!")
}
}, "html"), localStorage.setItem("fs_fakecount", 0)
} catch {
throw alert("Coordinates could not be retrieved from forum post, make sure to include forum1412&thread_id=18009 in your link!"), new Error("Could not get coords!")
}
}
var i = coords.split(" ");
return i[Math.floor(Math.random() * i.length)]
}
function ci() {
for (var e = $(".unitsInput", "#command-data-form"), o = $(".units-entry-all", "#command-data-form"), t = !0, r = 0; r < e.length; r++) {
var l = Number(o[r].innerText.match(/\d+/g)[0]);
Number(e[r].value) > l && (t = !1)
}
return t
}
function sc() {
for (var e = $("a[href*=village]", "#combined_table").has("span"), o = "", t = 0; t < e.length; t++) {
var r = e[t].href.split("village=")[1].split("&")[0];
o += t == e.length - 1 ? r : r + ","
}
localStorage.setItem("fs_villagedata", o), alert(e.length + " villages stored!")
}
m();
Selection of Snipe Scripts
javascript:
/* https://forum.tribalwars.net/index.php?threads/286725/ */
$.getScript('https://dl.dropboxusercontent.com/s/q0okl2m9mz4o9vd/snipe.js');
javascript:
/* https://forum.tribalwars.net/index.php?threads/286725/ */
$.getScript('https://dl.dropboxusercontent.com/s/y32vs0i6392wfoc/Tsalkapone.Snipe_script.js');
javascript:
/* https://forum.tribalwars.net/index.php?threads/286725/ */
$.getScript('https://dl.dropboxusercontent.com/s/pe16x70deergrwa/ssp.js');
Sniping Script - With Sigil
javascript:
/* https://forum.tribalwars.net/index.php?threads/286724/ */
var sigilPercentage = 20;
/*
Author : Fluffy88
Modified by : Mitchell - Superdog
Modified again by: Jacob - Crunsh
Fixed by: RedAlert (2020-03-08)
*/
function fnInjectOverviewBar() {
var defaultCoords = fnExtractCoords(win.$('title').html());
var defaultDate = new Date();
defaultDate.setTime(
((Math.floor(defaultDate.getTime() / msPerDay) + 1) * minsPerDay + defaultDate.getTimezoneOffset()) * msPerMin
);
defaultDate = defaultDate
.toString()
.replace(/\w+\s*/i, '')
.replace(/(\d*:\d*:\d*)(.*)/i, '$1');
fnInjectUnits();
win.$(
'<tr><td colspan="3">Target Village:<input id="snipe_coord" value="' +
defaultCoords +
'" class="text-input inactive" size="7" onFocus="this.select()" /></td><td colspan="1">Hit time:<input id="arrival_time" size="25" class="text-input inactive" value="' +
defaultDate +
'" onFocus="this.select()" /></td><td><input type="button" value="Go" onClick="fnCalculateBackTime()" /></td></tr>'
).insertAfter(win.$('#menu_row2'));
win.$(
'<div id="snipe_output"><br/><span>Fluffy88\'s Snipe Calculator</span><br/><span><sub>(dalesmckay modification ' +
version +
')</sub><hr></span><br/></div>'
).insertAfter(win.$('body'));
}
function fnExtractCoords(src) {
var vv = src.match(/\d+\|\d+/gi);
return vv ? vv[vv.length - 1] : null;
}
function fnCalculateDistance(to, from) {
var target = fnExtractCoords(to).match(/(\d+)\|(\d+)/);
var source = fnExtractCoords(from).match(/(\d+)\|(\d+)/);
var fields = Math.sqrt(Math.pow(source[1] - target[1], 2) + Math.pow(source[2] - target[2], 2));
return fields;
}
function fnDebugLog(msg) {
win.$('body').append('<span>' + msg + '</span><br/>');
}
/* sendMethod = "GET" || "POST", params = json, type = xml,json,text */
function fnAjaxRequest(url, sendMethod, params, type) {
var error = null,
payload = null;
win.$.ajax({
async: false,
url: url,
data: params,
dataType: type,
type: String(sendMethod || 'GET').toUpperCase(),
error: function(req, status, err) {
error = 'ajax: ' + status;
},
success: function(data, status, req) {
payload = data;
},
});
if (error) {
throw error;
}
return payload;
}
function fnCreateConfig(name) {
return win.$(fnAjaxRequest('/interface.php', 'GET', {
func: name
}, 'xml')).find('config');
}
function fnCreateUnitConfig() {
return fnCreateConfig('get_unit_info');
}
function fnCreateWorldConfig() {
return fnCreateConfig('get_config');
}
function fnCalculateLaunchTime(source, target, unit, landingTime) {
var distance = fnCalculateDistance(target, source);
var unitSpeed = unitConfig.find(unit + ' speed').text();
var sigilRatio = 1 + sigilPercentage / 100;
var unitTime = (distance * unitSpeed * msPerMin) / sigilRatio;
var launchTime = new Date();
launchTime.setTime(Math.round((landingTime.getTime() - unitTime) / msPerSec) * msPerSec);
return launchTime;
}
function fnWriteCookie(ele) {
var snipeConfig = '';
win.$('#combined_table tr:first th img[src*=unit_]').each(function(i, e) {
snipeConfig += win.$('#view_' + e.src.match(/unit\_(.+)\.png?/i)[1]).is(':checked') ? '1' : '0';
});
var cookie_date = new Date(2099, 11, 11);
win.document.cookie = '$snipe=' + snipeConfig + ';expires=' + cookie_date.toGMTString();
}
function fnInjectUnits() {
var twCookie = win.document.cookie.match(/\$snipe\=([0|1]*)/i);
if (twCookie) {
twCookie = twCookie[1];
for (var ii = 0; ii < twCookie.length; ii++) {}
}
win.$('#combined_table tr:first th img[src*=unit_]').each(function(i, e) {
if (this.parentNode.nodeName == 'A') {
win.$(
'<input type="checkbox" ' +
(!twCookie || twCookie[i] == '1' ? 'checked="true"' : '') +
' id="view_' +
e.src.match(/unit\_(.+)\.png?/i)[1] +
'" OnClick="fnWriteCookie(this);"/>'
).insertBefore(win.$(this.parentNode));
} else {
win.$(
'<input type="checkbox" ' +
(!twCookie || twCookie[i] == '1' ? 'checked="true"' : '') +
' id="view_' +
e.src.match(/unit\_(.+)\.png?/i)[1] +
'" OnClick="fnWriteCookie(this);"/>'
).insertBefore(win.$(this));
}
});
win.$('#combined_table tr:first th:has(img[src*=unit_])').attr('style', 'background-color:yellow');
}
function fnExtractUnits() {
var units = [];
win.$('#combined_table tr:first th img[src*=unit_]').each(function(i, e) {
units.push(e.src.match(/unit\_(.+)\.png?/i)[1]);
});
return units;
}
function fnCalculateBackTime() {
var worldConfig = fnCreateWorldConfig();
var hasChurch = worldConfig && parseInt(worldConfig.find('game church').text() || '0', 10);
var arrivalTime = new Date(document.getElementById('arrival_time').value.split(':').slice(0, 3).join(':'));
var target = document.getElementById('snipe_coord').value;
var servertime = win.$('#serverTime').html().match(/\d+/g);
var serverDate = win.$('#serverDate').html().match(/\d+/g);
serverTime = new Date(serverDate[1] + '/' + serverDate[0] + '/' + serverDate[2] + ' ' + servertime.join(':'));
var output = [];
var ii, troop_count, source, launchTime;
var units = fnExtractUnits();
win.$('#combined_table tr:gt(0)').each(function(i, e) {
source = fnExtractCoords($(this).find('td:eq(1)').html());
if (source != target) {
var isVisible = false;
for (ii = 0; ii < units.length; ii++) {
if (win.$('#view_' + units[ii]).is(':checked')) {
troop_count = parseInt(
$(this)
.find('td:eq(' + (ii + (hasChurch ? 9 : 8)) + ')')
.text(),
10
);
if (troop_count > 0) {
launchTime = fnCalculateLaunchTime(source, target, units[ii], arrivalTime);
if (launchTime.getTime() > serverTime.getTime()) {
isVisible = true;
output.push([
launchTime.getTime(),
'Send ' +
units[ii] +
'(' +
troop_count +
') from ' +
source +
' to ' +
target +
' at ' +
launchTime.toString().replace(/(\d*:\d*:\d*)(.*)/i, '$1'),
e,
]);
}
}
}
}
}
win.$(e).attr('style', 'display:' + (isVisible ? 'table-row' : 'none'));
});
output = output.sort(function(a, b) {
return a[0] - b[0];
});
for (var qq = 0; qq < output.length; qq++) {
win.$('#combined_table').get(0).tBodies[0].appendChild(output[qq][2]);
}
/* Clear existing messages and display version */
var srcHTML = '';
srcHTML += '<br/>';
srcHTML += "<span>Fluffy88's Snipe Calculator</span>";
srcHTML += '<br/>';
srcHTML += '<span><sub>(dalesmckay modification ' + version + ')</sub><hr></span>';
srcHTML += '<br/>';
if (output.length > 0) {
srcHTML +=
'<div align="center"><textarea wrap="off" readonly="yes" cols="80" rows="' +
(output.length + 1) +
'" style="width:95%;background-color:transparent;" onfocus="this.select();">';
for (ii = 0; ii < output.length; ii++) {
srcHTML += output[ii][1] + '\n';
}
srcHTML += '</textarea></div>';
} else {
srcHTML += '<span style="color:red;">Impossible to reach on time</span>';
}
srcHTML += '<br/><br/><br/>';
win.$('#snipe_output').html('');
win.$('#snipe_output').append(win.$(srcHTML));
}
try {
if (game_data.screen == 'overview_villages' && game_data.mode == 'combined') {
var author = 'dalesmckay@gmail.com';
var minVer = '0.0';
var win = window;
var ver = win.game_data.version.match(/[\d|\.]+/g);
if (!ver || parseFloat(ver[1]) < minVer) {
alert('This script requires v' + minVer + ' or higher.\nYou are running: v' + ver[1]);
} else if (win.$('#snipe_output').length <= 0) {
var msPerSec = 1000;
var secsPerMin = 60;
var minsPerHour = 60;
var hrsPerDay = 24;
var msPerMin = msPerSec * secsPerMin;
var msPerHour = msPerMin * minsPerHour;
var msPerDay = msPerHour * hrsPerDay;
var minsPerDay = hrsPerDay * minsPerHour;
var version = 'v3.2';
var unitConfig = fnCreateUnitConfig();
fnInjectOverviewBar();
}
} else {
UI.InfoMessage('Going to the combined overview...', 3000, 'success');
window.location = game_data.link_base_pure + 'overview_villages&mode=combined';
}
} catch (objError) {
var dbgMsg = 'Error: ' + String(objError.message || objError);
alert(dbgMsg);
}
Incoming Tagger - Renaming
javascript:
/* https://forum.tribalwars.net/index.php?threads/286723/ */
$('input:checkbox').each(function() {
this.checked = !this.checked;
});
var Append_Text = "Tagged: " + document.getElementById("serverDate").innerHTML.substring(0, 5) + " , " + document.getElementById("serverTime").innerHTML;
var format = '%unit% * %coords% * %player% -Sent: %sent%';
$('input[name=label_format]').val(format).parents('form').find('input[name=label]').click();
Keypress optimized
javascript:
/* https://forum.tribalwars.net/index.php?threads/286722/ */
var url = document.URL;
if (url.indexOf('screen=am_farm') == -1 || keyPressRunning) {
var url = window.location.search.replace("?", "")
var linkParts = url.split("&");
var sitterPart = $.grep(linkParts, (obj) => obj.indexOf("t=") != -1)
var villagePart = $.grep(linkParts, (obj) => obj.indexOf("village=") != -1)
var newURL = window.location.pathname + "?" + sitterPart.concat(villagePart, ["screen=am_farm"]).join("&");
window.open(newURL, "_self")
throw ("going to LA");
}
var keyPressRunning;
$.getScript('https://gistcdn.githack.com/filipemiguel97/cc262814e19c35edb262a485f5bd2e3d/raw/keypress_faster.js');
Incoming watchtower script
javascript:
/* https://forum.tribalwars.net/index.php?threads/286717/ */
$.getScript('https://dl.dropboxusercontent.com/s/w9gtfwq4d1obngj/watchtower.js');
Incoming Tagger Old - Adds send time and other options
javascript:
/* https://forum.tribalwars.net/index.php?threads/286716/ */
$.getScript('https://media.innogamescdn.com/com_DS_UK/Scripts/labelAttacks.js');
Linoko's Timing Assist.
javascript:
/* https://forum.tribalwars.net/index.php?threads/286715/ */
$.ajaxSetup({
dataType: 'script'
});
$.getScript('https://www.minecraft.as/tw_scripts/timing_assist_2.js');
void(0);
Mass-Snipe Script
javascript:
/* https://forum.tribalwars.net/index.php?threads/286711/ */
$.getScript('https://dl.dropboxusercontent.com/s/3edjw9gv5b06uo9/mass_sniper.js');
Mass Attack Planner
javascript:
/* https://forum.tribalwars.net/index.php?threads/286700/ */
$.getScript('https://dl.dropboxusercontent.com/s/sfvc3gt5t7fsyx2/InitMassAttackPlanner.js');
Coord Extractor
javascript:
/* https://forum.tribalwars.net/index.php?threads/286699/ */
function findCoords() {
let text = $('#coordsInput');
let coords = text.val().match(/\d{3}\|\d{3}/g);
coords == null ? text.val('No coords found') : text.val(coords.join(' '));
text.select();
}
(() => {
let ui = `<div><textarea id="coordsInput" rows="6" cols="55">Paste text with coords here</textarea><br><button onclick="findCoords()">Find Coords</button></div>`;
$('#header_info').after(ui);
})();
Tsalkapone's Calculator Compilation
javascript:
/* https://forum.tribalwars.net/index.php?threads/286696/ */
$.getScript('https://dl.dropboxusercontent.com/s/y32vs0i6392wfoc/Tsalkapone.Snipe_script.js');
Support Counter
javascript:
/* https://forum.tribalwars.net/index.php?threads/286689/ */
$.getScript('https://dl.dropboxusercontent.com/s/lhsaa538edi5xaz/support-counter.js');
Fill Max Coins in Academy
javascript:
/* https://forum.tribalwars.net/index.php?threads/286683/ */
var coins = document.getElementById("coin_mint_fill_max").text;
coins = coins.substring(1, coins.length - 1);
var button = document.getElementsByClassName("btn btn-default");
document.getElementsByName('count')[0].value = coins;
$(button).focus();
Group-specific LA enhancer script
javascript:
/* https://forum.tribalwars.net/index.php?threads/286680/ */
var myGroup = 0;
var win = (window.frames.length > 0) ? window.main : window;
if (game_data.screen == "am_farm") {
$.getScript('https://scripts.ibragonza.nl/enhancer/enhancer.js');
}
else {
self.location = win.game_data.link_base_pure.replace(/screen\=\w*/i, "screen=am_farm&group=" + myGroup);
}
Group-specific mass scavenging script
javascript:
/* https://forum.tribalwars.net/index.php?threads/286679/ */
var myGroup = 0;
var win = (window.frames.length > 0) ? window.main : window;
if (game_data.mode == "scavenge_mass") {
var premiumBtnEnabled = false;
$.getScript('https://shinko-to-kuma.com/scripts/massScavenge.js');
} else {
self.location = win.game_data.link_base_pure.replace(/screen\=\w*/i, "screen=place&mode=scavenge_mass&group=" + myGroup);
}
Groups looper script
javascript:
/* https://forum.tribalwars.net/index.php?threads/286678/ */
var event = new Event('change');
var openGroups = document.getElementById('open_groups');
if (openGroups.style.display !== 'none') {
openGroups.click();
} else {
var groupsDropdown = document.getElementById('group_id');
groupsDropdown.selectedIndex += 1;
if (!groupsDropdown.value) {
groupsDropdown.selectedIndex += 1;
}
groupsDropdown.dispatchEvent(event);
}
Single Village Planner
javascript:
/* https://forum.tribalwars.net/index.php?threads/286667/ */
$.getScript('https://twscripts.dev/scripts/singleVillagePlanner.js');
Optimal single village scavenging
javascript:
/* https://forum.tribalwars.net/index.php?threads/286620/ */
$.getScript('https://gistcdn.githack.com/filipemiguel97/ba2591b1ae081c1cfdbfc2323145e331/raw/scavenging_legal.js');
Mass Scavenging Options Unlock
javascript:
/* https://forum.tribalwars.net/index.php?threads/286619/ */
$.getScript('https://twscripts.dev/scripts/massUnlockScav.js');
Own Home Troops Count
javascript:
/* https://forum.tribalwars.net/index.php?threads/286618/ */
$.getScript('https://twscripts.dev/scripts/countHomeTroops.js');
Packets Sent Counter
javascript:
/* https://forum.tribalwars.net/index.php?threads/286499/ */
var tribePacketSize = 400;
var HCSize = 6;
$.getScript('https://dl.dropboxusercontent.com/s/yycgr37t1ckxq8s/PacksSentForum.js');
Hide barbarians in LA
javascript:
/* https://forum.tribalwars.net/index.php?threads/286468/ */
$.getScript('https://gistcdn.githack.com/filipemiguel97/3361348fa4d3090bcdbff542fd92d43b/raw/hide_barbs_in_LA.js');
Incomings Overview
javascript:
/* https://forum.tribalwars.net/index.php?threads/286459/ */
var NOBLE_GAP = 100;
var FORMAT = '%unit% | %sent%';
$.getScript('https://twscripts.dev/scripts/incomingsOverview.js');
2020
Incoming attacks and support counter
javascript:
/* https://forum.tribalwars.net/index.php?threads/286255/ */
$.getScript('https://dl.dropboxusercontent.com/s/2y0sxgk8c29dr9e/incomingTroopsVillageInfo.js');
Sequential Template Sender
javascript:
/* https://forum.tribalwars.net/index.php?threads/286140/ */
var templateName = "YourTemplateName";
coords = '999|998 999|999';
var doc = document;
if (window.frames.length > 0 && window.main != null) doc = window.main.document;
url = doc.URL;
if (url.indexOf('screen=place') == -1) alert('Use the script in the rally point page!');
coords = coords.split(' ');
index = 0;
tura_template_cookie = document.cookie.match('(^|;) ?tura_template_cookie=([^;]*)(;|$)');
if (tura_template_cookie != null) index = parseInt(tura_template_cookie[2]);
if (index >= coords.length) alert('All villages were extracted, now start from the first!');
if (index >= coords.length) index = 0;
coords = coords[index];
coords = coords.split('|');
index = index + 1;
var today = new Date();
var expire = new Date();
expire.setTime(today.getTime() + 3600000 * 24 * 7);
document.cookie = 'tura_template_cookie=' + index + ';expires=' +
expire.toGMTString();
doc.forms[0].x.value = coords[0];
doc.forms[0].y.value = coords[1];
$('#place_target').find('input').val(coords[0] + '|' + coords[1]);
var allTemplates = TroopTemplates.current;
for (templateId in allTemplates) {
console.log(templateId);
var template = allTemplates[templateId];
if (template.name == templateName) {
TroopTemplates.useTemplate(templateId)
}
}
Attack Label With Coords
javascript:
/* https://forum.tribalwars.net/index.php?threads/286098/ */
var labels = {
" FAKE on ": {
"max-unit": 150,
"min-catapult": 1,
"max-ram": 0
},
" FAKE on ": {
"max-unit": 150,
"min-ram": 1
},
" SCOUT on ": {
"min-scout": 5
},
" NUKE on / ": {
"min-axe": 1000,
"max-catapult": 0
},
" NUKE FANG on / ": {
"min-axe": 1000,
"min-catapult": 50
},
" NOBLE on ": {
"min-snob": 1,
"max-axe": 0,
"max-catapult": 0
},
" NUKE NOBLE on / ": {
"min-snob": 1,
"min-axe": 1000,
"max-catapult": 0
},
" NUKE FANG NOBLE on / ": {
"min-snob": 1,
"min-axe": 1000,
"min-catapult": 50
},
" FANG on ": {
"min-catapult": 50,
"max-axe": 1000
},
" FARM": {
"min-spy": 1,
"min-light": 10,
"max-axe": 0
}
};
$.each(labels, function(name, criteria) {
$.each(criteria, function(type, amount) {
if (!type.match("min") && !type.match("max")) {
alert("label error at: (" + type + ": " + amount + ")");
void(0);
}
});
});
var url = document.URL;
var destination = "&screen=overview_villages&mode=commands";
var iMode = url.indexOf(destination);
if (iMode == -1) {
var keyUrl = url.indexOf("village=") + 8;
var valUrl = parseInt(url.substr(keyUrl)).toString().length;
var baseUrl = url.substr(0, keyUrl + valUrl);
document.location.href = baseUrl + destination;
} else {
var label = null;
var name = "";
var AssessTroop = {
available: {
"spear": false,
"sword": false,
"axe": false,
"archer": false,
"spy": false,
"light": false,
"marcher": false,
"heavy": false,
"ram": false,
"catapult": false,
"knight": false,
"snob": false
},
availableAmount: {
"spear": 0,
"sword": 0,
"axe": 0,
"archer": 0,
"spy": 0,
"light": 0,
"marcher": 0,
"heavy": 0,
"ram": 0,
"catapult": 0,
"knight": 0,
"snob": 0
},
unitIndex: [
"spear",
"sword",
"axe",
"archer",
"spy",
"light",
"marcher",
"heavy",
"ram",
"catapult",
"knight",
"snob"
],
popAmount: {
"spear": 1,
"sword": 1,
"axe": 1,
"archer": 1,
"spy": 2,
"light": 4,
"marcher": 5,
"heavy": 6,
"ram": 5,
"catapult": 8,
"knight": 10,
"snob": 100
},
label: "",
labels: labels,
assessAvailibility: function(types) {
$.each(types, function(i, type) {
AssessTroop.available[type.src.match(/unit_(.*).png/)[1]] = true;
});
$.each(AssessTroop.available, function(key, value) {
if (!value) {
AssessTroop.unitIndex.splice(AssessTroop.unitIndex.indexOf(key), 1);
delete AssessTroop.availableAmount[key];
}
});
},
assessTroop: function(troops) {
AssessTroop.storeTroopAmount(troops);
AssessTroop.matchTroopAmountWithLabels();
if (AssessTroop.label.match("NUKE")) {
AssessTroop.assessNukePower();
}
AssessTroop.insertTroopAmount();
return AssessTroop.label;
},
assessNukePower: function() {
AssessTroop.label = AssessTroop.label.concat(" " + Math.min((AssessTroop.totalPop() * 100 / 20500).toFixed(2), 100).toString() + "%");
},
insertTroopAmount: function() {
AssessTroop.label = AssessTroop.label.concat(" (");
$.each(AssessTroop.availableAmount, function(unit, amount) {
if (amount > 0) {
AssessTroop.label = AssessTroop.label.concat(" " + unit);
AssessTroop.label = AssessTroop.label.concat(":" + amount);
}
});
AssessTroop.label = AssessTroop.label.concat(" )");
},
storeTroopAmount: function(troops) {
$.each(troops, function(i, troop) {
AssessTroop.availableAmount[AssessTroop.unitIndex[i]] = parseInt(troop.innerHTML);
});
},
matchTroopAmountWithLabels: function() {
$.each(labels, function(name, criteria) {
if (AssessTroop.troopMatch(criteria)) {
AssessTroop.label = AssessTroop.label.concat(name);
}
});
},
troopMatch: function(criteria) {
var flag = true;
$.each(criteria, function(type, amount) {
if (type.match("min")) {
if (!AssessTroop.checkForMin(type, amount)) {
flag = false;
}
} else {
if (!AssessTroop.checkForMax(type, amount)) {
flag = false;
}
}
});
return flag;
},
checkForMin: function(type, amount) {
type = type.match(/-(.*)/)[1];
switch (type) {
case "unit":
return AssessTroop.totalUnit() >= amount;
case "pop":
return AssessTroop.totalPop() >= amount;
default:
return AssessTroop.availableAmount[type] >= amount;
}
},
checkForMax: function(type, amount) {
type = type.match(/-(.*)/)[1];
switch (type) {
case "unit":
return AssessTroop.totalUnit() <= amount;
case "pop":
return AssessTroop.totalPop() <= amount;
default:
return AssessTroop.availableAmount[type] <= amount;
}
},
totalPop: function() {
var total = 0;
$.each(AssessTroop.availableAmount, function(key, value) {
total += value * AssessTroop.popAmount[key];
});
return total;
},
totalUnit: function() {
var total = 0;
$.each(AssessTroop.availableAmount, function(key, value) {
total += value;
});
return total;
},
resetLabel: function() {
AssessTroop.label = "";
}
};
AssessTroop.assessAvailibility($("#commands_table img[alt][title]"));
function insert(str, index, value) {
return str.substr(0, index) + value + str.substr(index);
}
$.each($("#commands_table .nowrap"), function(i, command) {
label = command.querySelector(".quickedit-label");
if (label.innerHTML.match("Attack on")) {
name = AssessTroop.assessTroop(command.querySelectorAll(".unit-item"));
var attackTypeIndex = name.search("on");
console.log(attackTypeIndex);
if (attackTypeIndex > 0) {
attackTypeIndex = attackTypeIndex + 3;
var regExp = /\(([^)]+)\)/;
var coords = regExp.exec(label.innerHTML);
nameWithCoords = insert(name, attackTypeIndex, coords[1]);
label.innerHTML = " " + nameWithCoords;
} else {
label.innerHTML = " " + name;
}
command.querySelector(".rename-icon").click();
command.querySelector(".btn").click();
AssessTroop.resetLabel();
}
});
};
void(0);
Set/Get Village Note
javascript:
/* https://forum.tribalwars.net/index.php?threads/286051/ */
$.getScript('https://twscripts.dev/scripts/setVillageNotes.js');
Mass Command Timer
javascript:
/* https://forum.tribalwars.net/index.php?threads/286017/ */
$.getScript('https://twscripts.dev/scripts/massCommandTimer.js');
Tribe Stats Tools
javascript:
/* https://forum.tribalwars.net/index.php?threads/285950/ */
$.getScript('https://twscripts.dev/scripts/tribeStatsTool.js');
Map Barbs Only
javascript:
/* https://forum.tribalwars.net/index.php?threads/285715/ */
$.getScript('https://twscripts.dev/scripts/mapBarbsOnly.js');
Count Incoming PP
javascript:
/* https://forum.tribalwars.net/index.php?threads/285687/ */
$.getScript('https://twscripts.dev/scripts/incommingPP.js');
Troops Template Manager
javascript:
/* https://forum.tribalwars.net/index.php?threads/285658/ */
$.getScript('https://twscripts.dev/scripts/troopTemplatesManager.js');
Loyalty Calculator
javascript:
/* https://forum.tribalwars.net/index.php?threads/285636/ */
$.getScript('https://twscripts.dev/scripts/loyaltyCalculator.js');
Extended Tribe Info
javascript:
/* https://forum.tribalwars.net/index.php?threads/285566/ */
$.getScript('https://twscripts.dev/scripts/extendedTribeInfo.js');
Map Coords Picker
javascript:
/* https://forum.tribalwars.net/index.php?threads/285565/ */
$.getScript('https://twscripts.dev/scripts/mapCoordPicker.js');
Draw watchtowers on map
javascript:
/* https://forum.tribalwars.net/index.php?threads/285499/ */
$.getScript('https://shinko-to-kuma.com/scripts/watchTower.js');
Smart fake
javascript:
/* https://forum.tribalwars.net/index.php?threads/285477/ */
$.getScript('https://dl.dropboxusercontent.com/s/uxn0uhfhwd5s2vd/smartFake.js');
Filter Reports
javascript:
/* https://forum.tribalwars.net/index.php?threads/285476/ */
$.getScript('https://twscripts.dev/scripts/reportsFilters.js');
Download tribe info
javascript:
/* https://forum.tribalwars.net/index.php?threads/285469/ */
$.getScript('https://dl.dropboxusercontent.com/s/0s2b0ur9cqpzic2/tribeInfo.js');
Command Launch Timer
javascript:
/* https://forum.tribalwars.net/index.php?threads/285377/ */
$.getScript('https://twscripts.dev/scripts/obfsucated/commandTimer.min.js');
Extended Player Info
javascript:
/* https://forum.tribalwars.net/index.php?threads/285361/ */
$.getScript('https://twscripts.dev/scripts/extendedPlayerInfo.js');
Report sorting script
javascript:
/* https://forum.tribalwars.net/index.php?threads/285345/ */
var categories = ["Scavenging", "Trading", "Scouts", "Achievements", "Forwarded", "Misc"];
$.getScript('https://shinko-to-kuma.com/scripts/ReportSorter.js')
Mass Attack Planner
javascript:
/* https://forum.tribalwars.net/index.php?threads/285331/ */
$.getScript('https://twscripts.dev/scripts/massAttackPlanner.js');
Graphs in Ranking pages
javascript:
/* https://forum.tribalwars.net/index.php?threads/285326/ */
$.getScript('https://twscripts.dev/scripts/rankingGraphs.js');
Mass scavenging Overview page
javascript:
/* https://forum.tribalwars.net/index.php?threads/285309/ */
$.getScript('https://shinko-to-kuma.com/scripts/scavengingOverview.js');
Barb Finder with Filtering
javascript:
/* https://forum.tribalwars.net/index.php?threads/285289/ */
$.getScript('https://twscripts.dev/scripts/barbsFinder.js');
Farming Efficiency Calculator
javascript:
/* https://forum.tribalwars.net/index.php?threads/285288/ */
$.getScript('https://twscripts.dev/scripts/farmingEfficiencyCalculator.js');
Nightbonus on tooltip script
javascript:
/* https://forum.tribalwars.net/index.php?threads/285287/ */
$.getScript('https://shinko-to-kuma.com/scripts/nightbonuspopup.js');
Troops Counter by dalesmckay (FIXED)
javascript:
/* https://forum.tribalwars.net/index.php?threads/285246/ */
$.getScript('https://twscripts.dev/scripts/troopsCounterFixed.js');
Player Farms Finder Script
javascript:
/* https://forum.tribalwars.net/index.php?threads/285245/ */
$.getScript('https://twscripts.dev/scripts/playerFarmsFinder.js');
Flag farm log script
javascript:
/* https://forum.tribalwars.net/index.php?threads/285241/ */
$.getScript('https://shinko-to-kuma.com/scripts/flagFarmLog.js');
Tribe/player daily record table extension
javascript:
/* https://forum.tribalwars.net/index.php?threads/285224/ */
$.getScript('https://shinko-to-kuma.com/scripts/tribeStats.js');
Graphic map overlay
javascript:
/* https://forum.tribalwars.net/index.php?threads/285205/ */
$.getScript('https://pastebin.com/raw/v48LM0th');
Another Troop Counter
javascript:
/* https://forum.tribalwars.net/index.php?threads/285172/ */
$.getScript('https://dl.dropboxusercontent.com/s/75jut7q397e03e5/troop_counter.js');
PP purchase history script
javascript:
/* https://forum.tribalwars.net/index.php?threads/285150/ */
$.getScript('https://shinko-to-kuma.com/scripts/log.js');
Mass timed fake calculator
javascript:
/* https://forum.tribalwars.net/index.php?threads/285124/ */
$.getScript('https://shinko-to-kuma.com/scripts/timedFake.js');
Watchtower Timer
javascript:
/* https://forum.tribalwars.net/index.php?threads/285084/ */
$.getScript('https://dl.dropboxusercontent.com/s/dukcaol8u27wxg2/watchtower_timer.js');
Mass noble decommisioning
javascript:
/* https://forum.tribalwars.net/index.php?threads/285062/ */
$.getScript('https://shinko-to-kuma.com/scripts/massDecommissionNobles.js');
Bonus barbarian village finder
javascript:
/* https://forum.tribalwars.net/index.php?threads/285061/ */
$.getScript('https://shinko-to-kuma.com/scripts/findBonus.js');
Watchtower range script
javascript:
/* https://forum.tribalwars.net/index.php?threads/285047/ */
$.getScript('https://dl.dropboxusercontent.com/s/volbekzc6i7fu6g/range%20torre%20obf.js');
Barb radius grabber
javascript:
/* https://forum.tribalwars.net/index.php?threads/285039/ */
$.getScript('https://shinko-to-kuma.com/scripts/map_filterTWSophie.js');
Shared commands troops info on mobiles
javascript:
/* https://forum.tribalwars.net/index.php?threads/285028/ */
if (window.location.href.indexOf('screen=info_command') < 0) {
UI.ErrorMessage("This only works on command info page");
} else {
var a = document.createElement('span');
a.setAttribute("id", "troop_counts");
$("#content_value").append(a);
var t = $('#quickedit-rename').attr('data-id');
Command.pending_details[t] = !0, TribalWars.get("info_command", {
ajax: "details",
id: t
}, function(n) {
Command.details_cache[t] = n, Command.pending_details[t] = !1, a.innerHTML = (Command.getDetailsHTML(Command.details_cache[t]))
});
};
Updated resource sender for minting!
javascript:
/* https://forum.tribalwars.net/index.php?threads/284838/ */
$.getScript('https://shinko-to-kuma.com/scripts/res-senderV2.js');
Warehouse balancer 2020
javascript:
/* https://forum.tribalwars.net/index.php?threads/284670/ */
$.getScript('https://shinko-to-kuma.com/scripts/WHBalancerShinkoToKuma.js');
MASS scavenging script!
javascript:
/* https://forum.tribalwars.net/index.php?threads/284612/ */
var premiumBtnEnabled = false;
$.getScript('https://shinko-to-kuma.com/scripts/massScavenge.js');
Backtime finder script
javascript:
/* https://forum.tribalwars.net/index.php?threads/284611/ */
var gap = 50;
var filterFakes = false;
$.getScript('https://shinko-to-kuma.com/scripts/backtimefinder.js');
Player farm script (ft. Tcamps) - Beta
javascript:
/* https://forum.tribalwars.net/index.php?threads/284546/ */
window.playerVillageCoords = 'ENTER COORDINATES HERE';
window.playerFarmSettings = [];
window.playerFarmSettings.allowedTroops = [
[{
name: 'light',
min: 5,
max: 75
}],
[{
name: 'spear',
min: 25,
max: 75
}, {
name: 'sword',
min: 25,
max: 25
}]
];
$.getScript('https://shinko-to-kuma.com/scripts/playerFarm.js');
Village Notes overview
javascript:
/* https://forum.tribalwars.net/index.php?threads/284531/ */
$.getScript('https://shinko-to-kuma.com/scripts/villageNotesFinder.js');
Beginner protection finder
javascript:
/* https://forum.tribalwars.net/index.php?threads/284515/ */
$.getScript('https://shinko-to-kuma.com/scripts/beginnerProtection.js');
2019
Barbarian coordinate grabber 🔒
javascript:
/* https://forum.tribalwars.net/index.php?threads/284411/ */
$.getScript('https://shinko-to-kuma.com/scripts/map_filterTWSophie.js');
Backline packet counter
javascript:
/* https://forum.tribalwars.net/index.php?threads/284410/ */
var populationPerHC = 4;
$.getScript('https://shinko-to-kuma.com/scripts/backlineCalc.js');
Another Scavenging Script
javascript:
/* https://forum.tribalwars.net/index.php?threads/283655/ */
(window.TwCheese && TwCheese.tryUseTool('ASS')) ||
$.ajax('https://cheesasaurus.github.io/twcheese/launch/ASS.js?' +
~~((new Date()) / 3e5), {
cache: 1
});
void 0;
Fake Script with interface
javascript:
/* https://forum.tribalwars.net/index.php?threads/283447/ */
var balanced = true;
var multiplier = 1;
$.getScript('https://shinko-to-kuma.com/scripts/fakeScript.js');
Overview of Hauls
javascript:
/* https://forum.tribalwars.net/index.php?threads/283099/ */
(window.TwCheese && TwCheese.tryUseTool('OverviewHauls')) ||
$.ajax('https://cheesasaurus.github.io/twcheese/launch/OverviewHauls.js?' +
~~((new Date()) / 3e5), {
cache: 1
});
void 0;
Report viewer 🔒
javascript:
/* https://forum.tribalwars.net/index.php?threads/283073/ */
$.getScript('https://dl.dropboxusercontent.com/s/oafi0nuh24gt4g9/reportViewer.js');
New TROOP COUNTER for post-patch changes 🔒
javascript:
/* https://forum.tribalwars.net/index.php?threads/282991/ */
$.getScript('https://dl.dropboxusercontent.com/s/yke8fxhzqs3zslf/TroopCounterUpdatedSophie.js');
Defensive overlay
javascript:
/* https://forum.tribalwars.net/index.php?threads/282986/ */
navn = "Your Player Name";
url = "https://gist.githack.com/stianteien/7c34a2fcd0d13191e37d0d899b59489a/raw/60ba694c0e4bff700c50f3c119d5844da3163981/forsvarsoversikt.js";
$.ajaxSetup({
dataType: "script"
});
$.getScript(url);
void 0;
Troop Report Generator
javascript:
/* https://forum.tribalwars.net/index.php?threads/282730/ */
$.getScript('https://pastebin.com/raw/ATBXWvxS');
Resource sender for flag boost donating 🔒
javascript:
/* https://forum.tribalwars.net/index.php?threads/282710/ */
$.getScript('https://dl.dropboxusercontent.com/s/oebxlb52hjatmag/res-sender.js');
Support filter/recall
javascript:
/* https://forum.tribalwars.net/index.php?threads/282647/ */
$.getScript('https://shinko-to-kuma.com/scripts/filter_support.js');
Scavenging script - Early release
javascript:
/* https://forum.tribalwars.net/index.php?threads/282525/ */
var premiumBtnEnabled = false;
$.getScript('https://shinko-to-kuma.com/scripts/scavengingFinal.js');
2018
Vault
/* https://forum.tribalwars.net/index.php?threads/282252/ */
List Village Renamer
javascript:
/* https://forum.tribalwars.net/index.php?threads/281726/ */
$.getScript('https://gistcdn.githack.com/filipemiguel97/f18273df49d2d9d28e788ef2488bac84/raw/rename_vill.js');
EZ-Snipe
javascript:
/* https://forum.tribalwars.net/index.php?threads/280975/ */
$.getScript('https://tylercamp.me/tw/ez-snipe.js');
Army Stats
javascript:
/* https://forum.tribalwars.net/index.php?threads/280876/ */
$.getScript('https://tylercamp.me/tw/open-in-ac.js');
Current Support Stats
javascript:
/* https://forum.tribalwars.net/index.php?threads/280875/ */
$.getScript('https://tylercamp.me/tw/support-stats.js');
Clear Barbarian Walls
javascript:
/* https://forum.tribalwars.net/index.php?threads/280874/ */
$.getScript('https://tylercamp.me/tw/clear-barb-walls.js');
Get Player Coords
javascript:
/* https://forum.tribalwars.net/index.php?threads/280873/ */
$.getScript('https://tylercamp.me/tw/get-coords.js');
Import/Export Village Builds
javascript:
/* https://forum.tribalwars.net/index.php?threads/280872/ */
$.getScript('https://tylercamp.me/tw/villa-build-export.js');
2014
NARR - Nineza's Awesome Report Renamer
javascript:
/* https://forum.tribalwars.net/index.php?threads/271478/ */
$.getScript('https://pastebin.com/raw/TcBzhfKF');
NAFS - Nineza's Awesome Farming (and Shaping) Script
javascript:
/* https://forum.tribalwars.net/index.php?threads/271280/ */
$.getScript('https://pastebin.com/raw/HKM89370');
Mass Incoming Tagger (customizable)
javascript:
/* https://forum.tribalwars.net/index.php?threads/270604/ */
$.getScript('https://media.innogamescdn.com/com_DS_UK/Scripts/mass_tag_launch.js');
FA KeyPress
javascript:
/* https://forum.tribalwars.net/index.php?threads/270283/ */
cookieName = "fakeypress";
$.getScript('https://dl.dropboxusercontent.com/s/py6l062un5jiy2z/fakeypress.js');
Coord grabber
javascript:
/* https://forum.tribalwars.net/index.php?threads/269895/ */
var author = "Stotty2009 but most of the code is from: dalesmckay@gmail.com";
var minVer = "7.2";
var win = (window.frames.length > 0) ? window.main : window;
var ver = win.game_data.version.match(/[\d|\.]+/g);
function getMode() {
mode = prompt("b for barb villages, p for player villages, or t for tribe villages", "p");
mode = mode.toLowerCase();
checkMode()
}
function checkMode() {
if (mode == 'p') {
playername = prompt("which player pl0x?", "Stotty2009") + ' '
} else if (mode == 't') {
tribename = prompt("which tribe pl0x?", "Crazy Muthas")
} else if (mode == 'b') {} else {
getMode()
}
}
getMode();
function trim(str) {
return str.replace(/^\s+|\s+$/g, "")
}
if (!ver || (parseFloat(ver[1]) < minVer)) {
alert("This script requires v" + minVer + " or higher.\nYou are running: v" + ver[1])
} else {
if (win.game_data.screen == "map") {
var coords = [];
var col, row, coord, village, player, points;
for (row = 0; row < TWMap.size[1]; row++) {
for (col = 0; col < TWMap.size[0]; col++) {
coord = TWMap.map.coordByPixel(TWMap.map.pos[0] + (TWMap.tileSize[0] * col), TWMap.map.pos[1] + (TWMap.tileSize[1] * row));
if (coord) {
village = TWMap.villages[coord.join("")];
if (village) {
player = null;
if (parseInt(village.owner || "0", 10)) {
player = TWMap.players[village.owner];
var ally = TWMap.allies[player.ally]
}
if (player) {
if (mode == "p") {
if (trim(player.name) == trim(playername)) {
coords.push(coord.join("|"))
}
} else if (mode == "t") {
if (ally) {
if (trim(ally.name) == trim(tribename)) {
coords.push(coord.join("|"))
}
}
}
} else {
if (mode == "b") {
coords.push(coord.join("|"))
}
}
}
}
}
}
alert(coords.join(" "))
} else {
alert("Run this script from the Map.\nRedirecting now...");
self.location = win.game_data.link_base_pure.replace(/screen\=/i, "screen=map")
}
}
void(o);
2013
LA Enhancer (ntoombs19's FA Filter)
javascript:
/* https://forum.tribalwars.net/index.php?threads/266604/ */
$.getScript('https://scripts.ibragonza.nl/enhancer/enhancer.js');
2012
Battle Report Enhancer
javascript:
/* https://forum.tribalwars.net/index.php?threads/256225/ */
(window.TwCheese && TwCheese.tryUseTool('BRE')) ||
$.ajax('https://cheesasaurus.github.io/twcheese/launch/BRE.js?' +
~~((new Date()) / 3e5), {
cache: 1
});
void 0;
2011
Player Profile Custom Coordinate Selector (TakSelector)
javascript:
/* https://forum.tribalwars.net/index.php?threads/231290/ */
$.getScript('http://taktimer.net/scripts/ppSelectCoords.js');
Display last village growth on map
javascript:
/* https://forum.tribalwars.net/index.php?threads/230275/ */
if (game_data.screen != 'map') {
document.location.replace('?screen=map');
void(0);
}
function getDoc() {
return document;
}
$(document).ajaxStop(function() {
TWMap.map.reload();
});
coords = [];
for (row = 0; row < TWMap.size[1]; row++) {
for (col = 0; col < TWMap.size[0]; col++) {
coord = TWMap.map.coordByPixel(TWMap.map.pos[0] + (TWMap.tileSize[0] * col), TWMap.map.pos[1] + (TWMap.tileSize[1] * row));
if (TWMap.villages[coord.join("")]) {
coords.push(coord[0] + '|' + coord[1]);
}
}
}
url = 'http://www.twstats.com/scriptdispatch.php?script=mapmod&m=' + game_data.market + '&s=' + game_data.world + '&v=' + game_data.version + '&coords=' + coords.join(',');
scr = $('<script type="text/javascript" />').attr('src', url);
$(document).append(scr);
void(0);
2010
Submenu's from quickbar
javascript:
/* https://forum.tribalwars.net/index.php?threads/224820/ */
ALT_TEXT = "(Alt Text) External Forum Toolbox (End Alt Text)";
identifier = "External Forum Toolbox";
default_x = '100';
default_y = '150';
c_name = "test";
var rememberPositionedInCookie = true;
var rememberPosition_cookieName = 'float_menu_' + c_name;
tt = 'http://taktimer.net/scripts/';
abilities = ["javascript: customBBcode(document.getElementsByTagName('textarea')[0],'spoil][code','/code][/spoil'); void(0);", "javascript: w_o('http://forum.tribalwars.net/forumdisplay.php?f=61'); void(0);", "javascript: w_o('http://forum.tribalwars.net/forumdisplay.php?f=6'); void(0);", "javascript: w_o('http://forum.beta.tribalwars.net/forumdisplay.php?f=5'); void(0);", "javascript: run_script(tt + 'script_mod_remove_deleted_posts.js'); void(0);"];
titles = ["BBCode (spoil-code)", "Scripts forum", "Suggestions forum", "Beta 'Ideas' forum", "Remove deleted posts"];
doc = document;
function main_script() {
function set_obj_funcs() {
insert_this =
"<div id='main_float' style='float:left; position: relative;' onclick=\"javascript:doc.getElementById('main_float').style.position='fixed'; void(0);\" class='dragableElement'><table id='float_menu_" + identifier + "' class='main' style=\"border:1px; background-color: #b2816a\"><tr><th style=\"width:100%; cursor: move;background-color: #651612; color: #FFFFFF; background-image: url('http://forum.tribalwars.net/tribalwars_v2/other/dark_pattern.gif');\">" +
identifier + "</th></tr>";
col_1 = '#d6c095';
col_2 = '#e5d0a8';
col_count = 1;
for (i = 0; i < abilities.length; i++) {
if (col_count == 1) {
color = col_1;
col_count = 2;
} else if (col_count == 2) {
color = col_2;
col_count = 1;
}
insert_this += "<tr style='background-color: " + color + ";'><td><a href=\"" + abilities[i] + "\">" + titles[i] +
"</a></td></tr>";
}
insert_this += "</table></div>";
doc.body.innerHTML += insert_this;
}
function show_box(label) {
if (doc.getElementById(label).style.display == "none") {
doc.getElementById(label).style.display = "inline-table";
} else {
doc.getElementById(label).style.display = "none";
}
}
if (doc.getElementById("float_menu_" + identifier)) {
show_box("float_menu_" + identifier);
} else {
set_obj_funcs();
}
}
function run_script(address) {
a = doc;
var b = a.createElement('script');
b.type = 'text/javascript';
b.src = address;
a.getElementsByTagName('head')[0].appendChild(b);
}
run_script(tt + "dragbox/dragable-content.js");
function w_o(address) {
window.open(address);
}
function customBBcode(fws, tag1, tag2) {
selectedText = '';
startPos = fws.selectionStart;
endPos = fws.selectionEnd;
selectedText = fws.value.substring(startPos, endPos);
fullMsg = fws.value.split("");
fullMsg.splice(startPos, 0, "[" + tag1 + "]");
fullMsg.splice(endPos + 1, 0, "[" + tag2 + "]");
fullMsg = fullMsg.join("");
fws.value = fullMsg;
}
main_script();
void(0);
Stat graphs on member lists
javascript:
/* https://forum.tribalwars.net/index.php?threads/224363/ */
name_var = 'Nome';
show_points = true;
show_villages = true;
show_ODA = true;
show_ODD = true;
dimensions = [180, 96];
plus_one = 1;
type = "player";
if (typeof(main) != 'undefined') {
$ = main.$;
game_data = main.game_data;
}
if (game_data.market != "en") {
twstats = "http://" + game_data.market + ".twstats.com/";
} else {
twstats = "http://twstats.com/";
}
if (document.getElementById("ally_content") != null) {
table = document.getElementById("ally_content").getElementsByTagName("table")[0];
plus_one = 0;
} else if (document.getElementById("player_ranking_table")) {
table = document.getElementById("player_ranking_table");
} else if (document.getElementById("ally_ranking_table")) {
table = document.getElementById("ally_ranking_table");
type = "tribe";
} else if (document.getElementById("con_ally_ranking_table")) {
table = document.getElementById("con_ally_ranking_table");
type = "tribe";
} else if (document.getElementById("con_player_ranking_table")) {
table = document.getElementById("con_player_ranking_table");
} else if (document.getElementById("kill_player_ranking_table")) {
table = document.getElementById("kill_player_ranking_table").parentNode.getElementsByTagName("table")[1];
} else if (document.getElementById("kill_ally_ranking_table")) {
table = document.getElementById("kill_ally_ranking_table").parentNode.getElementsByTagName("table")[1];
type = "tribe";
} else {
table = $("table:contains('" + name_var + "')")[$("table:contains('" + name_var + "')").length - 1];
plus_one = 1;
}
rows = table.getElementsByTagName("tr");
if (show_points == true) {
rows[0].innerHTML += "<th><center><b><u>Points</u></b></center></th>";
}
if (show_villages == true) {
rows[0].innerHTML += "</b></center></th><th><center><b><u>Villages</u></b></center></th>";
}
if (show_ODA == true) {
rows[0].innerHTML += "<th><center><b><u>ODA</u></b></center></th>";
}
if (show_ODD == true) {
rows[0].innerHTML += "<th><center><b><u>ODD</u></b></center></th>";
}
for (i = 1; i < rows.length - 1 + plus_one; i++) {
pid = rows[i].getElementsByTagName("a")[0].toString().match(/id=\d+/).toString().split("=")[1];
if (show_points == true) {
rows[i].innerHTML += "<td><img src='" + twstats + game_data.world + "/image.php?type=" + type +
"graph&graph=points&id=" + pid + "' style='width:" + dimensions[0] + "px; height:" + dimensions[1] + "px'></img></td>";
}
if (show_villages == true) {
rows[i].innerHTML += "<td><img src='" + twstats + game_data.world + "/image.php?type=" + type + "graph&graph=villages&id=" +
pid + "' style='width:" + dimensions[0] + "px; height:" + dimensions[1] + "px'></img></td>";
}
if (show_ODA == true) {
rows[i].innerHTML += "<td><img src='" + twstats + game_data.world + "/image.php?type=" + type + "graph&graph=oda&id=" + pid + "' style='width:" + dimensions[0] +
"px; height:" + dimensions[1] + "px'></img></td>";
}
if (show_ODD == true) {
rows[i].innerHTML += "<td><img src='" + twstats + game_data.world + "/image.php?type=" + type +
"graph&graph=odd&id=" + pid + "' style='width:" + dimensions[0] + "px; height:" + dimensions[1] +
"px'></img></td>";
}
}
void(0);
List all users who have posted
javascript:
/* https://forum.tribalwars.net/index.php?threads/224362/ */
function getElementsByClass(searchClass, node, tag) {
var classElements = new Array();
if (node == null) node = document;
if (tag == null) tag = '*';
var els = node.getElementsByTagName(tag);
var elsLen = els.length;
var pattern = new RegExp('(^|\\s)' + searchClass + '(\\s|$)');
for (i = 0, j = 0; i < elsLen; i++) {
if (pattern.test(els[i].className)) {
classElements[j] = els[i];
j++;
}
}
return classElements;
}
var doc = (window.frames.length > 1) ? window.main.document : document;
if (doc.getElementsByTagName("iframe").length > 0) {
var iframes = doc.getElementsByTagName("iframe")[0];
var frame = (iframes.src.match(/forum.php/)) ? iframes.contentWindow.document : doc;
work = frame;
} else {
work = doc;
}
listArray = getElementsByClass("igmline small", work);
posters = [];
for (i = 0; i < listArray.length - 1; i++) {
posters[i] = listArray[i].getElementsByTagName("a")[0].firstChild.nodeValue;
}
alert(posters);
void(0);
Hide forum posts
javascript:
/* https://forum.tribalwars.net/index.php?threads/224361/ */
function getElementsByClass(searchClass, node, tag) {
var classElements = new Array();
if (node == null) node = document;
if (tag == null) tag = '*';
var els = node.getElementsByTagName(tag);
var elsLen = els.length;
var pattern = new RegExp('(^|\\s)' + searchClass + '(\\s|$)');
for (i = 0, j = 0; i < elsLen; i++) {
if (pattern.test(els[i].className)) {
classElements[j] = els[i];
j++;
}
}
return classElements;
}
var doc = (window.frames.length > 1) ? window.main.document : document;
if (doc.getElementsByTagName("iframe").length > 0) {
var iframes = doc.getElementsByTagName("iframe")[0];
var frame = (iframes.src.match(/forum.php/)) ? iframes.contentWindow.document : doc;
work = frame;
} else {
work = doc;
}
divs = getElementsByClass("igmline small", work);
posters = [];
for (i = 0; i < divs.length; i++) {
posters[i] = divs[i].getElementsByTagName("a")[0].firstChild.nodeValue;
divs[i].getElementsByTagName("span")[0].innerHTML += ' <a href="javascript: ' + getElementsByClass + ' divs = getElementsByClass(\'igmline small\'); hideVar_' + i + ' = divs[' + i + '].parentNode.getElementsByTagName(\'div\')[1]; if(hideVar_' + i + '.style.display == \'inherit\'){hideVar_' + i + '.style.display = \'none\';} else {hideVar_' + i + '.style.display = \'inherit\';} void(0);"> Show / Hide this post</a>';
divs[i].getElementsByTagName("span")[0].innerHTML += ' ';
divs[i].getElementsByTagName("span")[0].innerHTML += '<a href="javascript: ' + getElementsByClass + ' divs = getElementsByClass(\'igmline small\'); butt_pirate = \'' + posters[i] + '\'; for(i=0; i < divs.length; i++){if(\'' + posters[i] + '\' == butt_pirate){hideVar = divs[i].parentNode.getElementsByTagName(\'div\')[1]; if(hideVar.style.display == \'inherit\'){hideVar.style.display = \'none\';} else {hideVar.style.display = \'inherit\';}}} void(0);">Show / Hide All posts by ' + posters[i] + '</a>';
}
void(0);
2009
Resource Balancer Script
javascript:
/* https://forum.tribalwars.net/index.php?threads/172320/ */
$.getScript('https://www.extremetw.com/MarketBalancerScript.js');