Extra caution is recommended when installing recently uploaded/updated scripts (read more)
Be sure you trust any scripts you install

Travian NPC helper

For Travian players. Shows total resource units needed for upgrading a building, regardless of their type. You'll know at a glance if you can use the NPC merchant. Also provides convenient link for NPC trading.

Details

In Travian, if you have gold you can reallocate your available resources using the NPC merchant. This means that the exact structure of your resources is sometimes less important than the total amount that you have and the amount you need for a certain upgrade.

This script shows:

  • the sum of resource units needed to extend a building, as well as whether you have a deficit or surplus (following the word Total)
  • a time estimate based on your hourly production, if you don't have enough resources (following the @ sign)
  • the amount of time that would be saved by using the NPC merchant (e.g.: -20h35m)
  • for troop count upgrades, the maximum number of troops that you can afford assuming you would use the NPC merchant
  • a direct link to the merchant page, when you have enough resources

In addition, when you click the NPC link the form will be automatically filled out with the requirements for the selected upgrade.

A note regarding troops upgrades

For troop upgrades in a building such as the Barracks or Stable, the script will take into account the number entered for each troop type. So initially the totals will be zero, because the number for each troop type is zero, but the total will change to reflect the costs as you enter a new number in the appropriate field.

Change log

0.84 / 2 Feb. 2008

  • Fixed a conflict with Travian Navigator++.

0.83 / 27 Jan. 2008

  • Bug fix: NPC link not being shown when having negative crop production, even if enough resources were available.

0.82 / 18 Jan. 2008

  • Minor code clean-up, no functional change.

0.81 / 18 Jan. 2008

  • The time savings estimate now takes into account zero or negative crop production.
  • Fixed a bug causing the NPC link to not appear sometimes when it should have.
  • Fixed an event handling issue that sometimes made the NPC link unresponsive.
  • Font size is slightly smaller, to accomodate bigger numbers and new info.

0.8 / 17 Jan. 2008

  • New feature: shows time saved if using NPC merchant.
  • NPC link only appears if upgrade link isn't already available.

0.74 / 7 Jan. 2008

  • One more fix for "max" in the Gallic Trapper.

0.73 / 6 Jan. 2008

  • The post-NPC back link didn't work properly in certain cases. Fixed.

0.72 / 5 Jan. 2008

  • Fixed bug in calculating "max" for Gallic traps.

0.71 / 4 Jan. 2008

  • Fixed bug affecting requirements total for Teutonic wall, possibly other buildings.

0.7 / 4 Jan. 2008

  • Support for the Gallic Trapper has been added.
  • The date in the estimate has a highlight if it's today.

0.61 / 3 Jan. 2008

  • Fixed bug on "max" links.

0.6 / 3 Jan. 2008

  • The "max" number shown for troops is a link, will put the number in the appropriate field when clicked.
  • Date & time estimate is shown for when resource availability will meet upgrade requirements.

0.5 / 2 Jan. 2008

  • Now works for troop count upgrades as well.
  • Return link to building is provided after making an NPC trade.
  • When using this script together with Travian QP Targets, NPC links could be triggered unintentionally by pressing the space bar. Fixed.

0.42 / 31 Dec. 2007

  • Fixed a bug affecting NPC form auto-filling on some servers.

0.41 / 31 Dec. 2007

  • NPC URL is now hard-coded.
  • Fixed problem affecting multi-village players, as well as players who use Plus on and off.

0.4 / 30 Dec. 2007

  • Works for other upgrades, such as those within the Academy, Armoury, or Blacksmith.
  • Design change: totals and link appear below resource summary.

Name change

  • Changed script name. Uninstall Travian resource total.

0.31 / 29 Dec. 2007

  • The deficit / surplus is now updated as available resources change.
  • Direct link to the NPC merchant page when you have enough resources for an upgrade.
  • NPC merchant form will be automatically filled out with the requirements for the given upgrade.

0.2 / 28 Dec. 2007

  • Now totals are being shown for all buildings when building on an empty spot.




Aug 9, 2008
POL and User

So i put your script as propse to add this Beyond... http://userscripts.org/scripts/show/26429 p.s sorry for my eng

 
Jul 31, 2008
gp Script's author

@ POL and: Sure, go ahead.

 
Jul 31, 2008
POL and User

can use your script in other?

 
Feb 22, 2008
gp Script's author

jvmkite,

