RIP Three Kingdoms Online

Today is the day that Three kingdoms online is no more.

Three kingdom online was a little brother to me.I loved to play with you until he grows up a become a teen and started to get greedy.

corruption

Most people run away from him when this happen but I didn’t, I’ve just told him it’s not going to happen but we can still play together.

There a lot of good games that came after TKO, some even came after and closed before TKO (I’m looking at you Lord of Ultima)

If you have any games in the MMORTS genre that you want to suggest or anything related Romance of the Three kingdoms feel free to do so. I read every mail (jack at onlinesgamestips.com) and I might decide to write a piece on your game.

Check my initial reaction post to TKO closure or my 4 parts series on how I’ve build a bot to reduce my play time.

end

throne

We’ve talked about how to automate your game in part 1, how to build a bot with python with the sushi go tutorial in part 2 and the problem I’ve encountered in part 1 and 2 that I’ve fixed. Today, It’s a summary of what I’ve done (task and feature) to automate the game and make it more fun.

Side note, doing all this made the game much more fun to play since most of the boring stuff was automated or semi-automated.

The 12 automated tasks that made the game fun again… almost.

1-Upgrade all the tech (weapon, armor & valor)

I’ve already explained it in part 2. The reason I did this is because it was a pain to go in each city each 3 building and upgrading this should be automatic.

2- Upgrade resources fields

This is the main reason I’ve wanted to make a bot is to automate building new cities. I made a dumb cycle that check each resource field starting by the food field and going through all the resources.

This give funny situation where wood and iron are barely developed and farm and stone already have a lv 10. But the basic were enough to be useful.

3-Upgrade building

This one cover every building except warehouse and granary because these 2 are not accessible via the menu next to your ruler face.

4-Market place

I’ve already talked about this one in part 3. Go check my second problem.

5-Check if your in game

I’ve already talked about this one in part 3. Go check my first problem.

6- create a build list and use it to upgrade and send resources (Do point 1 to 4 all at once)

I’ve already talked about this one in part 3. Go check my third problem. Basically I’ve save the build in a file and when the bot is looking to upgrade building or resource, the build file tell him where to start. What is missing is a way to remember where he was the last time so he doesn’t always start at the same place, next game I guess.

7- City loop: loop all your cities with the point 6

Once you got a way to upgrade building, resources and tech for each city I’ve implemented a loop that do those 3 task for all your account city. Saving you precious time.

8-Attacking Captain with heroes

This is a great way to get experience so I made a loop that click on the captain until the captcha show up. When the captcha show up I usually enter it and the bot start again for the next ten heroes.

9-Amassing training point

Like previous point but with troop to get training point

10-Attacking a elite guard

This one is a bit harder, since it need to loop the map, everything else after is just checking if there an elite guard and attacking him like we do for the training point. The risk here is that we lose real troops when we do that, So its more semi-automated.

11-finding 15f

this one was on of the last I’ve done. I was tired of clicking on the map to find the 15f, so I made a task to click on the map and check the the type or terrain. It’s save the value in a shelve and add it to the map bookmark.

12-level up heroes

TKO is so  well design game UI wise (puke), it takes so many clicks to level up a hero that if you have many heroes it can take awhile. So the goal was to automate leveling the heroes on the heroes screen.

What I wanted to do next

I wanted to manage plundering, take care of the special event. From there I could probably run by it self. My ultimate goal would have been to manage war with it, that would require a way to read actual value on the screen. I could be done but by reading pixel by pixel or by having a proxy that gets the date from TKO when it send to it server and process information from it.

I hope you liked that series of post on how I’ve automated my playing experience. If you like it, drop me a email and I might do a bot for other games too.

We’ve talked about how to automate your game in part 1 and how to build a bot with python in part 2. Now we are going to implement specific task I’ve wanted the bot to do and the difficulty I’ve encountered implementing them.

The principle and idea we talk about here can be apply to other games or even website or apps but the code itself is specific to Three kingdom online (RIP).

Problem #1: the bot don’t know if the game have focus or not.

 

Lost

