MyTractor

By dlogan Last update Jul 26, 2009 — Installed 8,508 times.

Problems

in
Subscribe to Problems 69 posts, 13 voices



freshvp Scriptwright

When I click the save button, nothing happens. The button is depressed but the logon box stays on the screen and never submits anything to traviantractor. Any ideas?

 
dlogan Script's Author

Its doing what its suppose to do for now. The credentials are saved, and if you log into TravianTractor.com you should see the report submitted. It doesn't actually give you any confirmation it saved the credentials, but it is done.

I am presently working on an interface that will make it clearer what is going on behind the scenes and has the username/password hide after its filled out. This should help avoid any confusion and make this even clearer. You should expect a new version with these updates within the next 4-5 days.

In the meantime enjoy the functionality of the script, though the annoying blue box that doesn't go away. In not much longer it will be both pretty and functional.

 
freshvp Scriptwright

I've tried from 2 computers, and it is not submitting to traviantractor. I submitted a report manually to make sure my acct is active. I've double-checked the login and password. Still, not submitting. The error console reports nothing on MyTractor.

 
dlogan Script's Author

Which version of the script are you running?

 
freshvp Scriptwright

.87

 
dlogan Script's Author

You can check the error console "Tools -> Error Console" and see if you find any error messages in it.

Otherwise I will try and put more debugging functions into the next release to track what is going on. Its a relatively simple plugin, so there isn't too much to go wrong. I do know I have at least 10 people on US s3.travian.us and s8.travian.us that are using this and its working fine.

Are you perhaps using a server in another language, or a speed server?

 
freshvp Scriptwright

I've watched the error console. It doesn't report anything about MyTractor. I've disabled all other scripts, as well as adblocker. Also, when I use the regular quick travian tractor script, I get, "could not understand report" error from traviantractor.com. Hmmm...

I'm playing on s6.com, english.

 
dlogan Script's Author

That is strange. Maybe something is messed up with your TravianTractor account?

Anyway, I have the improvements making it clearer what pages the report is submitted on, and what it is not. The ugly blue logon box is gone.

Unfortunately with the way TravianTractor is coded it is difficult to trap a failed logon so the icon still might show it submitted when it did not because of invalid input or a failed logon.

I will be working on this issue when I add the additional logging stuff (next improvements).

 
-Lori User

Hello DLogan! First I have to say this is a great little script! My only issue is trying to remember to stay on the report page long enough for the report to go through :P

But I do have an issue, and I figured I'd let you know what it was and how I fixed it.

So I use Travian 3 Beyond Hacked FR plus your script. In the marketplace I was unable to use the Beyond script functionality to send resources (i.e. Clicking (Max) to automagically put in the maximum amount of resources for each resource for the number of merchants I have available.) So what I did to fix this was, exclude your script from running on any http://*.travian.*/build.php* building page. This solved the problem, and hopefully if anyone else runs into this issue, it'll solve it for them as well.

Thanks!

 
dlogan Script's Author

Lori,
FYI, you can probably close the page sooner than the icon change. The icon actually changes after its done receiving the entire page from submitting the report.
In any case what I do is right-click on the battle-report and choose to open it in a new tab. It makes it MUCH easier to go through all the reports really quickly. I then go to the new tabs and look at them as I close them. However, by then the report has long been submitted.
I will take a look at that issue on the max number of merchants. I use the M&N version of Beyond3 script and I haven't noticed an issue, but I haven't tried that functionality recently and I do have a slightly different version. It probably has something to do with the layers of the items on the page :-).

 
dlogan Script's Author

Interesting, it works fine in my version of Beyond3 (M&N), maybe I'll try installing that other version later today and see what they're doing differently.

 
-Lori User

Yeah the issue is with this script:

http://userscripts.org/scripts/show/26429

And I actually just changed my allow to: http://*.travian.*/berichte.php* rather then http://*.travian.*/

Now the pages load faster since I'm not trying to load two scripts for each page and I don't run into the marketplace issues.

 
-Lori User

I would love if you could incorporate some more things into the battle report pages "berichte." What I'm missing the most is the battle analysis found in the Travian Beyond Hacked FR script and the quick Travilog report feature also in Travian Beyond Hacked FR script.

Any plans on incorporating that stuff in?

Thanks,

Lori

 
dlogan Script's Author

I hadn't really planned on expanding the functionality of this script much beyond working with TravianTractor, though I might add additional functionality with TravianTractor (e.g. Raiding list in side panel bar).

My opinion has been "Why duplicate what other people are doing?" There is no harm in running more than one script, as a result I haven't seen the need to add additional functionality covered elsewhere into this script.

Is there any particular reason you would like that functionality in this script?

 
freshvp Scriptwright

I uninstalled firefox, deleted dirs. reinstalled firefox, greasemonkey, and mytractor. made a new traviantractor acct, with a shorter username... still, it doesn't wanna' submit. checking the error console reveals 1 error...

Error: playerLinks.snapshotItem(1) is null
Source file: file:///C:/Documents%20and%20Settings/Administrator/Application%20Data/Mozilla/Firefox/Profiles/0yt79688.default/extensions/%7Be4a8a97b-f2ed-450b-b12d-ee082ba24781%7D/components/greasemonkey.js
Line: 495

