Posted on 20 March 2008 by Mike
Travian Bots, Travian Cheats
After some time playing you can encounter a problem that you need wait a lot of time to build something. At the same time, you can gain resources much more quickly. And the problem is that you will need always check your browser for a building status. That’s where travian bot can take a place. You just will need to put some queue together and leave your computer alone. The bot will done your work.
The good thing is, that such bot for travian isn’t exactly a cheat. It just simulate user work by generate browser requests to check resources and start build things. Not so good thing is that it’s written in Ruby and you’ll need an interpretor for it. Although that isn’t a real problem on any OS at the moment.
How to install and use the bot
- Download and install bot
- Configure bot
Edit travian.rbYou have to change the MAIN_URL and the name of the cancel-button in Settings part of the file. You also can get bot to work at night and change it sleeptime (how often it check the status)
- Run the bot
Windows- Start > Run > ?cmd?
- change directory to your travianfolder. For example: cd c:\programs\travianbot\
- ruby travian.rb [username] [password] [id.id.id.id] [villageid]
[id.id.id] means you can add as many build ids as you want. Seperated by a point. The photo below shows the id of each field (1-18). The ids for the buildings are 19-36.
Mac and Linux
Just open Terminal otherwise than cmd and do the same actions - Enjoy!


April 6th, 2008 at 11:34 pm
well… this program doesn´t work…
alway is it like “(!!) error cannot authorize ” and i am pretty sure I wrote datas correct..
have anyone experienced same problem?
April 7th, 2008 at 7:56 am
I’m sure it was working but I’ve tried it 3-4 month ago.
April 11th, 2008 at 9:43 pm
It does realy work! Nice job!
April 15th, 2008 at 2:15 am
how can i install this? the guidelines above are so confusing
April 23rd, 2008 at 9:45 pm
>Exit code: 1
>ruby travian.rb
– Error: less arguments ——-
usage: travian.rb username passwd buildqueue dorfid
>Exit code: 1
what do i do?
April 25th, 2008 at 2:05 am
When I try to use it, the lil window just exits itself.
May 1st, 2008 at 2:16 pm
i need a better tutorial because i dont understand this right
when i go to execute it only leeds me to the documents and settings folder and only from there i can search the travian folder
i thenk i ve done all right unless that
(sorry for my english)
May 1st, 2008 at 2:26 pm
please help me
May 8th, 2008 at 2:21 am
What should i change the image name to?
May 12th, 2008 at 5:21 pm
same problem as peter -.-
May 12th, 2008 at 5:54 pm
yo it dosnt work i tried but it wont
May 26th, 2008 at 2:27 am
Try in this way :
Sample -
ruby travian.rb name password 1.4.6.8 ‘Name of your city’
DO NOT USE IN THIS WAY (see below)!!!
ruby travian.rb name password 1.4.6.8 Name of your city
because name is string !!!
May 30th, 2008 at 11:05 pm
why didnt working?
June 1st, 2008 at 7:01 pm
why it doesnt work? i tried so many times… can anybody explain
June 1st, 2008 at 7:38 pm
Probably you’re making something wrong guys. It works fine on my linux at the moment.
June 4th, 2008 at 6:59 pm
It works!!!! only follow the instructions!! dont forget to chance the MAIN_URL to your travian-server
June 6th, 2008 at 3:28 pm
it works fine with me , thanks a lot
June 13th, 2008 at 7:02 am
travian just got 10x easier, tytyty
June 14th, 2008 at 7:09 am
how do you build buildings?
June 19th, 2008 at 11:49 am
C:\Dokumente und Einstellungen\Falk\Desktop\travianbot1-1>ruby travian.rb Falkii
i *** 18 0
./ymhtml.rb:586:in `parseDTD’: DOCTYPE parse error: “!DOCTYPE” (YmHTML::ParseErr
or)
from ./ymhtml.rb:913:in `parse’
from travian.rb:136:in `authorize’
from travian.rb:384
from travian.rb:375:in `each’
from travian.rb:375
please help me orangenlimonade@gmx.de
icq 284366664
June 20th, 2008 at 4:21 pm
Since a few Days I have the same Problem as Falki - before the script worked just Fine !
I cannot figure out, what error the ymhtml.rb parser means, i downloaded a newer version on http://www.yoshidam.net/Ruby.html, but it didnt help!
If anyone has a clue, please help ! The script is the best one for automated building queues right now
June 22nd, 2008 at 5:23 pm
I also recieved
(!!) error cannot authorize
June 22nd, 2008 at 5:26 pm
(!!) error cannot authorize
^ ^ ^ ^
This is becuase for some reason .us is not able to be ‘botted’ yet…
June 25th, 2008 at 11:26 pm
./ymhtml.rb:586:in `parseDTD?: DOCTYPE parse error: ?!DOCTYPE? (YmHTML::ParseErr
or)
from ./ymhtml.rb:913:in `parse?
from travian.rb:136:in `authorize?
from travian.rb:384
from travian.rb:375:in `each?
from travian.rb:375
i have this error
June 27th, 2008 at 1:55 pm
dear i have this problem can any one help me pls>>>
./ymhtml.rb:586:in `parseDTD’: DOCTYPE parse error: “!DOCTYPE” (YmHTML::ParseErr
or)
from ./ymhtml.rb:913:in `parse’
from s15.rb:181:in `authorize’
from s15.rb:430
from s15.rb:421:in `each’
from s15.rb:421
June 28th, 2008 at 1:32 pm
dudes…when i start travian.rb the window closes itself..
why does it do that…iv’e followed all the instructions :S
June 28th, 2008 at 5:06 pm
!! I think I have a solution !!
– But pls use it at your own risk for i am not a professional programmer–
1. download newest version of ymhtml.rb from http://www.yoshidam.net/diary/ymhtml.rb-0.1.13
2. make a backup copy of ymhtml.rb-0.1.13 and rename it to “ymhtml.rb”. (Overwrite the older version delivered with the original script)
3. Edit the ymhtml.rb and go to line: 586
[if (token = nextToken) != '<!DOCTYPE'] should be changed to [if (token = nextToken) != '!DOCTYPE']
4. Save the file and try the bot script authentification
For me, this worked perfectly, because the Error did not occur in the authentification process in travian.rb, but in the parsing module in ymhtml.rb, as seen above.
Try it and good Luck !
June 30th, 2008 at 1:02 pm
Hi Mike,
Its glad to see you like my travianbot. But please don’t set a direct link to the download. You can provide your visitors a link to the travianbot homepage:
http://pawnee.wordpress.com/travian-bot-building-queue/
thanks,
pawnee
June 30th, 2008 at 2:31 pm
Hi Pawnee.
I change the link as you wanted =)
August 3rd, 2008 at 5:30 am
this is a bad
August 4th, 2008 at 12:41 am
It seems to log in ok, but then will time out after a few hours without building. Will try again and post the error, but any ideas?!?!?!
August 4th, 2008 at 2:21 pm
c:/ruby/lib/ruby/1.8/net/http.rb:564:in ‘initialize’:A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. -connect(2) (Errno::ETIMEDOUT)
etc
etc
any ideas about this error msg?!?!?!?!
August 10th, 2008 at 7:47 pm
sorry for English, but this bot need to plan buildings to be constructed? does not work with the PC turned off?
I have a problem in the functioning of bots, gives me the error file ymhtml.rb
What should I do? please reply
August 11th, 2008 at 10:04 pm
hi, is this a free program?
must i buy this program or is this free??
September 17th, 2008 at 6:06 am
I tried this* one time and it worked…
but now im with the same problem again…
*this:
!! I think I have a solution !!
? But pls use it at your own risk for i am not a professional programmer?
1. download newest version of ymhtml.rb from http://www.yoshidam.net/diary/ymhtml.rb-0.1.13
2. make a backup copy of ymhtml.rb-0.1.13 and rename it to ?ymhtml.rb?. (Overwrite the older version delivered with the original script)
3. Edit the ymhtml.rb and go to line: 586
[if (token = nextToken) != '<!DOCTYPE'] should be changed to [if (token = nextToken) != '!DOCTYPE']
4. Save the file and try the bot script authentification
For me, this worked perfectly, because the Error did not occur in the authentification process in travian.rb, but in the parsing module in ymhtml.rb, as seen above.
Try it and good Luck !
—————–
what am i supposed to do now?? this dont work anymore
September 17th, 2008 at 6:07 am
??
September 26th, 2008 at 11:47 pm
// ==UserScript==
// @name Ikariam Building List
// @namespace http://www.dokislogeek.net
// @description Fast Buildings info and access in city view, Ressources Level on Island view
// @include http://*.ikariam.*/*
// ==/UserScript==
/* Options and Styles */
css=’#reslvl {\
margin:2px 10px;\
}\
#reslvl span {\
float:left;\
width:90px;\
}\
.build{\
background-color:transparent;\
font-weight:normal;\
}\
.build span{\
color:black;\
}\
.build a{\
text-decoration:none;\
}\
.build:hover {\
background-color:#92e192;\
font-weight:bold;\
}\
.buildup{\
background-color:transparent;\
font-weight:normal;\
}\
.buildup span{\
color:red;\
}\
.buildup a{\
text-decoration:none;\
}\
.buildup:hover {\
background-color:#FFC2F3;\
font-weight:bold;\
}\
.buildmax{\
background-color:transparent;\
font-weight:normal;\
}\
.buildmax span{\
color:grey;\
}\
.buildmax a{\
text-decoration:none;\
}\
.buildmax:hover {\
background-color:#C1FAFF;\
font-weight:bold;\
}\
.buildname{\
float:left;\
width:80%;\
}\
‘;
/* End of Options and Styles */
/* function to add style */
function addGlobalStyle(css) {
var head, style;
head = document.getElementsByTagName(’head’)[0];
if (!head) { return; }
style = document.createElement(’style’);
style.type = ‘text/css’;
style.innerHTML = css;
head.appendChild(style);
}
/* function to set some language related options according to domain extension */
function setDomainOpts(){
var split1 = location.href.split(’ikariam.’);
var split2 = split1[1].split(’/');
var ext = split2[0];
var opts = new Array();
opts['ext'] = ext;
if ( ext == ‘fr’ ){
opts['lvl'] = ‘ Niveau’;
}
else if ( ext == ‘de’ ){
opts['lvl'] = ‘ Stufe’;
}
else if ( ext == ‘com’ ){
opts['lvl'] = ‘ Level’;
}
else if ( ext == ‘es’ ){
opts['lvl'] = ‘ Nivel’;
}
else if ( ext == ‘gr’ ){
opts['lvl'] = ‘εÏ?ίÏ?εδο’;
}
return opts;
}
opts = setDomainOpts();
/* Embedded functions http://wiki.greasespot.net/Code_snippets#Embed_a_function_in_the_current_page*/
function embedFunction(s) {
document.body.appendChild(document.createElement(’script’)).innerHTML=s.toString().replace(/([\s\S]*?return;){2}([\s\S]*)}/,’$2′);
}
function showBuilding(obj) {
var pos = obj.href.split(’position=’);
var pos1 = ‘position’+pos[1];
document.getElementById(pos1).style.border = ‘4px solid red’;
}
embedFunction(showBuilding);
function hideBuilding(obj) {
var pos=obj.href.split(’position=’);
var pos1=’position’+pos[1];
document.getElementById(pos1).style.border = ”;
}
embedFunction(hideBuilding);
/* Island View */
if( document.getElementById(’island’) ){
addGlobalStyle(css);
ifeatures = document.getElementById(’islandfeatures’).getElementsByTagName(’li’);
w = ifeatures[0].className.split(’ ‘);
woodlevel = w[w.length - 1].replace(’level’,”);
wn = ifeatures[0].getElementsByTagName(’span’);
woodname = wn[0].innerHTML;
r = ifeatures[1].className.split(’ ‘);
ressourcelevel = r[r.length - 1].replace(’level’,”);
rn = ifeatures[1].getElementsByTagName(’span’);
ressourcename = rn[0].innerHTML;
var leftbox, newElement;
leftbox = document.getElementById(’actioncontainer’);
if (leftbox) {
var rdiv = document.createElement(”div”);
rdiv.innerHTML = ‘ \
Ressources \
\
\
\
‘+ woodname + ‘: ‘ + woodlevel + ‘ \
\
‘ + ressourcename + ‘: ‘ + ressourcelevel +’ \
\
\
\
‘;
leftbox.parentNode.insertBefore(rdiv, leftbox.nextSibling);
}
}
/* City View */
if( document.getElementById(’city’) ){
addGlobalStyle(css);
table = document.getElementById(’mainview’).getElementsByTagName(’a');
var table1 = new Array();
var torder = new Array();
var tclass = new Array();
var lmax = new Array(); /* array with buildings max level, according to Ikarariam Help*/
lmax['academy'] = 16;
lmax['embassy'] = 16;
lmax['workshop-army'] = 24;
lmax['safehouse'] = 20;
lmax['barracks'] = 24;
lmax['shipyard'] = 16;
lmax['branchOffice'] = 16;
lmax['warehouse'] = 16;
lmax['townHall'] = 24;
lmax['wall'] = 24;
lmax['museum'] = 8;
lmax['port'] = 16;
lmax['palaceColony'] = 4;
lmax['tavern'] = 16;
lmax['palace'] = 4;
for(i = 0; i < table.length; i++){
t=table[i].title;
if( !isNaN(t.charAt(t.length - 1)) ){
table1[table[i].title] = table[i].href;
torder.push(table[i].title);
tclass[table[i].title] = table[i].parentNode.className;
}
}
torder.sort();
titles = ”;
for ( i = 0; i = lmax[tclass[torder[i]]]) {
titles += ‘ \
\
‘ + b[0] + ‘ \
‘ +b[1]+’ \
\
‘;
}
/* If building is upgrading */
else if (u && u[0].className == ‘constructionSite’){
titles += ‘\
\
^ ‘ + b[0] + ‘\
‘ +b[1]+’ ^\
\
‘;
}
/* else ^^ */
else {
titles += ‘\
\
‘ + b[0] + ‘\
‘ +b[1]+’\
\
‘;
}
}
titles = titles + ”;
e=document.getElementById(’information’).getElementsByTagName(’div’);
e[0].innerHTML = e[0].innerHTML + titles;
}
October 29th, 2008 at 6:03 pm
i tried this script and it doesn’t work, because my internet connection using proxy, so i do a little modification in file : travian.rb
line 56
#static Settings
PATH_LOGIN = ‘/login.php’ #PATH_LOGIN = MAIN_URL + ‘login.php’
PATH_DORF1 = ‘/dorf1.php’ #PATH_DORF1 = MAIN_URL + ‘dorf1.php’
PATH_DORF2 = ‘/dorf2.php’ #PATH_DORF2 = MAIN_URL + ‘dorf2.php’
PATH_BUILD = ‘/build.php’ #PATH_BUILD = MAIN_URL + ‘build.php’
line 86
#new connection
url = URI.parse(MAIN_URL)
http = Net::HTTP.new(url.host, url.port,’myproxy_addr’, myproxy_port) #http = Net::HTTP.new(url.host, url.port)
and now it works
@sinyosaja-mangan ora mangan asal kumpul@
December 5th, 2008 at 11:49 pm
when i try to run ruby travian.rb [username] [password] [id.id.id.id] [villageid] ruby just opens the script…
when i want to press “GO” by tools nothing happens
December 6th, 2008 at 12:57 am
ok…
i got it running…i took the modification form sinyosaja because i’m using proxy… but this didn’t work…
when i took the normal version the programm is starting but gets a html error while authorizing…this is the same by the autoversion…
i think it’s because the programm can’t access the inet…
does somebody have an scrip for proxy that works? I’m using phproxy for surfing…
December 8th, 2008 at 11:49 pm
ok… i rewrote the complete script *puhhh*
to work with phproxy…
but when i want to start, it says:
./ymhtml.rb:588:in ‘parseDTD’ : DOCTYPE parse erro: “<!DOCTYPE”
from ./ymhtml.rb:915:in ‘parse’
from travian.rb: 136: in ‘authorize’
from travian.rb:384
from travian.rb:375:in ‘each’
from travian.rb:375
i tryed “HH” ’s methode,too, but it’s a although the same error…
i hope somebody can help me