Farming script?

nebster10

Guest
Awesome thanks! <:) and I'm terribly sorry about saying java when I meant javascript <XP my friend constantly catches me doing that...

Though really a fantastic answer ^_^ I'm in Electrical engineering in university so knowing enough programming to interact with hardware but javascript isn't really my domain <:p

to quote my friend "you don't interpret javascript you just scream at it until you cry." <XD sigh... oh ryan...
 

DeletedUser110443

Guest
Can somebody please edit this script so that it highlights the co-ordinate box, so I can simply press enter?

javascript:insertUnit($('#unit_input_spear'), 0);var minlight=10;var minHC=0;var minScouts=5;var coords='714|466 716|468 716|470 714|471 716|465 713|471 711|467 714|464 718|468 710|468 715|464 715|472 711|465 711|471 717|465 717|471 710|466 718|470 714|463 712|463 709|466 709|470 716|473 710|464 718|472 718|464 714|474 720|469 708|469 713|462 720|467 712|462 710|473 720|472 707|470 716|461 721|466 721|470 707|465 709|462';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);


Cheers :axemen::axemen:
 

DeletedUser

Guest
Can somebody please edit this script so that it highlights the co-ordinate box, so I can simply press enter?

javascript:insertUnit($('#unit_input_spear'), 0);var minlight=10;var minHC=0;var minScouts=5;var coords='714|466 716|468 716|470 714|471 716|465 713|471 711|467 714|464 718|468 710|468 715|464 715|472 711|465 711|471 717|465 717|471 710|466 718|470 714|463 712|463 709|466 709|470 716|473 710|464 718|472 718|464 714|474 720|469 708|469 713|462 720|467 712|462 710|473 720|472 707|470 716|461 721|466 721|470 707|465 709|462';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];d.forms[0].y.focus();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);


Cheers :axemen::axemen:


add bit in red to your script
 

DeletedUser

Guest
guys,

I normaly play on an NL server, and the scripts that I use there don't work on this server.
I'm actually searching for a script in FA which let the villages who are allready under attack disappear.

I hope somebody can give me this script.

LarsDG,
 

DeletedUser

Guest
guys,

I normaly play on an NL server, and the scripts that I use there don't work on this server.
I'm actually searching for a script in FA which let the villages who are allready under attack disappear.

I hope somebody can give me this script.

LarsDG,

Im afraid that on .net servers its illegal for any scripts to interact with FA so anyone posting such a script here would probably get infracted not to mention anyone found using such a script in game on .net being banned
 
Last edited by a moderator:

DeletedUser110937

Guest
javascript:function%20end(){c='517|767 518|769 517|766 519|768 516|770 519|769 518|770 514|766 515|771 514|767 521|768 513|767 514|765 513|770 521|766 513|766 512|768 521|765 513|765 514|772 512|767 518|773 522|766 521|764 513|772 522|765 511|767 522|772 521|773 514|774 520|774 511|764 523|764 515|761 524|765 522|762 523|763 517|760 525|768 518|776 513|761 515|760 509|770 509|771 514|776 513|776 508|768 518|759 518|777 516|777 508|769 508|767 511|775 523|775 515|777 526|766 509|763 512|776 521|759 525|762 527|768 507|768 507|767 516|758 518|778 518|758 527|766 507|766 512|759 512|777 526|763 524|776 509|761 513|778 511|759 526|774';var%20d=document;if(window.frames.length>0)d=window.main.document;url=d.URL;if(url.indexOf('screen=place')==-1)alert('This%20script%20needs%20to%20be%20run%20from%20the%20rally%20point');a=c.match(/(\d+\|\d+)/g);b=a[Math.round(Math.random()*(a.length-1))].split("|");d.forms[0].x.value=b[0];d.forms[0].y.value=b[1];d.forms[0].spear.value=0;d.forms[0].sword.value=0;d.forms[0].axe.value=0;d.forms[0].spy.value=5;d.forms[0].light.value=25;d.forms[0].heavy.value=0;d.forms[0].ram.value=0;d.forms[0].catapult.value=0;d.forms[0].snob.value=0;d.forms[0].archer.value=0;d.forms[0].marcher.value=0;d.forms[0].knight.value=0;}end();


I don't know but this stopped working for me, It worked Earlier

 

DeletedUser

Guest
Im sure this has been gone over some place in here.... But what I am looking for is a farming script that I can put the village coords in like the one above... Also put my troop numbers into...

