Jump to content

Travian


Jex
 Share

Recommended Posts

hi everybody..

i'm new in travian and I don't know a lot about the scripts, but.. is it possible to make few times biger army and to make that the grain don't go to the minus? (i hope you understand what i'm asking and sorry for my english)

For that my friend you will have to hack into their servers, it is posible but they will find you if you are too gready. Here we make skripts that uses 24/7 time the best it can so you don t loose anything while you are sleeping or working. :D For double army find some hacker forum. :D

Be cool be travian.

Link to comment
Share on other sites

  • Replies 180
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

i don't care if they will cach me =] because i'll start play in other server very soon... just i really need to do that..but i have no idea how... :(i want to destroy my enemy. he's destroyd me... my pop was 5000 and after 1 night left only 200 pop....)

please if somebody know how to make few times bigest army or how to stop the grain going into minus ar stop the soldiers from dieing or other track ...please tell me.. :D

Link to comment
Share on other sites

i don't care if they will cach me =] because i'll start play in other server very soon... just i really need to do that..but i have no idea how... :(i want to destroy my enemy. he's destroyd me... my pop was 5000 and after 1 night left only 200 pop....)

please if somebody know how to make few times bigest army or how to stop the grain going into minus ar stop the soldiers from dieing or other track ...please tell me.. :D

If that happend you were building sim city, but like noobe said you are asking wrong questions on wrong forum. Sorry.

Be cool be travian. :D

Link to comment
Share on other sites

not sim city.. i play in 3x server (speed) i had 30k def in each village, but they have killed everything per one night...

by the way, i know it's wrong forum.. so thats way i asked // maybe somebody know and will tell me where can i find something... :D

Edited by asa
Link to comment
Share on other sites

First i want to thank Dumbledor for his evade script.

the evade function in my bot is based on his.

It works good, sends away the troops .... but i think i might someday get a problem that the bot will cancel the wrong troops, as it only clicks on the "del.gif" link, right?

What happens if my bot just sent away some troops to a farm and then decides its time to evade an incoming attack, it sends away all my troops as reinforcement to another village, but then when it should cancel it, i think there is a chanse it will cancel the wrong troops...

Does anyone have a solution for this?

Link to comment
Share on other sites

First i want to thank Dumbledor for his evade script.

the evade function in my bot is based on his.

It works good, sends away the troops .... but i think i might someday get a problem that the bot will cancel the wrong troops, as it only clicks on the "del.gif" link, right?

What happens if my bot just sent away some troops to a farm and then decides its time to evade an incoming attack, it sends away all my troops as reinforcement to another village, but then when it should cancel it, i think there is a chanse it will cancel the wrong troops...

Does anyone have a solution for this?

You are very welcome.

You specified very good point about del.gif. I just wanted to make simple and all language travian script. It was designed for guardian resons only, becouse i got really pissed off when some powerful jerk destroyed my small armies during my absence.

I just want to add few other bugs:

- it counts your reinforcements as an attack and sends the troops away

- it sends all your units away, so it leaves your village unprotected

- it works only for a name of a village so if the player changes the name bot doesn t work. (it happend and i lost 3000 soldiers :D)

Solutions, i am sorry no idea here, didn t program any further. Maybe in summer when i will have more free time. But based on other scripts i have see, works the best if you make it for the server language.

Good luck with your bot.

Be cool be travian. :D

Link to comment
Share on other sites

You are very welcome.

You specified very good point about del.gif. I just wanted to make simple and all language travian script. It was designed for guardian resons only, becouse i got really pissed off when some powerful jerk destroyed my small armies during my absence.

I just want to add few other bugs:

- it counts your reinforcements as an attack and sends the troops away

- it sends all your units away, so it leaves your village unprotected

- it works only for a name of a village so if the player changes the name bot doesn t work. (it happend and i lost 3000 soldiers :D)

Solutions, i am sorry no idea here, didn t program any further. Maybe in summer when i will have more free time. But based on other scripts i have see, works the best if you make it for the server language.

Good luck with your bot.

Be cool be travian. :D

I have fixed those three bugs in my implementation of this, (maybe not the second, but i can solve that,.. no need yet) another bug that you have in the original script is that it does not work if you have two attacks incoming at the same time to your village, because it checks for "» 1", and if you have two incomming attacks its "» 2" ofcourse..

I guess i could just make it click "del.gif" a couple of extra times and it should be solved...

Link to comment
Share on other sites

Zepx asked me for a tip, and i will share with you this, you can embede the IE window with the following code:

$Link = 'http://s1.travian.com'

$oIE = ObjCreate("Shell.Explorer.2") ; create the, explorer object.

$Breaktime = GUICtrlCreateObj($oIE, 400, 2, 700, 650) ; create the, embeded, object control, with that coords.

_IENavigate($oIE, $Link & "/dorf1.php")

_IELoadWait($oIE)

Do you still reference links in this window the same way you would if you just opened IE not embeded ?

i tried using

$sLinkText = _IEPropertyGet($oLink, "innerText")   
    If StringInStr($sLinkText, 'Upgrade') Then
        _IEAction($oLink, "click")
    EndIf

It did not matter what the text in 'Upgrade' was I tried using just about every possible link on the page, it appeared to be clicking but not inside the embeded IE window. Any help would be appreciated but I am new to this programming lark and the examples of reading links into arrays for accessing later are a bit too deep for a mere mortal like myself i like it as simple as possible so i can see what I am doing.

Thanks

Zephire

Link to comment
Share on other sites

I have a problem that when the travian server either logs me out or i cant connect to it, so IE shows a error page, the script tries to get a value from the html code and put it in a variable, and then when the script tries to use it it crashed because the variable does not have any data in it...

I think i have solved it by verifying that the page loaded by checking for different stuff on the pages before reading the html, or is there a better smarter way?

Link to comment
Share on other sites

I have a problem that when the travian server either logs me out or i cant connect to it, so IE shows a error page, the script tries to get a value from the html code and put it in a variable, and then when the script tries to use it it crashed because the variable does not have any data in it...

I think i have solved it by verifying that the page loaded by checking for different stuff on the pages before reading the html, or is there a better smarter way?

Hi there,

you can do this "secure" browsing by using a function i.e. Navigate() which checks state of ie or everything else you want to...

Instead of _IENavigate you use Navigate().

Use this if you want to check every page to be loaded.

If you only need to check it at the beginning of some "actions", just check once if your logged in at the beginning of your loop(s).

If the page is not available... _IENavigate will time-out (5 mins), therefore set an additional delay and check again - works fine for me. Even reconnect once a day in the early morning doesn't affect my script anymore.

Greetz, mrbijou

Link to comment
Share on other sites

  • 2 weeks later...

hi all!

I hope you are doing great progress.

I created a new topic to discuss my bot example. you can visit it here:

Travian Evolution Bot

Demo included for Members

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

  • 2 weeks later...

Hi there gents,

I must admit I am really enjoying writing this Travian code. I initially wrote mine in VBScript (and another version using WGET.EXE) but I found that all the code the Travian Team put in there to catch static URL's to difficult to duplicate (ie/ the FORM POST contained different keywords passed from previous pages, as well as values evaluated by Javascript, all this needed to be duplicated). using IE is SOOO much easier.

I am noticing some differences in the approaches and that might be because of my inital heave use of VBScript & Perl, that you guys don't appear to be using regular expressions, but rely on the HTML code to remain relatively static.

ie/ you check for a <b> 2332&nbsp<\b> to find resource per hour, but if the travian team ever change their HTML (which they could easily do on a daily basis and I am surprised they don't)

Whereas you can do something similar using Regular Expressions. For instance, you know the value will follow a HTML closing Tag > by a possible space \s*, some digits \d+, another space \s* or dividers &nbsp and eventually another HTML Tag starting with <

So you get something like:

$array = StringRegExp($body, '>\s*(\d+)(?:&nbsp)*[^<]<', 3)

(\d+) with the surrounding () will capture the number and return it, which is what you're after

(?:&nbsp)* is used to capture based on a group, there might be zero or more, but not return the value, since we don't need it

Other gems are:

$array = StringRegExp($body, '(\d+)/(\d+)', 3)

to find current resources, and the beauty is that it will find the match no matter where it is, or what format its in, or better yet

(\d+)[^\d/]*/(\d+)

The same applies for any 'scraping', especially Village names:

newdid=(\d+)

From there its a cinch, calculating your 'empire wide' resource/total and res per hour, parsing what resources are currently required to upgrade resource X (be it a field or a town) and using your merchants to ship the relevant resources where you need it.

I am currently working on the logic that priortises resources to level X, before the town buildings and expanding that to having as many villages as you own.

Very good fun :)

>\s*(\d+)(?:&nbsp)

Link to comment
Share on other sites

  • 3 weeks later...
  • 4 weeks later...

Hi All,

It is nice to see how you are discussing travian bot in this forum,

I have developed travian bot since last year, but I stop it because it wasting my time

and my job get me frustate.

I used ruby based on pawnee code, and my code has been apply around 20 people.

I saw AutoIT is the perfect language to make bot, since it is hard to make GUI in ruby,

eventough there are several add on.

Today, I search google, and found this link.

I thinks I will start again my Bot, since now I have one - two hour free time

at my office, and will report it in this forum.

Thanks

2Cool

Link to comment
Share on other sites

Hi All,

It is nice to see how you are discussing travian bot in this forum,

I have developed travian bot since last year, but I stop it because it wasting my time

and my job get me frustate.

I used ruby based on pawnee code, and my code has been apply around 20 people.

I saw AutoIT is the perfect language to make bot, since it is hard to make GUI in ruby,

eventough there are several add on.

Today, I search google, and found this link.

I thinks I will start again my Bot, since now I have one - two hour free time

at my office, and will report it in this forum.

Thanks

2Cool

That's nice i think you could take code that slaughter gave some pages before, it's pretty raw and wrote on Latvian language... but it can build fields, i've tried to improve it but i just have no time for this.

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...