Thanks for the suggestion. I know what you mean and I did think of doing that. I might add the feature some time, but my interest in the game has subsided lately, so I wouldn't hold my breath. :)

 
Feb 22, 2008
jvmkite User

I find This Script very good...

Is it possible to improve it in order to distribute the remaining resources for a continous upgrade of some building or to improve several times the same amount of resources?

Meaning, When I use the NPC, I have much more resources then the ones needed for the building I have press the butten on this script. Then the only options are to distribute the remainder resources among the type. I would like to dsitribute for example to ugrade several times teh same level of "cereal field".

Best regards

 
Feb 2, 2008
Poco User

Thank you, gp, excellent work!

 
Feb 2, 2008
gp Script's author

Poco,

Please re-install. It should work fine now.

 
Feb 2, 2008
Poco User

gp, with Travian Navigator++ it doesn't show the NPC link. For example it shows only: "Total: 315 (+15057)", nothing more. Any suggestions? (Do you need a screenshot?)

 
Jan 29, 2008
gp Script's author

krmichal,

Thanks for the good words. :) I'm glad you like it.

 
Jan 29, 2008
krmichal User

Thanks for the quick fix - now it works as it should.
Each day I like your script even more. I only regret,I didn't have it few months ago :)

 
Jan 27, 2008
gp Script's author

krmichal,

Thank you for the bug report and the useful screenshot.

I modified the script. Please reinstall and the problem should be gone.

 
Jan 27, 2008
krmichal User

I realy love that script!
I found only one little problem: it won't show me the ">>npc" link when, for example, I'm low on crop and it has "minus" production per hour. Generally link ">>npc" won't show, when the predicted time to get needed resources (without using npc)is "never".
I made a screenshot with description of this problem, which should make it more clear :)
http://www.users.pjwstk.edu.pl/~s2551/foto/npc.png

 
Jan 24, 2008
gp Script's author

Guinness,

Actually, if you use Plus, you can create the shortcut yourself without using any script. There's a "custom links" feature if you go to your profile and then to preferences. Just put in the URL for the instant building (copy it from the usual place, should look something like this: http://sX.travian.XX/plus.php?id=3&a=7&uid=XXX), give it a name, save, and you're all set.

 
Jan 23, 2008
Guinness User

yeah i tought you'd say that... cuz its purpose isnt overall plus... but i imagined it wouldn't be that hard...

 
Jan 23, 2008
gp Script's author

Guinness,

This script isn't meant as a general Plus/Gold enhancer, it's strictly about using the NPC merchant, so I'm reluctant to bundle features that don't belong. But I'll think about it.

 
Jan 23, 2008
Guinness User

Hey... great script... working with plus is much easier now... but you know what would be great. to have a shortcut to the plus function thats builds in that instant,,,

 
Jan 18, 2008
gp Script's author

There's a new version of the script, which fixes several bugs.

The infinity symbol is now shown as the time saving estimate if you have zero or negative crop production.

 
Jan 17, 2008
gp Script's author

Version 0.8 introduces a new feature: an estimate of the time that would be saved by using the NPC merchant. This helps you spend your gold wisely. For instance, there's normally no point in using the NPC merchant if you're going to have all the right resources within the hour (if this is the case, the time saved will be shown in red).

Another change along the same line is that the NPC link will not be shown anymore when the upgrade option is already available.

I hope you find this useful.

 
Jan 6, 2008
gp Script's author

There used to be a bug affecting the return link shown after an NPC trade. I fixed it in the new version (0.73). These are all releases fixing small bugs. If the releases are too frequent for you, you could just fetch the ones that introduce new functionality.

 
Jan 5, 2008
gp Script's author

vBm, thanks. :)

 
Jan 5, 2008
vBm Scriptwright

one of the active script devs :)

really nice job qp ;)

very usefull script imo ... tnx for that :)

 
Jan 5, 2008
gp Script's author

Traps currently being built or repaired in the Gallic Trapper weren't properly counted, so the max number was incorrect. Version 0.72 fixes that. At least I think it does. Couldn't really test, damn traps build too quickly.

 
Jan 4, 2008
Guinness User

great... its working now =)

 
Jan 4, 2008
gp Script's author

Oops! Got it, fixed it. Please reinstall.

 
Jan 4, 2008
gp Script's author

Guinness,

I don't know anything about the Teutonic barrier. Where does the error occur?

You could comment on this script if you were logged in.