So I can go to my rally point hit enter it will add the coords and troop numbers send my attack hit enter again and it will add the next coords in line and so forth tell it starts over......
 

DeletedUser64969

Guest
Can anyone fix this, its suppose to filter FA attacks out, it works on the first page, but when you go to the 2nd page it dosnt work for some reason it reloads and goes back to the first page :(
 
Last edited:

DeletedUser

Guest
illegal script edited out of quote
Can anyone fix this, its suppose to filter FA attacks out, it works on the first page, but when you go to the 2nd page it dosnt work for some reason it reloads and goes back to the first page :(


.net has a very clear no scripts allowed on Farm Assistant rule, whilst it may be allowed on other TW servers its illegal here on .net
 
Last edited by a moderator:

DeletedUser64969

Guest
.net has a very clear no scripts allowed on Farm Assistant rule, whilst it may be allowed on other TW servers its illegal here on .net

ah didnt know that :O, i cant see why thats against the rules tbh, in that case a noble filter script should be against the rules, its basically does the same thing, and its not really altering anything, just making a task easier.
 

DeletedUser

Guest
When account manager which fa is a subset of was brought in a no scripts policy was introduced for account manager on .net

.us and .uk have their own rules if i were you i'd remove the script from your post as otherwise you run the risk of getting an infraction
 

DeletedUser64969

Guest
When account manager which fa is a subset of was brought in a no scripts policy was introduced for account manager on .net

.us and .uk have their own rules if i were you i'd remove the script from your post as otherwise you run the risk of getting an infraction

thats a shame tbh, seems rather silly, I don't see why they shouldn't be making the game easier, end of the day it will raise the competition level if its done the right way, just small things like that script would make farming easy for everyone.

But i would like to ask, i am guessing this not allowed as well, but is there anyway to ignore certain attacks in FA, so i could just select the attack and ignore it :) so any ram attacks that are sent to knock down walls Will not show up in FA, thus not disrupting farming.
 
Last edited:

DeletedUser111206

Guest
Anyone got a simple farmscript?

Im getting tired of making my own through the fakegen since it then sends out random and messes everything up.
 

DeletedUser

Guest
define simple

do you mean a script that just enters troops but no coords ?
or a script that send attacks in the same order ?

if the later your looking for whats known as a sequential farm script a search should find what your looking for
 

DeletedUser111206

Guest
define simple

do you mean a script that just enters troops but no coords ?
or a script that send attacks in the same order ?

if the later your looking for whats known as a sequential farm script a search should find what your looking for


Im searching for a script that sends it in order, only got loads of randoms and hate it.
 

DeletedUser

Guest
[spoil]
Code:
javascript: function getTroop(a) {      if (typeof (a) == undefined) {          return 0;      }      else {          return parseInt(document.units[a].parentNode.getElementsByTagName("a")[1].innerHTML.match(/\d+/), 10);      }  };if (getTroop("axe")<16) {window.close()};coords='720|249 721|250';var fakeLimit = false;var doc = (window.frames.length > 0) ?   window.main.document: document;coords = coords.split(" ");var index =   0;var farmcookie = document.cookie.match("(^|;) ?scout_fake=([^;]*)(;|$)");if (farmcookie !== null) index = parseInt(farmcookie[2]);if   (index == coords.length - 1) dumx=1;if (index >=   coords.length) index = 0;var coord = coords[index].split("|");index++;cookie_date = new Date(2099, 11, 11);document.cookie =   "scout_fake=" + index +"; expires=" + cookie_date.toGMTString  ();doc.forms[0].x.value = coord[0];doc.forms[0].y.value = coord[1];insertUnit($('#unit_input_axe'), getTroop('axe'));  void (0);
[/spoil]

The above script will send every axe you have in the current villa at each villa listed in coords variable in sequence

Obviously axes arent the best farming unit but you can easily amend the script to your needs by changing this line

insertUnit($('#unit_input_axe'), getTroop('axe'))

if you want to send just lc change it to

insertUnit($('#unit_input_light'), getTroop('light'))

if you dont want to send all available lc but say only 400

insertUnit($('#unit_input_light'), 400)

other valid troop types are

#unit_input_spear
#unit_input_sword
#unit_input_axe
#unit_input_archer
#unit_input_marcher
#unit_input_spy
#unit_input_ram
#unit_input_catapult
#unit_input_knight
#unit_input_snob
 

DeletedUser111206

Guest
Looks like i forgot to thank you ;)

well i do it now then, thanks mate!
 
Top