Farming script?

DeletedUser21094

Guest
Hey could some tell me if this script is ok... by ok, i mean legal? I just want to 100% sure.

javascript:var minlight=9999;var minlight=10;var minHC=0;var minScouts=0;coords='540|821 541|821 539|822 539|824 540|829 541|829 542|829 544|815 545|816 547|818 548|821 546|824 546|826 547|829 548|829 548|831 550|830 552|832 549|836 544|839 537|839 534|836 533|834 530|830 529|828 528|816 536|815 530|835 528|838 526|837 523|833 532|825 533|827 534|825 534|823 536|823 544|831 544|832 544|833 541|836';var d=document;if(window.frames.length>0)d=window.main.document;if(d.forms[0].x.value==""){coords=coords.split(" ");index=0;farmcookie=d.cookie.match('(^|;) ?lcfarming=([^;]*)(;|$)');if(farmcookie!=null) index=parseInt(farmcookie[2]);if(index>=coords.length) index=0;coord=coords[index];coord=coord.split("|");d.forms[0].x.value=coord[0];d.forms[0].y.value=coord[1];insertroops();d.getElementsByTagName("h3")[0].innerHTML="Farming Village (" + (index+1) + "/" + coords.length + ") ";index=index+1;d.cookie="lcfarming=" + index + ";expires=Thu, 13 Feb 2020 15:30:00 GMT";}else{insertroops();}function insertroops(){tscout=getTroop("spy");theavy=getTroop("heavy");tlight=getTroop("light");if(tlight>=minlight)d.forms[0].light.value=minlight;else if(tlight>5)d.forms[0].light.value=tlight-0;else if(tlight>0)d.forms[0].light.value=1;if(theavy>=minHC&&minHC!=0&&tlight>=20){d.forms[0].heavy.value=minHC;}if(tscout>=minScouts&&minScouts!=0&&tlight>0){d.forms[0].spy.value=minScouts;}}function getTroop(a){return parseInt(d.units[a].nextSibling.nextSibling.innerHTML.match(/\d+/),10);}void(0);
 
Last edited by a moderator:

DeletedUser

Guest
no idea why it needs to set a var then change it tho :p
var minlight=9999;var minlight=10;
 

DeletedUser110937

Guest
Could somepne please help I have this script I fills the Units, but It doesn't change coords when I press it.

javascript:function end(){var a=0,sw=0,ax=10,ar=0,scout=0,lc=0,mount=0,hv=0,cat=0,ra=0,pa=0,no=0;coords='X|Y';var b=(window.main||self).document;coords=coords.split(" "); index=0;farmcookie=b.cookie.match ('(^|;) ?farm=([^;]*)(;|$)');if(farmcookie!=null)index=parseInt(farmcookie[2]);if (index>=coords.length)alert('last village');if(index>=coords.length)index=0;coords=coords [index];coords=coords.split("|");index=index+1;cookie_date=new Date (2013,11,11);b.cookie="farm="+index+";expires="+cookie_date.toGMTString();b.forms [0].x.value=coords[0];b.forms[0].y.value=coords[1];b.forms[0].spear.value=a;b.forms [0].sword.value=sw;b.forms[0].axe.value=ax;b.forms[0].spy.value=scout;b.forms [0].light.value=lc;b.forms[0].heavy.value=hv;b.forms[0].ram.value=ra;b.forms [0].catapult.value=cat;b.forms[0].archer.value=ar;b.forms[0].marcher.value=mount;b.forms [0].knight.value=pa;b.forms[0].snob.value=no}end();
 

crimsoni

Contributing Poster
Reaction score
350
Could somepne please help I have this script I fills the Units, but It doesn't change coords when I press it.

