Jump to content

Travian


Jex
 Share

Recommended Posts

Just wanted to comment, its interesting watching your guys progress.

I personally have written a bot that is really advanced in autoit for this game and its always cool to see what im doing vs what you guys are doing.

Just wanted to drop by and say dont lose hope, there are really really good autoit scripts for this game, you just need to keep working on them!

Link to comment
Share on other sites

  • Replies 180
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Hi Sherkas!

I found this page while googling on the internet. i had no idea about autoit, but i had some backgroung in programing other language, and autoit is very simple and fun.

are you planning on showing some screenshots, or maybe release some code examples. I see a lot of people made his own bot, and i dont ask them to release.

@ all the people that build his own bot.

I have this problem in my head. how do you store data of all villages?

I mean, I have all data in variavels, but they are local, to the current village. how can I store them so I can manage the data, (e.g. when looking for a village with clay, or reinforcements)

Should I use an array? DIM array? any suggestion should be wellcome, especially from the experients ones.

@Jokke

For $x = 0 To 17

check_id($x)

Next

This is using a _IENAVIGATE. it can be detected very easy with a query. I dont recomend using that, instead, find the formula of the data you need. I think that you are using that to get the actual production of the field, right?

respect, Linux

Edited by Linux
You can help! Donate to AutoIt! or, visit ClimatePREDICTION.netMy posts:Travian Bot Example (100+ servers) BETAHow to Host you code/app for free! (unlimited team number) (Public or Private)"Sir, we're surrounded!" "Excellent. We can attack in any direction!"
Link to comment
Share on other sites

Just wanted to drop by and say dont lose hope, there are really really good autoit scripts for this game, you just need to keep working on them!

Do u have any idea what's nice to script ?

I have this problem in my head. how do you store data of all villages?

I dond't have more than 1 village yet but, i think i will store all the data in ini files. 1 ini file per village.

EDIT :

:D WTF with autoit ... 4.02 - 4 = 0.01999999996 :P;):P

Try it ...

Edited by pollop
Link to comment
Share on other sites

EDIT :

:D WTF with autoit ... 4.02 - 4 = 0.01999999996 :P;):P

Try it ...

ConsoleWrite("4.2 - 4 = " & 4.2 - 4)

no problem here. no idea why you get that value.

You can help! Donate to AutoIt! or, visit ClimatePREDICTION.netMy posts:Travian Bot Example (100+ servers) BETAHow to Host you code/app for free! (unlimited team number) (Public or Private)"Sir, we're surrounded!" "Excellent. We can attack in any direction!"
Link to comment
Share on other sites

OMG! this is scary! :S

ConsoleWrite("4.02 - 4 = " & 4.02 - 4 )

Edit: Why dont you open a topic with this case? this should NEVER happen!

Edited by Linux
You can help! Donate to AutoIt! or, visit ClimatePREDICTION.netMy posts:Travian Bot Example (100+ servers) BETAHow to Host you code/app for free! (unlimited team number) (Public or Private)"Sir, we're surrounded!" "Excellent. We can attack in any direction!"
Link to comment
Share on other sites

Olá Tuga!

the version is current 2.3. I released my 1.2 PT code in page nº 2.

I will never release the version 2.3, but I can try to help in case you begin your own bot.

take a look, its able to spend all resources in upgrading resources.

Respect, Linux

You can help! Donate to AutoIt! or, visit ClimatePREDICTION.netMy posts:Travian Bot Example (100+ servers) BETAHow to Host you code/app for free! (unlimited team number) (Public or Private)"Sir, we're surrounded!" "Excellent. We can attack in any direction!"
Link to comment
Share on other sites

Yo it is i again. :P

Working on travian login and not getting there. :D

I made the one that cliks and puts name and password and then moves mouse over the button and clik it. Change screen resolution you are fu... Close screen you are fu...

So i tried made like this http://quadryders.com/phpcc/snippet.php?sid=1 but i don t quite understand the coding. So any explanation of the code in link or hint how to made login wolud be really appriciated. I must learn for exam but not before i understand this part of my bot. ;)

Be cool be travian. :P

Link to comment
Share on other sites

Start the program navigating to /dorf1.php

If the source page contain 'Thank you for your visit' or 'the cookie will be deleted at the end of every session'

then

You need to login

