Start by analyzing the client you want to emulate. For this you will need a packet sniffer (WPE PRO or WireShark) and then take a look at what the Client sends to the Server. If the traffic between Client and Server looks encrypted, you will need to write a decrypter first. The Information on how the traffic is encrypted (if it is), you will need a debugger and a disassembler (IDA pro/Olly Dbg/even CheatEngine will do) to find out how the original client implements the encryption.
Once you got the un-encrypted traffic find out the protocol ("what do I need to send to the server to log-in, what do i need to send to the server to move/cast/jump..?") and then finally re-implement that protocol to your own application so it can emulate the client.
Beware, this might be a task way too complicated for someone who "did some applications before". The amount of work required is directly related to the amount of effort put in the original client to implement encryption and, of course, the complexity of the game and the complexity of your bot (a log-in bot obviously requires less work than a full-on farm or level-bot).
I wrote a chat-bot for Warcraft3TFT, since the battle.net didnt really utilize any encryption at that time it was quite simple and took me about a week until the bot was good enough to be published. But mind I did know what I was doing back then, if you dont have experience with packet-sniffing and sockets this will be a huge pain to learn (but it WILL be worth the effort since you learn stuff no one will ever teach you).