Farming (LA) NAFS - Nineza's Awesome Farming (and Shaping) Script

  • Thread starter DeletedUser110650
  • Start date

DeletedUser110650

Guest
Author
Nineza
Contributors
N/A
Quickbar Entry
javascript:void(jQuery.getScript('http://pastebin.com/raw.php?i=q1PezYz6', function(){ changeConfig(); }));
Public?
Public
The name wasn't my idea, but I kinda like it (I'm sometimes called Throne3d, sometimes Nineza). :p

Ok - considering the void left after (first) TWFR died and (next) TWPF seems to have gone down, I decided to create a farming script.

It's been approved (I just wanted to check in case AJAX isn't allowed or something - it was in the case of TWPF, but just checking) - basically it reads reports, creates a clicky link or two on certain pages, and helps with farming and shaping.

Instructions (per world)
1. Run the configuration script once and do as it asks (also feed it information as it requests it).
2. Import reports (either from Reports > Attacks or a specific report page by running the script).
3. Add villages to your farm list (find their village page, run the script, click "Add to list" if it's not already added - importing reports will also add them; this list is per-village).
4. Go to your rally point
5. Run the script - it should automatically scout (if set to do this) stale/old/unscouted villages, then shape them if enough troops available and set to do this (with axes, a scout, rams for the walls, catapults for the farm and headquarters and so on), then farm them if set to do this (with light cavalry and scouts).
6. On the confirmation page (Yes, click "Attack"!), if set to catapult, run the script again - here it will select and building and say "Changed" next to the dropdown.
7. Repeat.

Notes
It works using "localStorage", so you will have to have a browser compatible with this - it should warn you if localStorage is not present. This also means it will not work on multiple browsers, unless you save "localStorage.twstuffz" and reimport it on the other browser.
It was originally done using Chrome as the test bed, but has been updated to work in Opera 12 as well as the major browsers (mostly untested apart from Chrome + Opera 12).
On the rally point, it uses the current outgoings to work out which village to do next - this means you may do multiple tabs to attack in for multiple villages, but not multiple tabs for a single village.
If an error message appears stating the bigger player's points are too high, or that the player is banned, running the script again will trigger that village to be disabled from your farm list.
The configuration script's "delete disabled villages" is a one-time thing - to have this happen again, you must re-run the configuration script (just press "OK" on everything before the 'delete disabled' bit) and perform this action.

Old Links
Configuration script:
Code:
javascript:void(jQuery.getScript('http://pastebin.com/raw.php?i=q1PezYz6', function(){ changeConfig(); }));
The rest:
Code:
javascript:void(jQuery.getScript('http://pastebin.com/raw.php?i=q1PezYz6', function(){ def(); }));

Old Changelog
2014-08-27, 1.0.7:
-Allows changing of minimum wall level required to send rams.

2014-08-19, 1.0.6:
-New option to prevent import of reports with a player as the defender
-Truly fixed the localization thing (and the stupid page thing - beta has changed that village overview page YET AGAIN)

2014-08-19, 1.0.5c:
-Fixed localizations (duh. forgot to add it for "Coordinates" >_>)

2014-08-19, 1.0.5b:
-Fixed it to work with the new report layout (oops?)
-Fixed it to work with the new village overview layout (hopefully?)

2014-08-15, 1.0.5a:
-Allows more troop variety...

2014-08-01, 1.0.5:
-Now allows the choice of axes or spears (or whichever is available) for catapulting.
-Now allows the choice of spears, swords, axes, LC and mounted archers for regular farming.

Final note
Please make sure to give feedback (preferably here or via PM) - I will try to add any features you request (providing they aren't against the ToS and fit with the rest of the script), fix any bugs you may have, and add any extra notes that I haven't already stated! (The script runs somewhat weirdly, so you may have to ask for clarification on some points).

Also, it's possible that this post will become too old to be edited, in which case, I'll just post updates as they come in response to this thread. (Changelog can be found in an external file here - look for that version in reply)

New Edit - 2015/10/25
Apparently still works. Should still work. Might be kinda funny today after daylight saving time changes. Let me know if you have issues.

Re-vamped version (does near-enough exactly the same, needs to be reconfigured, needs to have reports added, has a few extra features that aren't guaranteed to work properly, notify me of any issues, translation thing isn't working 100% right now, etc.):
Config:
Code:
javascript:void($.getScript("https://pastebin.com/raw.php?i=HKM89370", function(){ changeConfig(); }));
Main script:
Code:
javascript:void($.getScript("https://pastebin.com/raw.php?i=HKM89370", function(){ def(); }));
 
Last edited by a moderator:
Upvote 0

DeletedUser103792

Guest
is the script still working with anybody at all?
I tried to reach the programmer but he seems to be busy

Last time I talked to him, he said he had quitted TW and said something like this: "I haven't updated it in ages and it seems like people still use it, weird." This was in January.
 

DeletedUser

Guest
You need to change the http: part to https: - then it will work. You need to do it in both the config script and the actual script. I'm currently using it, so it definitely still works.
 

DeletedUser110650

Guest
Yup. Wow, it's been ages since I last posted here. I kinda didn't play TribalWars for ages.

It's due to the way that the TribalWars website is now typically on HTTPS (pretty sure it wasn't that way ~a year ago), so it won't load scripts from insecure sources.

Um, I actually revamped it. Kinda rewrote most of the script, and made a few improvements. No guarantees for how well it'll work when you try doing multiple troop types in a farming attack (in theory, it'll make all cavalry troops go in an attack, then it'll move onto infantries). But, in case you want the new version, here it is:

Code:
javascript:void($.getScript("https://pastebin.com/raw.php?i=HKM89370", function(){ def(); }));

and the config:

Code:
javascript:void($.getScript("https://pastebin.com/raw.php?i=HKM89370", function(){ changeConfig(); }));

It does not import villages from the original version of the script, and a few bits of it haven't been properly updated (they still function, but might be inefficient, or might have similar issues to the old script, or such). You'll have to manually re-add villages (or scan reports where you attacked them), and manually re-set your configs.

Oh, and I think I'll have to change stuff on both the scripts tonight (old and new version), since the clocks are changing? Therefore the server time offset from GMT is different, and the script might be a little funny (such as thinking a report from ~10 minutes ago actually happened in 50 minutes' time, or is it the other way around?). Let me know if you encounter any issues like this, and if you got a message from the TW team talking about daylight saving time changes, and I'll be happy to modify the time offset for your world / set of worlds.

