My advice to you is to learn a particular programming language. The language you choose doesn't really matter.
Once you learn a programming, since writing a packet bot requires networking knowledge, you should learn about that.
Next, you might want to familiarize yourself with cryptography. I am currently working on a bot but I don't have much experience with cryptography (although it is easy to familiarize yourself).
When you get the basics of networking down, it is really easy to work with. Start off with something like an
echo program. Then a
chat program. They all branch from the same principles.
I wrote an article about writing an MMORPG a while back:
It may not be something about writing a bot, but a packet-based bot is certainly quite similar. Please keep in mind, that I haven't finished the post yet, so it might be a bit bare.
Do not skip a step. If writing a packet-based bot is your first programming project, do yourself a favor and just quit. Learn the basics, then everything will be a breeze.