if (Login data(already filled form) <> user data) then You should insert login data

Submit form

End if

If Initial message (holidays message, chistmas, etc) is detected, save message to a file, and click Continue

Then search for the string in the uper left of the page, something like 'Page calculated in: xx ms'

If the page dont contains that string, then something was wrong

if the page contains 'Nickname dont exist' then

Nickname error

else

Password Error

endif

If you have any doubt then

check the script i posted in page 2

If still with doubts, post here :D

You can help! Donate to AutoIt! or, visit ClimatePREDICTION.netMy posts:Travian Bot Example (100+ servers) BETAHow to Host you code/app for free! (unlimited team number) (Public or Private)"Sir, we're surrounded!" "Excellent. We can attack in any direction!"
Link to comment
Share on other sites

What I used in a multidemensional array for all my variables.

I start the script by getting all the info it needs, then it works off of that.

Eg. $resource[$city][4][3] ([$city = array value of city][1-4 for resource (1 = lumber)][1 = current amt of resource, 2 = per hour, 3 = max hold]

So something like that, if you had 4 cities you could check how much the 2nd city has of clay if you needed by calling: $resource[1][1][0]

I used arrays like that for cities since each city has its own data. To do a bot like this you should know how to use arrays well as it saved me ALOT of hassles and managing of data it gets.

For some ideas heres what my bot does atm:

-Has a build in resource management system so you can build on a ratio of 75% military, 20% resource fields and 5% structures if you want.

-It has full resource field construction based on ratios or max levels of fields. It includes protection so crop cant drop below a users specific amount (if they want)

-a list of all structures in which the user just specifics a max level and a priority and the bot will build/upgrade that build in its priority listing compared to other structures. It also allows you to use plus account instant build on any structures level u choose

-Has a military page where it can build any number of troops in any minimum or maximum amount.

-Has a marketplace section where it will send resources to any city (yours or x/y) of any amount at any time you want/wish.

-Has plus features so you can every so often use gold to balance your resources in any ratio you want apon any detected level of resources

-Has auto login, maintaince protection (it does happen!), eventjam watcher (when it gets higher it slows down the bot and allows it to wait longer for page loading)

Theres a few more features like page remaking (gives you extra links and whatnot if you want) and some other secret guild only stuff (attack related) but thats the whole of the bot and what I think everyone could ever want in one?

So if you guys need ideas you can work off that list. I currently have 100+ users using my bot (all private guild) so i get alot of feedback on what users want.

Edited by sherkas
Link to comment
Share on other sites

Like I was planning. but the problem os multi-dimension array, is that its easy to break you head with the code.

You can help! Donate to AutoIt! or, visit ClimatePREDICTION.netMy posts:Travian Bot Example (100+ servers) BETAHow to Host you code/app for free! (unlimited team number) (Public or Private)"Sir, we're surrounded!" "Excellent. We can attack in any direction!"
Link to comment
Share on other sites

Yep, just write it out. Thats how I did it for the arrays.

eg. $resourceamounts[$city][4][3] ; $city = city number, 0-3 = resource type (lumber-crop), 0-2 = income/perhour/max

then everytime I use it, i bring hte comments to.

eg. ;$resourceamounts[ city 3 ][ iron ] [ maximum amount ]

eg. if ( $resourceamounts[3][2][2] > 200 ) then

but ya... you can just do single demension arrays too if you arn't able to use the multi demensionals that easy

Link to comment
Share on other sites

hi

using arrays might work nicely , but wouldnt it be more efficient to use an sql DB now ?

it could also store all timer events ( when building is done / when troops are back. / when attack on city comes, eg..)

i also plan on storing the neighbor cities as growing or not - to find farm targets--

greetz n

Link to comment
Share on other sites

I will use arrays, thank you Sherkas!

For registing pop grow, etc, I will save the data in a INI file, then use it and make graphs, and other kind of treatment on the data.

I believe that SQL are good, but not for this case. but maybe im wrong.

Right now im working on getting SVN working (similar to CVS) and get translation to french.

You can help! Donate to AutoIt! or, visit ClimatePREDICTION.netMy posts:Travian Bot Example (100+ servers) BETAHow to Host you code/app for free! (unlimited team number) (Public or Private)"Sir, we're surrounded!" "Excellent. We can attack in any direction!"
Link to comment
Share on other sites

Start the program navigating to /dorf1.php

If the source page contain 'Thank you for your visit' or 'the cookie will be deleted at the end of every session'

then

You need to login

if (Login data(already filled form) <> user data) then You should insert login data

Submit form

End if

If Initial message (holidays message, chistmas, etc) is detected, save message to a file, and click Continue

Then search for the string in the uper left of the page, something like 'Page calculated in: xx ms'

If the page dont contains that string, then something was wrong

if the page contains 'Nickname dont exist' then

Nickname error

else

Password Error

endif

If you have any doubt then

check the script i posted in page 2

If still with doubts, post here :D

Thanks i made it. :P

But here i am posting some other part of my bot. I would like your opinion. ;)

