dumbledor Posted February 4, 2008 Share Posted February 4, 2008 Ok. I see i read too fast. Here is something it might help. http://help.travian.com/index.php?type=faq&mod=640 So far what i found out are this links just short cuts to the village objects. So you can directly accees buildings and you dont need specify where building is build. Barracks for example is: build.php?gid=19, no matter where did you build it. Hope that is the answer you were looking for. Be cool be travian. Link to comment Share on other sites More sharing options...
Linux Posted February 5, 2008 Share Posted February 5, 2008 Very good! this tip will be very usefull! thank you! 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 More sharing options...
sherkas Posted February 6, 2008 Share Posted February 6, 2008 build.php?gid=19 might seem like a good idea now but... what about when the person has multiple buildings? Link to comment Share on other sites More sharing options...
dumbledor Posted February 6, 2008 Share Posted February 6, 2008 (edited) build.php?gid=19 might seem like a good idea now but... what about when the person has multiple buildings?Multiple buildings? Crannys? Don t understand the question. Ok about this i was testing on slovenian server.build.php?gid=1 Highest level of wood fieldbuild.php?gid=2 Highest level of clay fieldbuild.php?gid=3 Highest level of iron fieldbuild.php?gid=4 Highest level of crop fieldbuild.php?gid=5 Sawmillbuild.php?gid=6 Brickyardbuild.php?gid=7 Iron Foundrybuild.php?gid=8 Grain Millbuild.php?gid=9 Bakerybuild.php?gid=10 Warehousebuild.php?gid=11 Granarybuild.php?gid=12 ....I am using this becouse it is less information to keep. You just use same links for diffrent villages, and don t need to carry with you data for where did you build all the fu... buildings. Perfect to line up buildings for build and check their status and everything else.I am not afraid of the A.I. but the GUI that is the son of a ... Hope it helps you making the bot more readable.Be cool be travian. Edited February 6, 2008 by dumbledor Link to comment Share on other sites More sharing options...
dumbledor Posted February 9, 2008 Share Posted February 9, 2008 (edited) Ok here it is. My first travian bot. It is roughe and demo version, becouse i am working on multiple citys and i am too lazy to put in exit function but it works just fine for one city. I got so much help on this forum so i think is right to share some code with you. Have fun. Evade.au3 I hope you will learn something from it. And i would like some feedback if you will use it. I tested on si and com server. So feedback from other servers would be appriciated. Be cool be travian. Edited February 9, 2008 by dumbledor Link to comment Share on other sites More sharing options...
Linux Posted February 9, 2008 Share Posted February 9, 2008 Great! This is a very nice example. im not doing it in our bot because other member is in charge of that. but I pointed him this. Thank you for your great effort. 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 More sharing options...
elegant Posted February 10, 2008 Share Posted February 10, 2008 hello any ideea to get city list( id's)? Link to comment Share on other sites More sharing options...
dumbledor Posted February 10, 2008 Share Posted February 10, 2008 (edited) hello any ideea to get city list( id's)? I am not sure what do you want but here is one of my test scripts maybe it suits your needs. This puts all your citys hrefs in array so you can play with data later. #include <IE.au3> #include <Array.au3> #include<string.au3> Global $link = "http://s1.travian.si/dorf1.php";==> Link of your server, no login function included so you have to preopen travian in your browser. :D Global $citys = 6;==> Number of citys you have $oIE = _IECreate($link, 0, 1) $oLinks = _IELinkGetCollection ($oIE) $iNumLinks = @extended MsgBox(0, "Link Info", $iNumLinks & " links found") $string= "*" $j= 0 For $oLink In $oLinks $i = $oLink.href $string = _StringInsert($string, $i&"*", 1) $j = $j + 1 Next $array = StringSplit($string, "*") $i = $iNumLinks + 1 - $citys Do _ArrayPop ($array) $i = $i - 1 Until $i = 0 _ArrayDisplay( $array) _IEQuit($oIE) ;MsgBox(0, "Link Info", $string) Be cool be travian. Edited February 10, 2008 by dumbledor Link to comment Share on other sites More sharing options...
Linux Posted February 10, 2008 Share Posted February 10, 2008 I use this line, then I work out the rest to extract the info, then later I use the tables to get coords, but thats not that simple. $Vtemp = _StringBetween($Source, " <A ", "<", 0, -1) $TotalVillageNumber = UBound($Vtemp) _arraydisplay($Vtemp) 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 More sharing options...
dumbledor Posted February 12, 2008 Share Posted February 12, 2008 Any good ideas for travian A.I. ? On what principles do you build it? I don t need code just some pointers and directions. I am trying to build. Attack A.I. Build A.I. Resources handling and transporting A.I. Did you make any? Any sugestion would be apriciated. Future 2009-2010: Combined A.I. and almost no playing, i will just put bot on a server of mine and let it be from beginning and see how it does. Be cool be travian. Link to comment Share on other sites More sharing options...
Linux Posted February 12, 2008 Share Posted February 12, 2008 (edited) I want that too. to make the bot able to play till almost the end of the game, since the end of the game is a lot diferent from the rest. About the directions, I cant tell you my tactic here, but will be something like, droping a mushroom, in a map, and 3 months later it will be top 10. with a lot of little mushrooms. Multiply in the rate of 1 new village every 3 days!! Edited February 12, 2008 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 More sharing options...
dumbledor Posted February 13, 2008 Share Posted February 13, 2008 Multiply in the rate of 1 new village every 3 days!! Imposible. You forgot to count in cultural points. You cant produce 1 village in 3 days. On the beginning maybe, but later in the game is imposiblle. Becouse you cant get enough cultural points.Be cool be travian. Link to comment Share on other sites More sharing options...
elegant Posted February 13, 2008 Share Posted February 13, 2008 i played more time travian...and when i have over 30 city's for next city (with party's) wait 5-6 days to acumulate culture point for next city Link to comment Share on other sites More sharing options...
nobbe Posted February 13, 2008 Share Posted February 13, 2008 another way of getting links to all towns Local $my_towns = "";; towns max.. ;; $glob_account_world_url = "http://speed.travian.de/"; Local $url = $glob_account_world_url & "dorf1.php" _IENavigate($oIE, $url) _IELoadWait($oIE) Local $nbr_towns = 0; Local $oLinks = _IELinkGetCollection($oIE) For $oLink In $oLinks If StringInStr($oLink.href, "newdid") > 0 Then ; if the link fits our need?? $my_towns &= $oLink.href & "|"; $nbr_towns += 1; EndIf Next ;; all links .. ; chop off last | $my_towns = StringTrimRight($my_towns, 1); MsgBox(0, "Nbr of Towns ", $nbr_towns) MsgBox(0, "ALL", $my_towns) $a = StringSplit($my_towns, "|") _ArrayDisplay($a);; Link to comment Share on other sites More sharing options...
Linux Posted February 13, 2008 Share Posted February 13, 2008 (edited) its possible to have a new village every 3 or 4 days, check the culture points table, and see what buildings give you more culture points. im my tactic, I user several lvl 20 embasseys, but I'm not a alliance Lider. But they are cheap and give you a lot of culture points. Other good building for that tactic are the Academy, and the marketplace. And of course, we have party's, but i see them as very expensive, compared to the 1 time investiment of the other buildings. but im saying this to the first 30 villlages, i dont know if after that they get harder. @nobbe How do you manage your queue? i mean, do you add the ID of the building, or only the name and level wanted? thanks in advance Edited February 13, 2008 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 More sharing options...
nobbe Posted February 13, 2008 Share Posted February 13, 2008 (edited) How do you manage your queue? i mean, do you add the ID of the building, or only the name and level wanted?hii dont care for the levels of the buildings , they just build when they can be builti have a setup for each town : adding the strings of the buildings to the list of the "to be built" buildings. if i dont want a certain bulding to be upgraded i simply remove the entry from the list for this town- New in my BOT : build town from a template : it searches for empty building places and checks the resource if a new building can be built. if it can it will build them. this way i can make all my towns look the same (makes management much easier later) - and my BOT does also Party :-)nobbe Edited February 13, 2008 by nobbe Link to comment Share on other sites More sharing options...
dumbledor Posted February 13, 2008 Share Posted February 13, 2008 - and my BOT does also Party :-)LOL. This would be a great joke for all travian builders. When your bot starts to make party it is working ok and it is probably finished the job. I like the disscusion i learn a lot.Be cool be travian. Link to comment Share on other sites More sharing options...
eazee Posted February 14, 2008 Share Posted February 14, 2008 Hi@all! Now I have to write a little bit also in this thread! What I now want to program is a queue for some attacks. I want to put the names of the cities I want to attack and the time and the amount of soldiers to some input fields, then add all those infos to a queue. When time has come for each different attack the bot should send my "army" to attack. What I now have are the input boxes and the code to attack the city I want to. But how can I solve the "timed attack thing" with a queue? Are there any ideas? Thanx in advance, your help is appreciated! EaZeE Link to comment Share on other sites More sharing options...
dumbledor Posted February 14, 2008 Share Posted February 14, 2008 Hi@all!Now I have to write a little bit also in this thread!What I now want to program is a queue for some attacks. I want to put the names of the cities I want to attack and the time and the amount of soldiers to some input fields, then add all those infos to a queue. When time has come for each different attack the bot should send my "army" to attack.What I now have are the input boxes and the code to attack the city I want to.But how can I solve the "timed attack thing" with a queue?Are there any ideas?Thanx in advance, your help is appreciated!EaZeEYou will have to start from a scratch. For attacking you can take part of my script (last post on page 7). It is used for evading attack, but is based on names of town. Which is not wise to use because player can change the name of town so you can use, login function, attack sender will need some modification becouse it sends back units but you can study my scripts and then rewrite it to your needs.For inserting and line making i suggest using arrays. For comforting putting in coordinates start reading samples about GUI. Hope i was a little help.Be cool be travian. Link to comment Share on other sites More sharing options...
eazee Posted February 15, 2008 Share Posted February 15, 2008 Thanx for your answer!! I built in a timer that counts down the minutes I put in to wait for the next attack. Is there a chance to run this counter in the background so that the main script is not pausing? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now