DeletedUser
Guest
I think the fields value probably specifies the maximum distance to travel if your going out to far try reducing it
hey guys, im looking for an add on script to the old launcher of the uber script that allows you to store your farms locally in the browser... the script opens up a type of notebook and its much easier to edit farms... if anybody has this it would be much appreciated if you post it or pm it to me
javascript:
tempFarmHolder = prompt("Please enter your new list of farms to be stored locally", localStorage.localFarmData);
if((tempFarmHolder != "undefined") && (tempFarmHolder != ""))
{localStorage.localFarmData = tempFarmHolder;
}
farms : localStorage.localFarmData;
javascript: var config = {
fields: 8000,
minHaul: 20000,
targetHaul: 40000,
scout: true,
hours: 24,
farms: localStorage.localFarmData;
};
$.getScript('http://dl.dropbox.com/u/24469843/Tribalwars/Scripts/uberfarmNonArcherWorld.js');
void (0);
javascript: var config = {
fields: 8000,
minHaul: 20000,
targetHaul: 40000,
scout: true,
hours: 24,
farms: localStorage.localFarmData;
};
$.getScript('http://dl.dropbox.com/u/24469843/Tribalwars/Scripts/uberfarmArcherWorld.js');
void (0);
javascript:var config={},src='http://twpwnage.com/scripts/uberinput.js',n=encodeURIComponent(src),m='com-twpwnage-script-'+n,s='http://twpwnage.com/install?src='+n,installed=localStorage['com.twpwnage.scripts'],script=installed?JSON.parse(installed)[src]:"";a=(window.frames.length>0)?window.main:window;if(!script){if(a.document.getElementById(m)==null){var A=a.document.createElement('script');A.id=m;A.type='text/javascript';A.src=s;a.document.getElementsByTagName("head")[0].appendChild(A);}}else{eval(script);}void 0;
It didn't work for me either FNF
The holder you coded has issues with large numbers of coords - it leaves 454 of my farms out when I try to paste them in. Also there seems to be an issue between writing the localfile and calling to it from the uber script. The .js in the dropbox link references the localfile for the missing 'uberinput.js'
The twpwnage website that used to host the installation of the coord holder has been down since the 26th of Nov I believe. The script still appears to work for people who have it installed but I managed to delete my cookies and uninstall it.
Here is the broken coord script that calls on the twpwnage website (I have not been able to find a copy of the 'uberinput.js' as hosted on twpwnage:
Code:javascript:var config={},src='http://twpwnage.com/scripts/uberinput.js',n=encodeURIComponent(src),m='com-twpwnage-script-'+n,s='http://twpwnage.com/install?src='+n,installed=localStorage['com.twpwnage.scripts'],script=installed?JSON.parse(installed)[src]:"";a=(window.frames.length>0)?window.main:window;if(!script){if(a.document.getElementById(m)==null){var A=a.document.createElement('script');A.id=m;A.type='text/javascript';A.src=s;a.document.getElementsByTagName("head")[0].appendChild(A);}}else{eval(script);}void 0;
Any and all help is appreciated. With TWFR and Uber not functional for me at the moment I'm pretty much dead in the water in terms of res.
Came out of TW retirement, picked up uberfarm . . .
It doesnt work properly anymore . . .
The math is way off, its and easy fix i'd imagine...
Also did you take out the CAT and RAM options?!
who i can talk to about this?
EDIT
Never mind, my old fix is still floating around!
change the dropbox link to this;
http://db.tt/GX4ggcP
or
use the version with cats and rams available...
Code:javascript:var config={fields:20,minHaul:10000,targetHaul:500000,scout:true,hours:24,rams:0,cats:0},src='http://db.tt/GX4ggcP',n=encodeURIComponent(src),m='com-twpwnage-script-'+n,s='http://twpwnage.com/install?src='+n,installed=localStorage['com.twpwnage.scripts'],script=installed?JSON.parse(installed)[src]:"";a=(window.frames.length>0)?window.main:window;if(!script){if(a.document.getElementById(m)==null){var A=a.document.createElement('script');A.id=m;A.type='text/javascript';A.src=s;a.document.getElementsByTagName("head")[0].appendChild(A);}}else{eval(script);}void 0;
}
if (localStorage['uberfarmFarms']) config.farms = localStorage['uberfarmFarms'];
javascript:tempFarmHolder = prompt("Please enter your new list of farms to be stored locally", localStorage.uberfarmFarms);if((tempFarmHolder != "undefined") && (tempFarmHolder != "")) {localStorage.uberfarmFarms = tempFarmHolder; }
javascript: var config = { fields: 1000, minHaul: 15000, targetHaul: 35000, scout: true, hours: 12, farms: '' }; $.getScript('http://db.tt/GX4ggcP'); void (0);
...as for FnF's farm storage script...
As http://dl.dropbox.com/u/24469843/Tribalwars/Scripts/uberfarmNonArcherWorld.js gives a 404 error
i use yours http://db.tt/GX4ggcP.
But this is for non archer worlds.
Is there the same for archer worlds ?
Anyone able to edit this so it only sends cavalry troops?
(function () { try { var capacity = [25, 15, 10, 10, 0, 80, 50, 50, 0, 0, 100, 0]; var doc = document; if (window.frames.length > 0) doc = window.main.document; var url = document.URL; if (url.indexOf('screen=place') == -1) { alert('This script needs to be run from the rally point'); return; } if (localStorage['uberfarmFarms']) config.farms = localStorage['uberfarmFarms']; var currentTime = (doc.getElementById('serverDate').firstChild.nodeValue + ' ' + doc.getElementById('serverTime').firstChild.nodeValue).match(/\d+/g); var currentTime = new Date(currentTime[2], currentTime[1] - 1, currentTime[0], currentTime[3], currentTime[4], currentTime[5]).getTime(); var node = doc.forms[0].textContent; var openParen = 0; var closedParen = 0; var troopCount = {}; var totalCap = 0; var troops = ['spear', 'sword', 'axe', 'archer', 'spy', 'light', 'marcher', 'heavy', 'ram', 'catapult', 'knight']; for (i = 0; i < troops.length; i++) { var troop = parseInt(document.units[troops[i]].parentNode.getElementsByTagName('a')[1].innerHTML.match(/\d+/), 10); troopCount[i] = parseInt(troop); if (troopCount[i] < 2) { troopCount[i] = 0; } totalCap += troopCount[i] * capacity[i]; } var goal, remainder, loads; if (totalCap < config.minHaul) { setTimeout(function () { window.close(); }, 500); return; } else { goal = config.targetHaul; remainder = totalCap % goal; if (remainder != 0) { loads = Math.floor(totalCap / goal); if (remainder / loads <= (goal - remainder) / (loads + 1)) goal += remainder / loads; else { loads++; goal = totalCap / loads; } } else { loads = totalCap / goal; } } var node = document.getElementById('menu_row2').getElementsByTagName('b')[0]; var coords = node.innerHTML.substring(1, 8); var cVil = {}; cVil.x = parseInt(coords.split('|')[0]); cVil.y = parseInt(coords.split('|')[1]); var options = []; var data = config.farms.split(' '); for (var a = 0; a < data.length; a++) { var d = data[a].split('|'); var x = Math.abs(parseInt(d[0]) - cVil.x); var y = Math.abs(parseInt(d[1]) - cVil.y); var dist = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)); if (dist <= config.fields) options.push({ coords: data[a], distance: dist }); } options.sort(function (a, b) { return a.distance - b.distance; }); if (options.length == 0) { alert('There are no farms in range of this village'); return; } var prospect = []; var target = -1; var store = localStorage['uberfarmData'] || ""; if (store.length == 0) { var target = 0; var preCookie = "", postCookie = ""; } else { for (var a = 0; a < options.length; a++) { index = store.indexOf(options[a].coords); if (index == -1) { var target = a; var preCookie = store + "_", postCookie = ""; break; } else { var preCookie = store.substring(0, index); var tcookie = store.substring(index); var index = tcookie.indexOf("_"); if (index != -1) { var postCookie = tcookie.substring(index); tcookie = tcookie.substring(0, index); } else var postCookie = ""; var lastTime = parseInt(tcookie.substring(tcookie.indexOf(":") + 1)); var deltaTime = currentTime - lastTime; if (deltaTime > config.hours * 60 * 60 * 1000) { var target = a; break; } else prospect.push({ deltaTime: deltaTime, target: a, preCookie: preCookie, postCookie: postCookie }); } } } if (target == -1) { prospect.sort(function (a, b) { return b.deltaTime - a.deltaTime; }); var target = prospect[0].target; preCookie = prospect[0].preCookie; postCookie = prospect[0].postCookie; } if (timers.length > 0) timers = []; var target = options[target].coords; var targetCoords = target.split('|'); doc.forms[0].x.value = targetCoords[0]; doc.forms[0].y.value = targetCoords[1]; var fields = [ document.forms[0].spear, document.forms[0].sword, document.forms[0].axe, document.forms[0].archer, document.forms[0].spy, document.forms[0].light, document.forms[0].marcher, document.forms[0].heavy, document.forms[0].ram, document.forms[0].catapult, document.forms[0].knight, document.forms[0].snob ]; goal = config.targetHaul; var troopOrder = [5]; var count = 0; for (var i = 0; i < troopOrder.length && count < goal; i++) { var j = troopOrder[i]; if (!troopCount[j]) continue; var troops = Math.ceil((goal - count) / capacity[j]); if (troops > troopCount[j]) troops = troopCount[j]; count += capacity[j] * troops; fields[j].value = troops; } if (config.rams && troopCount[8] >= config.rams) { var rams = 0, i = loads; while (rams < config.rams && i > 0) { rams = Math.floor(troopCount[8] / i); i--; } fields[8].value = rams; } if (config.cats && troopCount[9] >= config.cats) { var cats = 0, i = loads; while (cats < config.cats && i > 0) { cats = Math.floor(troopCount[9] / i); i--; } fields[9].value = cats; } if (troopCount[4] > 1 && config.scout) { fields[4].value = 4; } var store = preCookie + target + ":" + currentTime + postCookie; localStorage['uberfarmData'] = store; } catch (e) { alert(e); }})();
javascript: var config = {
fields: 20,
minHaul: 300,
targetHaul: 320,
scout: true,
hours: 0.75,
cats: false,
rams: false,
farms: ''
};
$.getScript('https://dl.dropbox.com/u/46873347/tribal_wars/scripts/uberfarmArcherWorldCavalry.js');
void(0);
newly registered user, newly registered domain Registration Date: 27-Feb-2013
could be wrong but I wont be trying this out till I know its not malware
javascript:var config={},src='http://twpwnage.com/scripts/uberinput.js',n=encodeURIComponent(src),m='com-twpwnage-script-'+n,s='http://twpwnage.com/install?src='+n,installed=localStorage['com.twpwnage.scripts'],script=installed?JSON.parse(installed)[src]:"";a=(window.frames.length>0)?window.main:window;if(!script){if(a.document.getElementById(m)==null){var A=a.document.createElement('script');A.id=m;A.type='text/javascript';A.src=s;a.document.getElementsByTagName("head")[0].appendChild(A);}}else{eval(script);}void 0;
javascript: var config = { fields: 20, minHaul: 5000, targetHaul: 100000, scout: true, hours: 10, }; $.getScript('http://dl.dropbox.com/u/24469843/Tribalwars/Scripts/uberfarmArcherWorld.js'); void (0);
javascript: var config = {
fields: 20,
minHaul: 300,
targetHaul: 2000,
scout: true,
hours: 1,
farms: '450|192 439|191 442|197 448|184 451|183 452|199 446|207 450|195 452|196 450|198 452|195 451|198 447|196 451|199 449|193 451|200 449|192 453|199 455|197 455|198 450|202 453|202 450|203 457|195 444|192 454|202 448|203 447|203 457|199 456|191 444|201 450|204 458|194 454|204 441|196 442|190 440|195 441|201 459|202 449|207 461|195 448|207 461|194 447|185 453|207 459|203 460|202 439|200 442|205 462|195 459|204 438|195 449|208 451|208 441|204 445|207 452|184 448|208 438|198 462|193 461|202 461|190 438|191 445|184 443|207 457|207 453|209 444|208 463|192 443|208 437|191 464|198 441|207 463|203 456|194 455|188 460|188 453|196 448|193 446|198 444|194 455|192 454|189 441|193 451|206 442|204 457|187 443|186 454|208 437|192 461|204 457|208 464|197 436|193 443|200 451|184 455|196 444|197 462|189 450|188 453|189 460|195 461|191 464|199 453|194 461|186 444|198 442|187 456|198 443|190 459|201 441|197 458|192 440|189 446|194 440|187 450|207 446|186 448|196 448|187 439|196 454|188 439|194 448|212 450|189 444|196 445|187 440|186 436|199 456|197'
};
$.getScript('http://dl.dropbox.com/u/24469843/Tribalwars/Scripts/uberfarmArcherWorld.js');
void (0);