Quote:
Originally Posted by dbtuga
Hey. I need help in pt server.
i just cant login..any ideas?
|
Could you check your settings.txt?
Your server settings should look like pt.grepolis.com;pt1.grepolis.com
Or maybe there's a small typo in your username or password?
The last time I checked the pt server is just a few days ago. There weren't any problems then with the login.
@srialmaster
Nice to hear that you want to learn some C#
But it's a bit difficult to let someone else add things. If you add something new there's a big chance you have to update some old code as well.
But the logout code is almost correct.
Code:
String l_Url = "http://" + m_Settings.MainServer + "/start?action=logout";
Uri l_Uri = new Uri(l_Url);
m_HtmlHandler.DownloadStringAsync(l_Uri);
We need also a new state for this. m_State = "logout" for example.
You can handle this state in the method: client_DownloadStringCompleted
I'm not really sure yet if we need this function though. Because if you exit the bot and login with your browser the session you had with the bot is gone.
To save the building queue is some more work. The settings you added for queue text file looks correct.
To save/load this text file you need to know the townid and the building names for in the queue (the dev name (first line in translation.txt) not the local).
Form1.cs is the main class and knows every object so you have to create a new method there.
Remember you can only load the queue when you are logged in and townid is known.
There are probably some more things that you need to check but it's already too late to think of them.
I think I will work alone on this bot for the time being. But you can always come with ideas or questions about the code.
~Uthar