Question Uberfarm script?

DeletedUser

Guest
I think the fields value probably specifies the maximum distance to travel if your going out to far try reducing it
 

DeletedUser105933

Guest
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
 

File Not Found

Guest
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


You could use this little snippet I literally wrote just now.

(Use this one to set your farms)
Code:
javascript:
tempFarmHolder = prompt("Please enter your new list of farms to be stored locally", localStorage.localFarmData);
if((tempFarmHolder != "undefined") && (tempFarmHolder != ""))
   {localStorage.localFarmData = tempFarmHolder;
   }

Replace the reference to the coords in uberfarm with this.. or maybe its safer if I do it.
Code:
  farms : localStorage.localFarmData;



So...


Code:
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);

Code:
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);

They should work, but I've not tested anything.
 
Last edited:

DeletedUser105933

Guest
I tested it out, unfortunately its doesn work :( nice try tho...

it didnt quite to the job as i wanted it to, as the farm storge script only brings up a pop up and you can easily search for a co-ordinat e in the pop up box to delete or change it.
 

File Not Found

Guest
Worked just fine for me, I will look into it again later.
 

DeletedUser

Guest
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.
 

DeletedUser105933

Guest
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.

thanks for the info zeta,

thats a real shame, i found it worked much better for me than the script used for uber in this forum. but still, its still working. are you having problems with the other uber scripts here too? i usually just edit the coords in the note book, just a bit less convenient
 

DeletedUser

Guest
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?! o_O
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;


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 ?
 

DeletedUser

Guest
I don't play archer worlds so i never had a fix for it.
I'm sure some one will have an archer one archived...

as for FnF's farm storage script, my version (the original with its various corrections) of uber should work with it if the farm were stored by the name uber calls them in the actual script - the dropbox one.
[spoil]
Code:
        }
        if (localStorage['uberfarmFarms']) config.farms = localStorage['uberfarmFarms'];
[/spoil]

making fnf's storage script;
Storage Scrip
[spoil]
Code:
javascript:tempFarmHolder = prompt("Please enter your new list of farms to be stored locally", localStorage.uberfarmFarms);if((tempFarmHolder != "undefined") && (tempFarmHolder != ""))   {localStorage.uberfarmFarms = tempFarmHolder;   }
[/spoil]
its all much of a muchness really.
I assume stotty's fixes would work too as they use that same call line as the orginal dropbox

Working uber for non-archer worlds
[spoil]
Code:
javascript: var config = {    fields: 1000,    minHaul: 15000,    targetHaul: 35000,    scout: true,    hours: 12,    farms: ''    };    $.getScript('http://db.tt/GX4ggcP');     void (0);
[/spoil]
 
Last edited by a moderator:

DeletedUser105933

Guest
Anyone able to edit this so it only sends cavalry troops?

Code:
(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);    }})();

hey matt, heres the code with it edited to only send LC. you need to save this code as a .js file and host it form your own dropbox... then replace the url in the script with the url to your own hosted script.

ive edited it for 2 things, to only send lc, and will also now send out lc even if you have less than 10 lc in the rally point. useful for micro farming.

the only snag with editing out the lc and wasnt sure how to fix is if troops other than lc are home, it will not close tabs as rally points empty of lc, cos the script still interprets troops being home.

if you want to change the scout value, just change the spy volume near the bottom of the script


in relation to the storage script, i havnt tried it out yet but having the popup box wasnt really what i was asking for, the old storage script would bring up a notebook like window you could see the entire farm list and edit easily. i would love a script like this again for uber, its a pain in the ass to keep editing it in notebook and copy and pasting into my bookmarks.

the old uber script also use to work better for me, i could zoom through the tabs quicker entering the script without it mixing up targets and sending duplicate famring runs. with this version i have to press my shorcuts maybe 1 or 2 a second for it to work without error. oh well, looks like that one wont come back unless anybody has a copy of the original hosted script from twpawnage
 

Subwind

Guest
After a week tinkering, I think I have fixed this to send only cavalry units, including a warning when not enough troops and moving onto the next village.

Code:
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);
 

DeletedUser

Guest
I got kinda confused...

Could someone please post here the WORKING versions of both scripts of the coord storage script and the uber script ?
 

DeletedUser

Guest
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

It is. Website infects you with a java drive by exploit, as soon as you accept the applet your computer will be infected with a keylogger or worse.
 

DeletedUser107290

Guest
Hello,

Regarding the version of uber that use to use a storage, i have found the old version of this script i use to use.

Storage:
[SPOIL]
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;
[/SPOIL]

Script:
[SPOIL]
Code:
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);
[/SPOIL]

However it does seem that the storage part of this script is no longer working, i would appreciate it if anybody could take a look at this & if possible fix it.
Thanks,

Drunk.
 

DeletedUser

Guest
Hey guys,

I can't get this script to work on W67:

Code:
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);

Had the non-archer version in w64 and that was fine :)
 

DeletedUser

Guest
There's two versions, one for archer and another for non-archer world
 
Top