This error occurs only while scrolling through the report pages. (berichte.php?s=*) No errors are listed while actually viewing the report itself. (berichte.php?id=*)

Once i was able to get an xpath error but I cannot seem to reproduce it now. I'm stumped as to why it's not working. Can I add more logging somehow?

 
dlogan Script's Author

Ok, lets see if we can do this :-)

If you're not already at version .90, get to version .90.

1) If you view a report (it says it submitted it), and you then click on the icon for the link to TravianTractor, does it take you to a logon page, or does it take you directly in?

If it takes you to a login page, your login isn't happening properly. If it takes you into TravianTractor then we know that you are logging in.

2) If you're logging in then let's see what you're submitting. (If you're not, don't worry about these steps yet.)

View the source code for the plugin and find the following line in the "submitReport" function:
var strRpt = parseBattleReport(0);

Right after it add:
GM_log(strRpt);

This line takes the data right before its submitted to TravianTractor and outputs it to the error console.

Once this is added, save the changes and go to a battle report. Open up the error console and clear all the contents, then refresh the page.

Copy and paste what shows up in the error console for the battle output into this forum so we can see what you're submitting.

 
freshvp Scriptwright

1) Takes me directly in.

2) dlogan/MyTractor: Subject: imaraider attacks imafarm
Sent: on 09/02/08 at 11:21:48 o'clock

Attacker me from the village imaraider
[Maceman] [Spearman] [Axeman] [Scout] [Paladin] [Teutonic Knight] [Ram] [Catapult] [Chieftain] [Settler]
Casualties 0 0 0 0 0 0 0 0 0 0
Bounty 48 48 48 27

Defender them from the village imafarm
[Maceman] [Spearman] [Axeman] [Scout] [Paladin] [Teutonic Knight] [Ram] [Catapult] [Chieftain] [Settler]
Casualties 0 0 0 0 0 0 0 0 0 0

3) seems that it's missing my troop count?

 
dlogan Script's Author

Ah ha! I think your time format is messing it up.

Can you change your time to US Format? This could be why you can't copy & paste even with the web browser.

e.g. Here is an example of my report right before its submitted:
dlogan/MyTractor: Subject: dlogan attacks TakeMyResources
Sent: on 04/09/09 at 08:31:39 am

Attacker dlogan from the village dlogan
[Phalanx] [Swordsman] [Pathfinder] [Theutates Thunder] [Druidrider] [Haeduan] [Battering Ram] [Trebuchet] [Chief] [Settler]
Units 20 0 0 0 0 0 0 0 0 0
Casualties 0 0 0 0 0 0 0 0 0 0
Bounty 73 154 74 46

Defender Newbie from the village TakeMyResources
[Legionnaire] [Praetorian] [Imperian] [Equites Legati] [Equites Imperatoris] [Equites Caesaris] [Ram] [Fire Catapult] [Senator] [Settler]
Units 0 0 0 0 0 0 0 0 0 0
Casualties 0 0 0 0 0 0 0 0 0 0

 
freshvp Scriptwright

Argh, I was hoping that was it. Changed time to US format and i'm still getting the same result.

dlogan/MyTractor: Subject: me attacks them
Sent: on 04/09/09 at 07:33:26 am

Attacker me from the village them
[Maceman] [Spearman] [Axeman] [Scout] [Paladin] [Teutonic Knight] [Ram] [Catapult] [Chieftain] [Settler]
Casualties 0 0 0 0 0 0 0 0 0 0
Bounty 122 47 150 95

Defender them from the village them
[Maceman] [Spearman] [Axeman] [Scout] [Paladin] [Teutonic Knight] [Ram] [Catapult] [Chieftain] [Settler]
Casualties 0 0 0 0 0 0 0 0 0 0

 
dlogan Script's Author

Ok, if you just copy & paste out of the webpage is it still failing when submitting to TravianTractor.com?

Can I get you to do a view source on the battle report and grab the output from the entire battle report table?:
table cellspacing="1" cellpadding="2" class="tbg"

to
/table

Apparently it doesn't like pasting HTML in here :-(.

Can you e-mail it to:
doug at the host dlogan with the traditional "com" ending.

 
freshvp Scriptwright

1) Regular copy and paste works ok.

2) email sent. =)

 
dlogan Script's Author

The issue was with a - (dash) in the village name.

I could reproduce the problem when I renamed my village.

I will have to go through the code sometime tonight and see if I can figure out why it doesn't like dashes. There might in fact be other characters it also doesn't like.

 
dlogan Script's Author

ok, apparently I was wrong.

The issue was the "Troops" usage instead of the standard "Units".

I believe I've added code to handle this, can you test and verify?

 
freshvp Scriptwright

Thats it! You fixed it! Working great now. Thanks a lot dlogan! The tractor icon never fully goes green but thats no problem at all. Thanks again!! =)

 
dlogan Script's Author

hehehe, its not suppose to all go green.

That is my attempt at artwork :-).

You get green rolling hills, and smoke comes out of the tractor to show you're farming.

BTW, I'm working on a fix for your Beyond3 issue with the marketplace. I will hopefully have something out soon.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel