Alrighty, ur in the game you click a NPC, you click to buy an item. It then sends a packet to the server seeing if you have enough money an so on if you do it sends a packet back? Would that be correct? If not can someone help me?

You're talking about network programming. You send packets through sockets in C, which allows you to setup a client-server interface. Here is a good tutorial on sockets.

Next time try googling around before asking a question; googling for "packets" would have brought up a wealth of information that would have answered your question.

Are you using *nix or Windows. For Linux you can basically learn off the manual documentation (i.e man 7 socket). For Windows socket programming I recommend referrencing the Microsoft's website http://msdn2.microsoft.com/en-us/library/ms740673.aspx it'll provide documentation and tutorials for both Winsock and Winsock 2 programming.

For you question my answer is no, usually a client side module or program will check to see if you've got enough money to buy something. As for updating your current balance, sometimes the client will buffer and send an update at certain intervals or might just send it when the current balance changes; it all depends is what I mean.

Good luck, LamaBot

This article has been dead for over six months. Start a new discussion instead.