This code is part of my bot (escape attack bot). What does it do?

It sends all your units in village to the city of your choice as reinforcments, waits 10s and then cancels the action.

Dont forget to put all necesary data in the begining of the script. :P

;it has no code for auto login, so you have to login on your account in IE before you run it
; it has been tested on .si and .com server and it works fine for me.

#include <IE.au3>
$link1 = "http://s1.travian.com/a2b.php";==> Link for the place where you send units (in com server rally point --> send troops)
$link2 = "http://s1.travian.com/build.php?id=39";==>Link of the rally point
$Citys = 0;==> Set the number of your cities. If you have only one set it to 0, if you have more set number of citys + 1.example:                                                                                           ;you have 4 citys number must be 5.
$aCity = "";==> Name of the city you sending reinforcment.
$img = "del.gif";==> Name of the red X you get to stop building.

$NumCitys = $Citys

$oIE = _IECreate ($link1)
$oLinks = _IELinkGetCollection ($oIE)
$iNumLinks = @extended

$iNumLinks = $iNumLinks - $NumCitys

$i=16
if $iNumLinks > 16 Then
Do
_IELinkClickByIndex ($oIE, $i)
    $iNumLinks = $iNumLinks - 1
    $i = $i + 1

Until $iNumLinks = 16
EndIf

$oForm = _IEFormGetCollection ($oIE, 0)
$num = 14
$oQuery = _IEFormElementGetCollection ($oForm, $num)
_IEFormElementSetValue ($oQuery, $aCity)
_IEFormSubmit ($oForm)
$oForm = _IEFormGetCollection ($oIE, 0)
_IEFormSubmit ($oForm)
Sleep(10000)
$oIE = _IECreate ($link2)
_IEImgClick ($oIE, $img)

Would like some feedback from other country servers becouse i am trying to make multinational bot for most of the languages. ;)

Be cool be travian. :P

Edited by dumbledor
Link to comment
Share on other sites

Well I am starting to work on a swedish version of this, Tough I am not that experienced on GUI and I don't got time to experiment with it.. The bot is done by about 80%, It supports multi villages, building queue for each village.. And today I will focus to get the attack sequence to work.. The server I play on is in the early stages and I don't need to send more than 10 soldiers at each village, And now I want it to select 10 sword fighters send it at one village, and keep track when its back so it don't send 10 soldiers to the same village 3-4 times in a row.

The bot is configurable by Ini's and at my stage, i only use ConsoleWrite for keeping track of action..

The bot got no track of time, so it only keeps alive trough checking..

and thats about it.. Ohh yeah, Thanks for the owner of this thread, I reused your code and made it suit my needs :D

My MSN is Aco@metafour.se

Link to comment
Share on other sites

Hello this scripts are amazing!

But can you post a .rar with the last version.

I sow the screenshot and i want this software!!!

Plase shring the full version! PLEASE!

TNKS!

Start learning auto it, we dont post whole code, just some bits and everyone are willing to help if you get stuck at some point and show you some solutions. We dont share bots becouse if everyone has it it ruins the game.

Make your own bot and have fun. :D

Be cool be travian. :P

Link to comment
Share on other sites

Agree! Get your Scite Editor, and start your own bot!

You have an example in page 2.

BTW, my example has now 60 downloads!

You can help! Donate to AutoIt! or, visit ClimatePREDICTION.netMy posts:Travian Bot Example (100+ servers) BETAHow to Host you code/app for free! (unlimited team number) (Public or Private)"Sir, we're surrounded!" "Excellent. We can attack in any direction!"
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...