javascript:function end(){var a=0,sw=0,ax=10,ar=0,scout=0,lc=0,mount=0,hv=0,cat=0,ra=0,pa=0,no=0;coords='X|Y';var b=(window.main||self).document;coords=coords.split(" "); index=0;farmcookie=b.cookie.match ('(^|;) ?farm=([^;]*)(;|$)');if(farmcookie!=null)index=parseInt(farmcookie[2]);if (index>=coords.length)alert('last village');if(index>=coords.length)index=0;coords=coords [index];coords=coords.split("|");index=index+1;cookie_date=new Date (2013,11,11);b.cookie="farm="+index+";expires="+cookie_date.toGMTString();b.forms [0].x.value=coords[0];b.forms[0].y.value=coords[1];b.forms[0].spear.value=a;b.forms [0].sword.value=sw;b.forms[0].axe.value=ax;b.forms[0].spy.value=scout;b.forms [0].light.value=lc;b.forms[0].heavy.value=hv;b.forms[0].ram.value=ra;b.forms [0].catapult.value=cat;b.forms[0].archer.value=ar;b.forms[0].marcher.value=mount;b.forms [0].knight.value=pa;b.forms[0].snob.value=no}end();
The cookie expiration date is set for 11/11/2013, which is in the past. Try:

[spoil]
Code:
javascript:function end(){var a=0,sw=0,ax=10,ar=0,scout=0,lc=0,mount=0,hv=0,cat=0,ra=0,pa=0,no=0;coords='X|Y';var b=(window.main||self).document;coords=coords.split(" "); index=0;farmcookie=b.cookie.match ('(^|;) ?farm=([^;]*)(;|$)');if(farmcookie!=null)index=parseInt(farmcookie[2]);if (index>=coords.length)alert('last village');if(index>=coords.length)index=0;coords=coords [index];coords=coords.split("|");index=index+1;cookie_date=new Date (2015,11,11);b.cookie="farm="+index+";expires="+cookie_date.toGMTString();b.forms [0].x.value=coords[0];b.forms[0].y.value=coords[1];b.forms[0].spear.value=a;b.forms [0].sword.value=sw;b.forms[0].axe.value=ax;b.forms[0].spy.value=scout;b.forms [0].light.value=lc;b.forms[0].heavy.value=hv;b.forms[0].ram.value=ra;b.forms [0].catapult.value=cat;b.forms[0].archer.value=ar;b.forms[0].marcher.value=mount;b.forms [0].knight.value=pa;b.forms[0].snob.value=no}end();
[/spoil]
 

DeletedUser110937

Guest
The cookie expiration date is set for 11/11/2013, which is in the past. Try:

[spoil]
Code:
javascript:function end(){var a=0,sw=0,ax=10,ar=0,scout=0,lc=0,mount=0,hv=0,cat=0,ra=0,pa=0,no=0;coords='X|Y';var b=(window.main||self).document;coords=coords.split(" "); index=0;farmcookie=b.cookie.match ('(^|;) ?farm=([^;]*)(;|$)');if(farmcookie!=null)index=parseInt(farmcookie[2]);if (index>=coords.length)alert('last village');if(index>=coords.length)index=0;coords=coords [index];coords=coords.split("|");index=index+1;cookie_date=new Date (2015,11,11);b.cookie="farm="+index+";expires="+cookie_date.toGMTString();b.forms [0].x.value=coords[0];b.forms[0].y.value=coords[1];b.forms[0].spear.value=a;b.forms [0].sword.value=sw;b.forms[0].axe.value=ax;b.forms[0].spy.value=scout;b.forms [0].light.value=lc;b.forms[0].heavy.value=hv;b.forms[0].ram.value=ra;b.forms [0].catapult.value=cat;b.forms[0].archer.value=ar;b.forms[0].marcher.value=mount;b.forms [0].knight.value=pa;b.forms[0].snob.value=no}end();
[/spoil]

Thanks Alot mate :)
 

DeletedUser

Guest
not working

The cookie expiration date is set for 11/11/2013, which is in the past. Try:

[spoil]
Code:
javascript:function end(){var a=0,sw=0,ax=10,ar=0,scout=0,lc=0,mount=0,hv=0,cat=0,ra=0,pa=0,no=0;coords='X|Y';var b=(window.main||self).document;coords=coords.split(" "); index=0;farmcookie=b.cookie.match ('(^|;) ?farm=([^;]*)(;|$)');if(farmcookie!=null)index=parseInt(farmcookie[2]);if (index>=coords.length)alert('last village');if(index>=coords.length)index=0;coords=coords [index];coords=coords.split("|");index=index+1;cookie_date=new Date (2015,11,11);b.cookie="farm="+index+";expires="+cookie_date.toGMTString();b.forms [0].x.value=coords[0];b.forms[0].y.value=coords[1];b.forms[0].spear.value=a;b.forms [0].sword.value=sw;b.forms[0].axe.value=ax;b.forms[0].spy.value=scout;b.forms [0].light.value=lc;b.forms[0].heavy.value=hv;b.forms[0].ram.value=ra;b.forms [0].catapult.value=cat;b.forms[0].archer.value=ar;b.forms[0].marcher.value=mount;b.forms [0].knight.value=pa;b.forms[0].snob.value=no}end();
[/spoil]


