This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
freiguy48's profile picture

Money/ATM help

Started by freiguy48, 05 November 2012 - 07:08 AM
freiguy48 #1
Posted 05 November 2012 - 08:08 AM
Hi I am trying to create a program that can check the amount of "money" on a floppy disk and have it so they they can sell or buy to gain/lose money but I don't know how to make it so that a computer can check the values on a disk and how to edit them either any help would be great.
kazagistar #2
Posted 05 November 2012 - 08:09 AM
http://computercraft.info/wiki/index.php?title=Fs.open
jag #3
Posted 05 November 2012 - 09:06 AM
Not so descriptive, but yes the file system is a great choice in this usage.
Sammich Lord #4
Posted 05 November 2012 - 11:35 AM
You NEVER want to store money on a disk. The reason is because anybody can give themselves a ton of money by editing the file it is stored on.
Leo Verto #5
Posted 05 November 2012 - 11:38 AM
We're currently discussing systems for doing that here.
Feel free to join the discussion and add new ideas.
brett122798 #6
Posted 05 November 2012 - 06:26 PM
I'm working on just this right now. Of course, all money is stored in a database/server and only certain computers can access that. So basically, here's how it works:

There's a server that always listens for transactions from the certain computers that can access it and when it gets something, it comes in three parts: Part #1 - Person ID Code | Part #2 - Mode(0 or 1, 0 is a deposit and 1 is a withdraw) | Part #3 - Number of money. The people on my server get a credit card that has an 8 digit code so nobody could ever guess the code. If their credit card gets stolen, that's their fault, so I'm not worried. Now currently, the server is half finished, it works though, and the ATM is completely finished for the most part but then I still need to start on the trader and the trader sells or buys stuff to/from people and the people's money goes to the seller's credit card or to the buyer's credit card. There would also be three rednet messages in this too: Part #1 - Seller ID Code | Part #2 - Buyer ID Code | Part #3 - Number of money.

So that's how my system is working.
PixelToast #7
Posted 05 November 2012 - 06:29 PM
i wouldnt use cards at all, unless i would like to take part in some hack warfare :3
Leo Verto #8
Posted 06 November 2012 - 03:48 AM
i wouldnt use cards at all, unless i would like to take part in some hack warfare :3
Team Econ/HBS wants to use credit cards and personal passwords for additional security, just as in real life.
TheSheiken #9
Posted 18 January 2013 - 08:22 AM
I'm working on just this right now. Of course, all money is stored in a database/server and only certain computers can access that. So basically, here's how it works:

There's a server that always listens for transactions from the certain computers that can access it and when it gets something, it comes in three parts: Part #1 - Person ID Code | Part #2 - Mode(0 or 1, 0 is a deposit and 1 is a withdraw) | Part #3 - Number of money. The people on my server get a credit card that has an 8 digit code so nobody could ever guess the code. If their credit card gets stolen, that's their fault, so I'm not worried. Now currently, the server is half finished, it works though, and the ATM is completely finished for the most part but then I still need to start on the trader and the trader sells or buys stuff to/from people and the people's money goes to the seller's credit card or to the buyer's credit card. There would also be three rednet messages in this too: Part #1 - Seller ID Code | Part #2 - Buyer ID Code | Part #3 - Number of money.

So that's how my system is working.

Saunds cool but can u plz shere the code i haw looked at a couple of simulars 1 but i haw newer manage to run them
PixelToast #10
Posted 18 January 2013 - 08:34 AM
achevement get!
bump a ancient thread
you would need an authentication server to do this securely
ChunLing #11
Posted 18 January 2013 - 12:16 PM
I wouldn't call this thread ancient. However, it is a good idea to accept that if someone hasn't posted the code for their secure banking system, they have a reason.

It is also good practice to use the concepts discussed here to design your own system and begin coding it, if you are not satisfied with any ready-made solutions available in the Programs forum. When you run into an actual difficulty (not just "I'd rather someone else coded this for me" itis), please feel free to ask for help with the specific problem you're having.