Solution #1: take a specific section of the game that never change and validate that it’s always present.

Other possible solution: check the window in focus, check if there an external input.

My problem was that sometime I left the bot running and another site would popup or I wanted to close it but it’s keep clicking everywhere even if the game is not there. My solution was to check the logo in the top left corner and validate if it’s there each time we make a big step.

TKO-main

Problem #2: We need to input value from the keyboard

Example: Sending resources from your city to another city, plundering or sending troop to a location.

Solution: Use the pyWin and make keyboard input.

One of the first problem I had is that I wanted all my sub to send resources to my main or a city in development. But to do that you need to type the amount of resources to send (note that, there a way to add them via click) and enter the destination (must have an input if it’s not one of your city)

Problem #3: need different configuration between account

617-Benders

Example: build order, market destination, city found

Solution: load the configuration from a file.

Alternative: save and load value in a db (mysql, sqllite)

There are other issues I’ve encountered, a ui change, popup that not where it should be and other stuffs like that. But these were the mains that were really painful. Hopefully it will give you some ideas if you get the same problem.

This problem is quite recurrent and was going to be an issue if I had the time to build a bot that manage multiple account. Having a different build between account, city or having different destination depending on the city is great example. How I solve it it’s by creating a class that have the initial value and save in a file. When the bot run, it will loads that file and can modify it if needed,  this allow to remember where it was, when the last time he did a certain task. I’ve didn’t go that far but that the principle. Next video show how it use different setting.

You can’t really see it but in the previous video I’ve use the shelve, the 3 10000 for each resources come from the shelve. I’ve haven’t used them to their full potential, they could be use it to save what we send and what to send next time.

There are other issues I’ve encountered but these were the mains that were really painful. Hopefully it will give you some ideas if you get the same problem. Next article will be about all I’ve managed to do with the bot and what was missing.

Yesterday, I’ve wrote a piece on how I’ve tried to automate my TKO account with various extension, tools and even code. Today, I’ll explain how I went from the basic foundation laid out by the sushi go round bot tutorial to build my TKO bot. Everything here can be use to build your own bot for your game.