Um. Hopefully the new version will work? It does near enough exactly the same on the front-end, and just has a slightly different backend. You might be better off using another tool if there's a better one available. It definitely seems to work (again, multi-troop-type farming untested) on the current beta world.
 
Last edited by a moderator:

DeletedUser58259

Guest
This thing is beautiful...

Only one thing I wish it did, when player farming - I wish it would take into account that there are troops there in the village in the scout report... And either not send or calculate how many axes, lc etc it would take to clear efficiently... Otherwise an option to "remove villages with troops visible" from list or something.
 

DeletedUser58259

Guest
Nvm, this thing doesn't work.. Does not shape, just farms... Tried to fix it with no luck.
 

DeletedUser110650

Guest
Nvm, this thing doesn't work.. Does not shape, just farms... Tried to fix it with no luck.
Really? Huh, that's weird. The old version, at least, should still work.

For the new version, though... Does it just never decide to shape, and just always farms? Have you set up the config correctly?
If you could do a print-screen of a rally page, show me your local data (open Console (Ctrl+Shift+I), write localStorage.NAFSData, copy and paste it somewhere (might want to PM it to me instead of posting it publically)), and then show me what the rally page looks like after you run the script once, that'd probably help. I'm confused why specifically the shaping wouldn't work, but the farming would. They're pretty similar inside the actual script, and I'm pretty certain that the wall-breaking, at least, works.
 

Shinko to Kuma

Still Going Strong
Reaction score
776
Are these still legal and working?

No, and they won't be anymore I'm afraid either. I had a perfectly legal one in the works but despite it being legal, they disapproved it cause it would be too impactfull and too easy to automate. I spent 2 months on that shit making sure it followed the rules wasting all my spare time. But the Koreans can keep running their illegal bots without any repercussions. I guess they atleast ban then for multiaccounting \o/
 

Shenanigans

Guest
Is there no farm shaping scripts/tools left in this game anymore?

I rejoined about 2 months ago after a few years break but being able to farm shape before I did quit was beautiful for my OCD :D
 

tigar

Guest
Is there no farm shaping scripts/tools left in this game anymore?

I rejoined about 2 months ago after a few years break but being able to farm shape before I did quit was beautiful for my OCD :D
I am curious as well as it would be nice if it was

I wonder if mods could take away the approved tag on this post then if this isnt approved anymore
 

Anonymous...

Guest
It seems the general idea is that either the farm shapers are now illegal, and the few that were at one time approved are so broken they would require an entire rewrite, which is unlikely since it seems that we now have an issue with legality
 

busamad

Contributing Poster
Reaction score
34
No, and they won't be anymore I'm afraid either. I had a perfectly legal one in the works but despite it being legal, they disapproved it cause it would be too impactfull and too easy to automate. I spent 2 months on that shit making sure it followed the rules wasting all my spare time. But the Koreans can keep running their illegal bots without any repercussions. I guess they atleast ban then for multiaccounting \o/

Its funny when we had the same issue with another script. Which again can be ran on auto yet its okay to use.
I take it TW has not changed much with which scripts can & cannot be used. No consistency at all.
 

Shinko to Kuma

Still Going Strong
Reaction score
776
Its funny when we had the same issue with another script. Which again can be ran on auto yet its okay to use.
I take it TW has not changed much with which scripts can & cannot be used. No consistency at all.
the ability to automatically launch 20k attacks in an hour is far more impactfull than lets say hold donw a button and balance resources or send farm runs out to barbarians
 
Top