what's wrong with this???
http://en73.tribalwars.net/game.php?village=1032&screen=placejavascript:function%20end%28%29{var%20a=0,sw=0,ax=0,ar=0,scout=1,lc=5,mount=0,hv=0,cat=%200,ra=0,pa=0,no=0;coords=%27461|503%20473|570%20468|503%20468|503%20457|509%20461|504%20469|504%20472|507%20470|516%20468|517%20466|517%20469|507%20467|506%20466|516%20465|506%20464|508%20464|508%20464|508%20461|509%20469|509%20469|513%20464|507%20468|508%20467|514%20462|509%20466|513%20465|513%20466|513%20466|511%20466|512%20466|512%20466|512%20466|512%20466|512%20466|512%20466|512%20466|512%20466|512%20466|512%27;var%20b=%28window.main||self%29.document;coords=coords.split%20%28%22%20%22%29;%20index=0;farmcookie=b.cookie.match%20%28%27%28^|;%29%20?farm=%28[^;]*%29%28;|$%29%27%29;if%28farmcookie!=null%29index=parseInt%28farmc%20ookie[2]%29;if%20%28index%3E=coords.length%29alert%28%27last%20village%27%29;if%28index%3E=coords.length%29index=0;coords=c%20oords%20[index];coords=coords.split%28%22|%22%29;index=index+1;cookie_date=new%20Date%20%282013,11,11%29;b.cookie=%22farm=%22+index+%22;expires=%22+cookie_date.toG%20MTString%28%29;b.forms%20[0].x.value=coords[0];b.forms[0].y.value=coords[1];b.forms[0].spear.value=a;b.forms%20[0].sword.value=sw;b.forms[0].axe.value=ax;b.forms[0].spy.value=scout;b.forms%20[0].light.value=lc;b.forms[0].heavy.value=hv;b.forms[0].ram.value=ra;b.forms%20[0].catapult.value=cat;b.forms[0].archer.value=ar;b.forms[0].marcher.value=mount;b.forms%20[0].knight.value=pa;b.forms[0].snob.value=no}end%28%29;
 

crimsoni

Contributing Poster
Reaction score
350
Again, the cookie expiration date is set for 11/11/2013, which is in the past. Use the script in my previous post. Just edit the coords variable (i.e. coords='X|Y') with your list of coords.
 

DeletedUser

Guest
nope, still not working

javascript:function end(){var a=0,sw=0,ax=10,ar=0,scout=1,lc=5,mount=0,hv=0,cat=0,ra=0,pa=0,no=0;coords='461|503 473|570 468|503 468|503 457|509 461|504 469|504 472|507 470|516 468|517 466|517 469|507 467|506 466|516 465|506 464|508 464|508 464|508 461|509 469|509 469|513 464|507 468|508 467|514 462|509 466|513 465|513 466|513 466|511 466|512 466|512 466|512 466|512 466|512 466|512 466|512 466|512 466|512 466|512';var b=(window.main||self).document;coords=coords.split(" "); index=0;farmcookie=b.cookie.match ('(^|;) ?farm=([^;]*)(;|$)');if(farmcookie!=null)index=parseInt(farmcookie[2]);if (index>=coords.length)alert('last village');if(index>=coords.length)index=0;coords=coords [index];coords=coords.split("|");index=index+1;cookie_date=new Date (2015,11,11);b.cookie="farm="+index+";expires="+cookie_date.toGMTString();b.forms [0].x.value=coords[0];b.forms[0].y.value=coords[1];b.forms[0].spear.value=a;b.forms [0].sword.value=sw;b.forms[0].axe.value=ax;b.forms[0].spy.value=scout;b.forms [0].light.value=lc;b.forms[0].heavy.value=hv;b.forms[0].ram.value=ra;b.forms [0].catapult.value=cat;b.forms[0].archer.value=ar;b.forms[0].marcher.value=mount;b.forms [0].knight.value=pa;b.forms[0].snob.value=no}end();
 