Reasons I love futurama - Ascent of bot (with the spring being Bender's invention)

“Sushi go round” bot basic

From the tutorial I’ve referenced in my last post, I explained how the author used python to make is bot and what inspired me from his post to make mine.

Note what will follow requires a basic understanding of programming. If you want more info on that let me know or check out the free python beginner book: Dive Into Python

[Dive Into Python]

The basic principle of the bot in the tutorial is to get the image on the screen and analyze them, from there the bot react from what he analyzed.

This is the most important thing I’ve got from that tutorial. Using the python imaging library & numpy to get the image and use what he (the bot) captured on the screen to make a decisions.

Other point to get started is to use paint.net (or another image program with ruler) to get positioning in the image of the item that needed to be analysed. PyWin is another important librairy to take care of the reaction of the bot by providing him some way to interact with the screen with the mouse pointer and some keyboard input.

The first step to create your bot

Your first step to create your bot is getting a screen grab of the game to know what is the boundary of your game are. Once you got the screen grab with the game on it, you open the image in an editor like Paint.net and check the position of where the game start on the screen (in pixel from the upper left corner of the screen ) to where the section of the screen you game end (the lower right corner). With these coordinate, you will be able to concentrate only on the section of your game and if it move you just have to get them again it’s shouldn’t impact your coordinate in game since they will be relative.

Second step: entering the game and/or decide your starting state.

Once you got where your game is in the screen, you need to have a starting state for your bot. It can be the start screen of the game and have a little routine to get in it like sushi go round or start from a state you are often in like in the resource screen of your main city. You’ll probably need to have a routine to go back there so you can easily make your bot shift between task. That kind of backtracking is useful in complex game like Tko but unnecessary for game simple has sushi go round.

Third step: Creating the first task for your bot.

In sushi go round the tutorial show how to find what sushi are being ordered by the customer and prepare them from the ingredient. For Tko there is more option, there so much that can be done, you can make your bot build your city, maybe just collect your daily reward, perhaps upgrade armor or just find those damn 15 farm field on the map. I’ve started by making a task to upgrade weapon, armor and speed (valor camp). These three task have a similar layout and since the same image is used for each upgrade everything needed to be coded only once. The three building can be found at the same place too,  through the menu next to your ruler portraits even if you don’t put them in the same place in every city.

From here you should be able to do almost anything you want. If you’re having a hard time, go revisit the basic that can be found in the sushi go round example and check out some good python free course or book. The next part will be more in deep of the problem I’ve encountered. I’ll show you I went a little further in the bot, by including keyboard input, by using a configuration in a file depending on the user I’m running the bot with or how to save the value you found like where are the 15f.

If you want to files let me know in the comment, l’ll send them to you.

After the merge of 2014, my server has lost and my main was brutally destroyed, I basically dropped from the game with a RIP message 2009-2014.

dong zhuo city

When I saw the sea of attacking coming at my other cities I decided, ‘No’ I can’t give up without a fight. I save most of my cities and kill around 30 lobbyist, thousand of demo. I was offered to join a sub league or be annihilated. I thought about it and chose the league.

Evil Laugh

After a few months in, I’ve decided to put my account to good use and learn a bit. I’ve decided to see how I could make my account automated at least reduce the amount of work to do. I’ve thought about doing it for other game too, but I usually get bored before doing it.

Finding the tech

1-Grease monkey

I’ve talked about the three kingdom online grease monkey script in the past  but the script wasn’t working anymore and was not maintain. I’ve try to understand what going on and modify it but it’s end up not doing what I wanted.

2-Autofill extension for firefox

I’ve found that great extension in firefox called autofill where you can save a form and it’s value. You can recall the value when you want. I used it for the market place but could have been used for the deployment screen too.

Here a quick video how I’ve used it:

3-Selenium IDE Extension

Selenium record what you’re doing and then try to reproduce it exactly. I’ve played a bit with that one but the way TKO was set up sometime event or call where missing or not needed, making selenium not going to the next screen and then it’s tried to do what it was supposed to do in the next screen but in the current screen. What the mess, I’ve drop it after a few try, but could probably work with some tweaking.

4-Autohokey

AutoHotkey (AHK) is a free, open-source macro-creation and automation software for Windows that allows users to automate repetitive tasks.

This one seem to be use a lot for bot, basically you write a simple script and inside tell it where to click. It has some power, I’ve used it to do the governor work. See it in action for one loop, but the real script was running it 10 time in a loop to max the potential popularity each day.

You can download it here and if you want my autohotkey file let me know.

5-Python

After a bit of research I’ve found a tutorial of a guy using a python script to play sushi go round. Click on sushi to get the article.

This is when my bot was born, I’ve used the principles in the tutorial and applied it to TKO instead.

 

Disclaimer: there are other thing I could check, like using fiddler to get the request and try to spoof them, use a mix of a python proxy to do that with a combination of the bot I ended doing. It’s not the most efficient way but looking at what happening on the screen and reacting to it is the best way to avoid being flag has a bot, because in the end the bot is doing the same thing you’ll be doing.

I’ve you used a bot or some tool to help you play let me know I’ll love to hear what you’ve done.

end

The great journey come to an end guy, since 2009 armies swept the land, millions of soldier died, thousand of cities razed from the face of the earth. Now it will finish as a whimper instead of a bang.

empty city

It was to be expected, a year passed by since the last merge and nothing has happen. I think they were even no new server since 2014.

I was slowly drifting away from the game, I even heard the news when I’ve logged on the 28, 12 days after the announcement.

You can check the announcement in the forum here : http://forum.koramgame.com/thread-104558-2-1.html

Cao Cao - prime minister

Why it’s surprise me, is that this game seem to be to most popular in the forum, thousand of thread and message compare to the few hundred of the other game.

I’ve heard story of people spending thousand on the game to be an emperor or to have a high rank. But they failed to make the game worth it pass the initial stage. The merge were messy, the events were down right abysmal and theft. They added too much useless mini game and other stuff.

corruption

I’m a bit bum by it because I started this site because of Three Kingdom online and now my main game I talk here is gone.

The other thing it’s that I was working on a bot for the next merger, it’s seem it will never see the light of the day.  I could make a quick tutorial on how to build it. If you’re interested drop me a mail at jack at onlinesgamesTips.com or leave a comment.

By the way, there some hope TKO-RELAUNCHED in the forum is trying to bring back the game, maybe you should look at it.

Just drop him a mail so he can add you to the email list.

Here the thread if you want more info.

Gold

This is going to be the least important thing that I will be talking about so might as well get it out of the way since many players think that gold is an important factor. You don’t need gold to be a good player, but there are some small things that gold can do that will make things easier for you. alchemy scroll

Ancient Alchemy Scroll

This is the one thing that I recommend everyone to buy. It gives all your cities a 3% increase in food production and all the gold spent on it will be refunded after 3 months. Plus you will also get 80 gift vouchers.

caocaoliubeisunquan

Recalling your fled Hero’s Summit epics – If your epics have been killed, especially Cao Cao/Liu Bei/Sun Quan, I recommend spending the gold to call them back if you don’t have any callback order. It may seem like a lot but these heroes will help you with their +25% food production. Also the epics will allow you to duel more often in the faction camps so you can get items for Court Quests instead of spending gold to rank up. Double check if you can buy a callback order instead sometime they are cheaper than spending the gold directly.

 

search

Epic searches

This last thing is the most useful if you have never done it before. Getting epics from the career center will help you, but your main goal will be to get normal heroes that already got a “Bolus” to replace your existing heroes. What heroes with a “Bolus” mean,it mean it have a unlock skill book icon, will appear at the top of the list, and also cost double or quadruple resources to recruit. If they have a single skill book their first skill bar is open and if they have a double skill book they have 2 skill bars open. Once you equip them with Farm skill books these normal heroes can increase your production better than most epics, all without having to spend gold on Treasured/Purple Bolus. Any epics found while searching are nice, especially 2 and 3 star epics. I prefer to use the 10g search and find that if I have recruited my max number of normal heroes I have better luck finding Bolused normal heroes.

Nobility Rank

throne

Increasing your rank will allow you to assign your heroes to positions that increase their stats. More importantly it will allow your granaries to store more food, which is important if you plan to improve your resource fields to level 20. The easiest way to increase your nobility rank is to do duels in the faction camps. The more duels you do the better chances you have of getting a Court Quest item. You can only donate items up to a certain rank and then after that the Court Quest never asks for them again. To make the most of your items here is what you should be donating at each rank. Citizen– Wine, Salt, Silk Baron– Salt, Silk, Indigo Viscount– Silk, Indigo, Fur Marquis– Indigo, Fur, Horse Count– Fur, Horse, Spice Duke– Horse, Spice, Jade Infante– Spice, Jade, Pearl Lord-Jade, Pearl, Gold Save your Tribute Tokens for the later levels (Duke +) and only donate them during events that increase their value. How to get items to increase rank ? If you want to increase your nobility without gold the best way is to do faction quest and duel in the faction map. 1- Getting order arrows via Faction quest Order Arrows: Order Arrows are acquired through the Faction Quests. Only a few Faction Quests reward Order Arrows when you complete them. Once you have obtained Order Arrows through completing the Faction Quests, go to the Faction Map, then choose your Faction, then go to the Faction Reward page, and choose your reward. Not only are there Quest Items but there are armor, weapons, skill books, etc, so you may not wish to spend these versatile items on Quest Items. To spend Order Arrows follow these steps: order arrow 2- Dueling:When a player sends a hero to duel,if he wins the duel he may gain an item through the fight. Every once in awhile the item gained is a Quest Item. The Quest Items gained are usually Silk and Indigo, but very, very occasionally Fur and other higher Contribution Value Quest Items are gained through Dueling. Click the Faction Map button, then choose your Dueling Region, then pick your general to duel. I usually pick the highest level general to Duel, though if you lose most of your duels choose lower level generals to Duel. duel for nobility Source : http://forum.koramgame.com/forum.php?mod=viewthread&tid=16421&highlight=nobility Check this post on how to get to Generalissimo without gold : http://forum.koramgame.com/forum.php?mod=viewthread&tid=47520&highlight=nobility Do nobility rank increase rate of finding epic heroes ?¸ No, It will only affect the stats of normal heroes you found in the epic search. Nobility won’t affect the stats of epic heroes. Nobility rank have no effect on the probability of finding a epic hero. source : http://forum.koramgame.com/forum.php?mod=viewthread&tid=60963&highlight=nobility What the advantage of each rank

Rank Required Contribution Value Attack Bonus Defense Bonus Granary Size Increase
Baron 1200 1% 5% 0%
Viscount 10500 3% 10% 0%
Marquis 31500 5% 20% 10%
Count 101500 8% 30% 20%
Duke 241500 12% 40% 30%
Infante 451500 16% 50% 40%
Lord 696500 22% 50% 50%
Generalissimo 1396500 50% 50% 100%

TKO: server merge U45 & U46

server Merge U45 & U46

Here are the lucky server that got merged :

S80+S81+S82+S83 : U45
U31+U35 :  U46

Server merger Rules

armycomming thumb Clash of Kingdoms – Ultimate Infantry soldier spotlight. (Part 2)

The server rules are the same of the previous server merge, here the basic, check the forum thread for more info.

1) Extended the period for no starved troops (ie, soldiers won’t be fled if food drop below 0) and cancel maximum resources. The protection period (act like the beginner protection without the food starvation) last 2 day and normally the period for starved troop last 2 weeks.

