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).