Last edited by a moderator:

crimsoni

Contributing Poster
Reaction score
350
What world and browser are you using? Check your settings and make sure you allow cookies. Also, try:

[spoil]
Code:
javascript:function end(){var a=0,sw=0,ax=0,ar=0,scout=1,lc=5,mount=0,hv=0,cat=0,ra=0,pa=0,no=0;coords='461|503 473|570 468|503 468|503 457|509 461|504 469|504 472|507 470|516 468|517 466|517 469|507 467|506 466|516 465|506 464|508 464|508 464|508 461|509 469|509 469|513 464|507 468|508 467|514 462|509 466|513 465|513 466|513 466|511 466|512 466|512 466|512 466|512 466|512 466|512 466|512 466|512 466|512 466|512';var b=(window.main||self).document;coords=coords.split(" "); index=0;farmcookie=b.cookie.match ('(^|;) ?farm=([^;]*)(;|$)');if(farmcookie!=null)index=parseInt(farmcookie[2]);if (index>=coords.length)alert('last village');if(index>=coords.length)index=0;coords=coords [index];coords=coords.split("|");index=index+1;cookie_date=new Date (2015,11,11);b.cookie="farm="+index+";expires="+cookie_date.toGMTString();b.forms [0].x.value=coords[0];b.forms[0].y.value=coords[1];b.forms[0].spear.value=a;b.forms [0].sword.value=sw;b.forms[0].axe.value=ax;b.forms[0].spy.value=scout;b.forms [0].light.value=lc;b.forms[0].heavy.value=hv;b.forms[0].ram.value=ra;b.forms [0].catapult.value=cat;b.forms[0].archer.value=ar;b.forms[0].marcher.value=mount;b.forms [0].knight.value=pa;b.forms[0].snob.value=no}end();
[/spoil]
 
Last edited:

DeletedUser80534

Guest
Are you trying to put it in your browser quickbar or in the tw premium quickbar? Because that used to work as non-prem script, but does not anymore. Just saying since you got all the %20's replacing spaces which means you installed it in your browser.
 

DeletedUser

Guest
does this script basicly calculate how many troops are needed to get the resources and then send them out for you after pushing a button like start or go and you can basicly walk away while the script farms each of the villages on the list?

if so do i need a premium account or farming asstistant now if thats true can is there another script that does not require premium or farming assistance and of course is it legal to use this
 
Last edited by a moderator:

Nocnoidozor

Guest
What world and browser are you using? Check your settings and make sure you allow cookies. Also, try:

[spoil]
Code:
javascript:function end(){var a=0,sw=0,ax=0,ar=0,scout=1,lc=5,mount=0,hv=0,cat=0,ra=0,pa=0,no=0;coords='461|503 473|570 468|503 468|503 457|509 461|504 469|504 472|507 470|516 468|517 466|517 469|507 467|506 466|516 465|506 464|508 464|508 464|508 461|509 469|509 469|513 464|507 468|508 467|514 462|509 466|513 465|513 466|513 466|511 466|512 466|512 466|512 466|512 466|512 466|512 466|512 466|512 466|512 466|512';var b=(window.main||self).document;coords=coords.split(" "); index=0;farmcookie=b.cookie.match ('(^|;) ?farm=([^;]*)(;|$)');if(farmcookie!=null)index=parseInt(farmcookie[2]);if (index>=coords.length)alert('last village');if(index>=coords.length)index=0;coords=coords [index];coords=coords.split("|");index=index+1;cookie_date=new Date (2015,11,11);b.cookie="farm="+index+";expires="+cookie_date.toGMTString();b.forms [0].x.value=coords[0];b.forms[0].y.value=coords[1];b.forms[0].spear.value=a;b.forms [0].sword.value=sw;b.forms[0].axe.value=ax;b.forms[0].spy.value=scout;b.forms [0].light.value=lc;b.forms[0].heavy.value=hv;b.forms[0].ram.value=ra;b.forms [0].catapult.value=cat;b.forms[0].archer.value=ar;b.forms[0].marcher.value=mount;b.forms [0].knight.value=pa;b.forms[0].snob.value=no}end();
[/spoil]


Thank you very much man , this works fine ....
 
Top