2) Adjustment for relocation of cities : the migration talisman allow you to move your city, since only your main will be on the map you only need to move your main.

3) Method to expand:
1. Click on the empty space that player wish to move, click on “cities allocation” as shown on right action bar.
2. Click “cities allocation” button to pop out next interface
3. Click the cities that wish to allocate to complete the allocation of cities.

4)Rules for allocation of cities
1. Players can expand their sub-cities any time.
2. Every one day of delay after adjusting period will cause flee troops in accordance with 1% flee and up to 90% flee.
3. After the cities being expand, player cant deploy their troops for the first 24 hours. However the cities will still subjected to reinforcement and attack by enemies. Same principal for state token and capital move token.

 

And remember Logging in the newly merged server within two days after opening, all your cities will get a full Max-out of all resources.

 

More Information :

http://forum.koramgame.com/thread-87711-1-1.html

With the help of some post our friend wrote at http://www.lordofultimastrategies.com, we are doing a quick guide on Lord of ultima.

I’m just going to outline the basic, everything you need to know is at http://www.lordofultimastrategies.com.

First step: choosing the location of the city (Full article)

If you just started you can go to the next point, if you are building your next city here what you need to know.

The natural resources available to your city all depend on where you place your city. There are four different map elements that effect each square where you can place a city.

Map Node Resource Type
Mountain Iron
Hill Stone
Forrest Wood
Water Lakes

You can check what extra resources will be available by preplacing your city. Check the full how to in the article : Choosing a Location for Your City

Second Step: Building placement (Full article)

Unlike other Travian, TKO or Tribal War, where you place your building is very important in Lord of Ultima.

Natural resource influence the output of your resource producing building and you can add cottage and efficiency building to even increase the output more (example: forest increase the output of the Woodcutter building and the sawmill increase the output has well)

Cottage increase the construction speed of the city, a bit like the builder guild of Travian, Three Kingdom Online. Cottage also increase the output of your city.

If you want to optimize your economy building you need to be touching as many natural resources as possible and connected to the appropriate efficiency building too. The economy building should also touch a cottage also. This sounds simple, but it can get really complex to create the perfect resources output. On way of having to best layout is to use city planners so you can review the placement of these buildings before you commit building them.  One of my favorite is http://louopt.com/ if you are using another one feel free to tell me in the comment below.

The same apply for military building, you can checkout this article that cover everything you need to know about building placement