May 09

Grepolis 2 Bot v2.86.0.1

Version: 2.86.01 Date: 09-05-2015
-Added support for https.

Hint:
To keep all your settings copy the Config folder of the old version to the new version.

Note:
If this is the first time you use the Grepolis 2 bot please read the “Quick start guide“.

For suggestions, questions or bugs you can use the comments or visit the forums at elitepvpers.

115 comments

Skip to comment form

    • twisla on May 9, 2015 at 19:23
    • Reply

    Thank u verry verry much again!!!

    • geo on May 10, 2015 at 19:05
    • Reply

    you are my hero

    • Rogerio on May 13, 2015 at 01:57
    • Reply

    Thank you, no bot I have no patience to play.
    .

    • Hlias on May 13, 2015 at 19:12
    • Reply

    No Bot –>No Grepolis

      • Ev1LK1nG on May 15, 2015 at 07:24
      • Reply

      No Bot –>No Grepolis
      +999
      LOVE U UTHAR, YOU HAVE MY BLESSING YOU ARE THE BEST!!!! I HOPE YOU WIN THE LOTTERY !!!!

    • George on May 19, 2015 at 11:10
    • Reply

    No Bot –>No Grepolis

    • Ev1LK1nG on May 19, 2015 at 14:49
    • Reply

    Master, does this work well with the 2.87 update on US server?

    1. Test it and let us know 🙂
      Although most servers wont be updated until tomorrow.

        • Ev1LK1nG on May 20, 2015 at 13:47
        • Reply

        I think something wrong with farming .
        Can you please check???

        1. Will do that later today, and could you tell me what is not working for you?

            • Ev1LK1nG on May 20, 2015 at 13:58

            Timeout – Server didn’t respond for over 5 seconds. (attackfarmersall3)

            • Uthar on May 20, 2015 at 15:00
              Author

            That often happens on maintenance days, means the server is too slow.
            Change the timeout setting on the settings tab from 5 to 30 seconds.

            • Ev1LK1nG on May 20, 2015 at 15:02

            ok i am scared now
            but well i got so far thanks to you so i will try it.
            However, when i play on browser i can farm fast.. like i can do it usually..

            • Uthar on May 20, 2015 at 15:39
              Author

            If I notice anything strange while testing I’ll let you know.

    • Ev1LK1nG on May 20, 2015 at 21:52
    • Reply

    Thanks!
    I have a suggestion, like how the bot farms based on town name.. and it is sorted alphabetically
    can you add an option to randomize it?
    like it will farm in random sequence and not 1 2 3 4 5 6
    or would that be alot of work??

    1. Only the farmers can be randomized.
      You can’t randomize the towns, they are in alphabetic order, just like they appear in your browser.

      In case you missed the message:
      http://bots.uthar.nl/1042/grepolis-2-bot-development-has-ended

    • Zero on May 21, 2015 at 13:32
    • Reply

    I’m kinda interested in if the bot still works like it should after the latest update (20.05.2015), and is still undetected.

    1. There were no significant changes, bot still works fine.
      However, there is always a chance to get banned. Especially on new server the moderators are actively searching for bot users.

        • Zero on May 21, 2015 at 20:16
        • Reply

        There should be little to no issues to use it on Taras then?

        1. If you are talking about the functionality of the bot, then yes, everything will work fine. But I´m not going to guarantee that they wont ban you.

            • Zero on May 22, 2015 at 00:14

            Every action that breaks the ToS is considered cheating, and I’m fully aware of that. What I meant is will it work on a world like Taras. I’m also concerned about getting the best settings for it. Where can I find those, since I’d like to lower my possibility of receiving a ban to a minimum

            • Uthar on May 22, 2015 at 17:26
              Author

            Ok, then yes the bot works on all servers, including Taras. Also for the bot all servers are the same, so the server name and language do not matter, only the version matters.

            To lower the chance at least a bit see the tips under “Detection status”, if you scroll up you find it on the right.
            Also some users have success with the following settings:
            Min. Reconnect Timer (min): 30
            Max. Reconnect Timer (min): 45
            Min. Forced Reconnect (h): 3
            Max. Forced Reconnect (h): 4

            It forces the bot to take longer breaks.

    • Yoli on May 23, 2015 at 16:44
    • Reply

    Dear Uthar,

    The bot does not make any demands above 18 cities. I have 20 towns, and on the newest 2 it can not use the farms. Do you have any idea to solve it?

    Thanks,
    Zoltan

    1. Check log.txt and debug.txt for any farmer related errors.

      Possible errors could be that your island doesn’t have any farmers. Or you are using an invalid loot interval (Some loot intervals require a research from the academy.)

        • Yoli on May 23, 2015 at 18:50
        • Reply

        Helo,

        Log:

        2015.05.23. 18:42:27 Core.Vernii: No farmers available at the moment.
        2015.05.23. 18:42:29 Core.Vernii: Nothing to build.

        Debug:

        2015.05.23. 18:42:20 Ingame error in attackFarmers2Response(): Érvénytelen idő érték (600)

        On the debug, in my language the meaning: Invalid time value (600). But I use 10 minutes for demanding.

        • Yoli on May 23, 2015 at 18:52
        • Reply

        Hehe, found the problem. The 10 minutes demand function needs a research. Added on academy, hope it will solve.

        Many thanks!

    • Ano on May 24, 2015 at 23:31
    • Reply

    Hello,

    I would to ask to you, if it is possible for you, that you can change the max level to the new standards of grepolis. For example the farm has the max level 45 and not 40.

    Thank you!

    1. You can enable the higher building levels by enabling the checkbox “Hero world”. You might need to restart the bot before it has effect.
      You can find the setting just below your server settings.

        • Ano on May 25, 2015 at 23:50
        • Reply

        Ok, thank you.

  1. Dear Uthar,

    Is there any way of randomizing the trading cycle? The towns with “send” always use the same queue, so some cities never or rarely get materials, cos there is nothing to send in the storages when the main city checks it.

    1. That is not possible.

        • Yoli on May 28, 2015 at 00:56
        • Reply

        🙁

    • claudio on June 16, 2015 at 19:10
    • Reply

    First of all I am happy about your coming back,.
    Second, whot about the 2.88.0.1?
    The 17/06 the will change in 2.89.0.1

    Thanks for your job.

    1. Think you misunderstood I’m not coming back, sorry about that. The development has ended but there is always a chance someone else continues my work.

      This update was the final update to enable https (ssl) support as mentioned in http://bots.uthar.nl/1042/grepolis-2-bot-development-has-ended

    • Mitor on June 17, 2015 at 05:11
    • Reply

    Hello , got a problem with a bot after today update grepolis to version 2.89 ,for a month everything was fine just today dunno what happened i started bot wanted to start farming villages after 1h i noticed that i didn’t get any resources during this time :/

    2015-06-17 05:09:52
    2015-06-17 05:09:48 001: No farmers available.
    2015-06-17 05:08:38
    2015-06-17 05:08:34 001: No farmers available.
    2015-06-17 05:07:20
    2015-06-17 05:07:14 001: No farmers available.
    2015-06-17 05:05:56

    Can you please check it and fix it?

    1. I’m not doing any updates any more but I could test whether or not the bot still works. Although nobody else has reported this problem so it might be something with your settings.

      I’ll let you know later today.

    2. Something is indeed not correct, but the farmers are looted eventually. If you refresh the browser tab and go to the farmers there you’ll notice they have been looted.
      The log tab shows however incorrect information probably because the server response has been changed with the latest update.

    • Diego Dias on June 18, 2015 at 05:34
    • Reply

    Porque não consigo joga pelo bot, na aba Browser. Alguém ajuda

    • Thomas on June 18, 2015 at 10:52
    • Reply

    Indeed, minor bug since latest update.
    Saw on Gifhub some people forked project. Hopefully they’ll continue the project.

    • Ev1LK1nG on June 24, 2015 at 07:24
    • Reply

    Hi, i started getting this error after my captain premium expired, no error with captain.. just wanted to let you know 🙂

    • André on June 26, 2015 at 08:31
    • Reply

    O meu programa também não consegue farmar as aldeias bárbaras, mesmo todas 100%, a vários dias. O Grepolis deve ter criado alguma nova barreira.

    • Dragon on September 9, 2015 at 17:33
    • Reply

    The bot now when you retrieve the queue of buildings, jumped one position to the left, for example senate took the 10 level of the cave.

    Can you help?

      • Uthar on September 10, 2015 at 19:59
        Author
      • Reply

      No sorry, not much I can do about that.

        • xxxnghostxxx on September 11, 2015 at 02:07
        • Reply

        yeah building que is remdered worthless because of it. im having the same issue

        • Cwal on September 11, 2015 at 02:13
        • Reply

        Same issue dragon. My warehouse level is reading at 45 so it’s basically worthless now

        • Ricardo on September 11, 2015 at 13:18
        • Reply

        see there what you can do, because I think it’s changing the order of the buildings as the friend Dragon said the level of the senate for example is the level of another building, I believe that this is the drastic change that has taken.

          • Uthar on September 11, 2015 at 15:26
            Author
          • Reply

          I meant, I can’t do anything about this without change the source code. Since I’m no longer working on this I can’t fix it.
          However, source code is available on GitHub so maybe another developer will continue my work and fix it.

    • xxxbghostxxx on September 11, 2015 at 02:04
    • Reply

    i am having the same issue as dragon. my warehouse level says 45 but thats impossible. so im screwed no matter what?

    • Anonymous on September 11, 2015 at 22:04
    • Reply

    Uthar,
    forgive me….
    Here nothing works any more …
    It helps us ..
    -none order weapons
    -no update size buildings
    – Help!
    do not abandon us like that!

    • twisla on September 13, 2015 at 11:23
    • Reply

    yes the bot needs a update.
    is there someone smart enough to take over
    uthars great work?
    we desparetly need this fixed.

    • Max on September 13, 2015 at 14:39
    • Reply

    I propose a solution …
    Uthar, put a new donation …
    those without the new donation can not use the bot.
    I believe that is the right price for your work and please create an update.
    The bot now not be used.
    I think everyone agrees …

      • Jay on September 13, 2015 at 19:07
      • Reply

      Yes, i would be willing to donate to use the bot. You deserve money for your work.

        • twisla on September 13, 2015 at 21:10
        • Reply

        same here

      • diver on September 14, 2015 at 17:23
      • Reply

      Uthar possibly received money from the Grepolis team that did not continue to develop bot… 🙂

    • Max on September 14, 2015 at 23:30
    • Reply

    I refuse to believe this
    uthar,
    if there is a reason to interrupt your work for the bot, you can talk clearly.
    uthar,
    at least give us an answer, we believe in you but you do not betray us, please!

    • Uthar on September 14, 2015 at 23:38
      Author
    • Reply

    Guys, don’t start writing nonsense here. I even took my time to explain why I stopped working on the project.

    If you are interested you can read about it here:
    http://bots.uthar.nl/1032/grepolis-2-bot-the-future

    • TJ on September 15, 2015 at 07:55
    • Reply

    So, I looked on GitHub and it shows that 13 people forked it.. and it shows some graphs.. and such… how do we know if anything has been released? or works…?

      • Uthar on September 15, 2015 at 11:21
        Author
      • Reply

      Currently none of the forks has a recent update, they will not work.
      But maybe the recent Grepolis update pushes other developers to work on a new version. When I find a working fork I’ll also make a post about it on this blog.

        • TJ on September 16, 2015 at 00:59
        • Reply

        Thanks man.. You should get some kind of award for this.. I havent found another bot that works as effectively as yours does.. i just would hate to see people add in features like auto attack.. alas, i cannot program even a simple tic tac toe so im out of the running to update it lol

    • max on September 18, 2015 at 04:02
    • Reply

    WARNING!
    do not use the bot !!!
    now it can be easily identified by the team grepolis!
    I got attacked ban on 3 servers …

    • twisla on September 20, 2015 at 08:33
    • Reply

    yep my account was suspended too for 1 week.

    • twisla on September 22, 2015 at 09:41
    • Reply

    looks like this bot died.
    to bad i am not smart enough to fix it.
    why can no1 take over uthars work?
    it would be realy to see this project die.

    • twisla on September 22, 2015 at 11:45
    • Reply

    now its realy broken.
    it keeps reconnecting.
    so i start my search for something new.

      • Uthar on September 22, 2015 at 12:15
        Author
      • Reply

      One alternative you could try is -link removed-
      The farming feature is free but unfortunately you’ll have to pay for all other features.

      //edit
      See announcement on front page. There is now a special offer for all new members that previously used my bot.

    • teslax1 on September 22, 2015 at 12:09
    • Reply

    Not working!
    only reconnecting!
    if somebody finds something new let me now!

      • Uthar on September 22, 2015 at 12:16
        Author
      • Reply

      See suggestion above.

    • twisla on September 23, 2015 at 10:18
    • Reply

    thanks uthar the alternative works.
    free options:
    auto farm
    auto culture
    silver to cave
    and auto market (trading)
    all the other options are paid.
    install script and send mail to owner.
    in 1 or 2 days u get password for the free functions.

    thanks again.

    • Uthar on September 23, 2015 at 16:03
      Author
    • Reply

    If you are looking for an alternative see the following link for more information:
    http://bots.uthar.nl/1074/grepolis-bot-alternatives

    • NoName on November 7, 2015 at 20:51
    • Reply

    Hey Uthar,

    How can I correct the bug who makes the bot always reconnecting ?
    I use visual basic.

    Thanks 🙂

    1. If you are familiar with C# you can download the source code.

        • NoName on November 8, 2015 at 09:44
        • Reply

        I know a bit. Here is the error I get in the response folder L’index était hors limites. Il ne doit pas être négatif et doit être inférieur à la taille de la collection.
        Nom du paramètre : startIndex

        –removed–

      1. Next time upload the file somewhere instead of copy/pasting the content here. I’m sure you find it unreadable as well 😉

        Regarding your question set a break point in the following method and start debugging:
        public void updateGameDataResponse(string p_Response)

    • NoName on November 10, 2015 at 17:32
    • Reply

    Yes I’m sorry.

    I did it in the controller.cs file. What should I see ? I did but i don’t see something who can help me.
    Thanks for helping.

      • NoName on November 10, 2015 at 19:24
      • Reply

      Sorry for double-post. It’s a problem with http request right ?

    1. The server request is fine but the server response is causing problems. That is why you need to use the debugger and set a breakpoint in:
      updateGameDataResponse(string p_Response)

      Debug that method line by line until you find the part that is causing problems.

        • NoName on November 10, 2015 at 21:05
        • Reply

        Thanks for your answer Uthar. I put the breakpoint at the end of the method you said, just before the switching town method. Is it good ?

        1. Nope, if you put it at the end you miss everything.

            • NoName on November 10, 2015 at 21:58

            Here is my screen. Is my breakpoint good ? http://prntscr.com/91awiy

            Sorry if i’m boring :s

            • Uthar on November 10, 2015 at 22:09
              Author

            That should work but it is better to chose a line that actually does something. So I would recommend to put the breakpoint on the line below.

    • NoName on November 10, 2015 at 22:14
    • Reply

    Ok, thank you very much ! I guess it’s all the red thing who are doing the bot working bad. Is it right ?

    Here a screen http://prntscr.com/91b500

      • NoName on November 11, 2015 at 20:37
      • Reply

      Well I read the code and I understand a bit now. I have an answer : the file written in the response folder is all the responses that the grepolis server send ?

      1. Using the default settings the response folder contains only server responses that caused an error. If you want to save all server responses in the Response folder you need to enable the setting “Output all mode”.
        You can find that setting at the Settings tab of the bot.

    1. Red means only it has just has been modified.

      //edit
      How did the debugging go? Did you find any bugs in the method? The easiest way is to set a breakpoint and start debugging, when the it reaches the breakpoint keep pressing F10 to continue step by step.

        • NoName on November 11, 2015 at 22:27
        • Reply

        I didn’t find any bugs. I just saw that the bot always crashed at the same line of code when I use the F10 key.

        1. That is the bug 😉

            • NoName on November 11, 2015 at 22:44

            Well How can I know what is doing wrong and fix it ? I can see that the bots still get informations like cultural points, …

    • NoName on November 11, 2015 at 22:45
    • Reply

    Sorry if I’m annoying with my newbie answer but you made me wanted to learn how to program

    1. No problem, will try to answer when I have time. It is however a difficult project you selected to learn programming.

      Regarding the bug, now that you found which line is causing problems you need to understand why it is causing problems. The bot tries to get info from the server response so either that information is removed, renamed, or replaced. I recommend to open the file from the Response folder in Notepad++ and look for the information the bot tries to extract.

        • NoName on November 12, 2015 at 19:40
        • Reply

        Is it possible that this line is : private void updateReconnectTimer(object p_TimeLeft) ?
        Another question : What is l_index ?

        Thanks for all 🙂

          • NoName on November 12, 2015 at 20:09
          • Reply

          I found that the bot can’t do this condition while (l_Index < l_IndexEnd && l_Index != -1) and go to this line catch (Exception e)
          {
          setStatusBarEvent("(#" + m_RetryCountServerError + ")Critical error occurred. Server response saved in Response dir.");
          l_

            • NoName on November 13, 2015 at 20:36

            Hey it’s again me !

            I think i found the bug it is on this line : l_Search = “{\”class_name\”:\”Towns\”,\”data\”:[“;
            l_Index = p_Response.IndexOf(l_Search, 0);
            l_IndexEnd = p_Response.IndexOf(“]”, l_Index + l_Search.Length);
            string l_TownID = “”;

            The bot can’t found the value of l_index so it’s return -1
            and When i search on the response file i can’t found {“class_name”:”Towns”,”data”:[“

            • Uthar on November 13, 2015 at 21:12
              Author

            Indeed, that is the bug, nice work. Looks like they removed all the general town data from the request. Meaning, the bot misses a lot of data for your towns.

            You can still find all the town ids though in for example {“class_name”:”TownResearches”,”data”:
            However, I’m afraid that is not enough to get the bot working.

            You’ll have to find another http requests that does contain the required information.

    • NoName on November 13, 2015 at 21:54
    • Reply

    I’m happy that I found the bug ! 🙂 I will try to find the new response. Can you tell me in which file i can add new requests and how to know how writte the good request ?

    Thanks thanks for all ! 🙂

    1. Do you have any knowledge about http request, the difference between post and get requests, and how you can analyse the http requests Grepolis sends?

      That will be the first step, otherwise it is impossible to find a useful request.

      To add new http requests in the bot see Controller.cs and check the following methods:
      stateManager()
      stateManager1()
      stateManager2()
      stateManagerDelay()
      retryManager()
      responseManager(string p_Response)

      //edit
      The above mentioned methods are responsible to send the request in the correct order. For example on writing requests (either post or get) check any of the existing methods.

        • NoName on November 14, 2015 at 13:18
        • Reply

        Yes I know http requests, I use firebug is it that good ?

        Ok thx 🙂

        Another thing : how fix another bug who do fail these condition while (l_Index < l_IndexEnd && l_Index != -1) in the method ?
        The bot goes to catch at this line : m_Player.Towns[m_Player.getTownIndexByID(l_TownID)].CastedPowers += l_CastedPower + ";";

        Sorry for my bad english I hope you can understand me

        1. Firebug works good.

          while (l_Index < l_IndexEnd && l_Index != -1) is supposed to work like that, otherwise the loop never stops. Do not change that.

          Also you can't solve the following problem here:
          m_Player.Towns[m_Player.getTownIndexByID(l_TownID)].CastedPowers

          It is caused by something else, because "{"class_name":"Towns","data":["; is missing there is no town data. This means m_Player.Towns is empty.

          So every line that uses m_Player.Towns will give an exception until you find a way to create a list of towns. As I mentioned earlier you could try to use {“class_name”:”TownResearches”,”data”: to create a list of towns by only using the town id.

            • NoName on November 14, 2015 at 14:41

            Oh I’m stupid … I had forgotten to change all variable. Thanks for your reply !

            Have a nice day !

            • NoName on November 14, 2015 at 14:49

            I just want to be sure that I don’t a mistake : I have to rename it m_Player.Towns.Count; in m_Player.TownsResearches.Count; ? It’s an example, i mean replace all m_Player.Towns to m_Player.TownsResearches

            • Uthar on November 14, 2015 at 15:16
              Author

            No keep all the m_Player.Towns you need those, you need to fix the town list so you can use it again.

            {“class_name”:”TownResearches”,”data”: is just an example that contains town ids. So instead of using "{"class_name":"Towns","data":["; you can use that one to create a list of towns.

            Towns are added using:
            m_Player.Towns.Add(new Town(l_TownID, l_TownName, l_IslandX, l_IslandY));

            But because you only have the town id you need to create another constructor that only needs a town id:
            m_Player.Towns.Add(new Town(l_TownID));

            • NoName on November 14, 2015 at 15:25

            I did it with {“class_name”:”TownResearches”,”data”: yesterday

            I will try to do using your advice. Thanks for all ! 🙂

            • NoName on November 14, 2015 at 15:47

            Isn’t it better to do a new request to get all the infos that the server doesn’t send anymore ?

  2. If such a request exists then yes. But the one you are using now is the only one that contains info for multiple towns.

    However, if you use the premium features in Grepolis you can also use the requests for the different overviews. Those also contain info for all your towns. The problem with this is that not everyone can use it because they need to have the premium features enabled.

      • NoName on November 14, 2015 at 21:20
      • Reply

      I still don’t understand why the bot crash at this line : m_Player.Towns[m_Player.getTownIndexByID(l_TownID)].CastedPowers += l_CastedPower + “;”;

      Can I send you my file modified ?

        • NoName on November 14, 2015 at 22:25
        • Reply

        Something else :
        Can you tell me what is the utility of this

        while (l_Index < l_IndexEnd && l_Index != -1)
        {
        l_CastedPower = p_Response.Substring(l_Index + l_Search.Length, p_Response.IndexOf(""", l_Index + l_Search.Length) – (l_Index + l_Search.Length));
        l_Index = p_Response.IndexOf(l_Search, l_Index);
        l_Search = ""town_id":";
        l_Index = p_Response.IndexOf(l_Search, l_Index);
        l_TownID = p_Response.Substring(l_Index + l_Search.Length, p_Response.IndexOf(",", l_Index + l_Search.Length) – (l_Index + l_Search.Length));
        m_Player.Towns[m_Player.getTownIndexByID(l_TownID)].CastedPowers += l_CastedPower + ";";
        //next power
        l_Search = ""power_id":"";
        l_Index = p_Response.IndexOf(l_Search, l_Index);
        }

        Thanks for all. Have a good evening !

        1. That code snippet keeps track of the active spells/god powers that are active in each town.

      1. For m_Player.Towns[m_Player.getTownIndexByID(l_TownID)].CastedPowers += l_CastedPower + “;”;

        try adding int l_TownIdTest = m_Player.getTownIndexByID(l_TownID) before that line and check if the value is -1.

          • NoName on November 14, 2015 at 23:32
          • Reply

          Yes the value is -1

            • NoName on November 15, 2015 at 12:53

            Hello, can you tell me how works getTownIndexByID ?

            Here the constructor I modified to works with TownID

            public Town(string p_TownID)
            {
            m_TownID = p_TownID;
            addArmyUnits();
            addBuildings();
            addCulturalEvents();
            }

        1. Lets continue this by email.

    • Daniel on January 5, 2016 at 14:24
    • Reply

    I have a problem . “Can’t connect,check your settings”. How i resolve?

      • Daniel on January 6, 2016 at 00:15
      • Reply

      The bot didn’t connect . Can you help me using teamviewer?

    1. I’m no longer updating the bot, see the following link for alternatives:
      http://bots.uthar.nl/1091/grepolis-bot-alternatives-2

    • Anonymous on February 6, 2016 at 05:28
    • Reply

    Hey wenn will do me help, bitte write you me email ***

    1. Help with what? The development has ended, see the following link for alternatives:
      http://bots.uthar.nl/1091/grepolis-bot-alternatives-2

    • D0WN3D on April 4, 2016 at 00:18
    • Reply

    Still workin in 2016? I click Login but nothing happends.

Leave a Reply

Your email address will not be published.

WordPress SEO fine-tune by Meta SEO Pack from Poradnik Webmastera