ID:162348
 
I put a post on this last year trying to find out how to do it, but I just can't get one part.

What my idea is is its a world banking system. The way it works is like so. Say you have two accounts

Account 1
Account 2

Account 1 puts 10,000 gold ingots in the bank

Account 1 logs out.

Account 2 logs in.

Account 2 realizes the gold bars are on his other account.

Account 2 goes to the worldwide banker, enters his other accounts Key, and Bankpin.

Account 2 can now pull items/money from his other account


Even though this sounds insecure if someone finds out your password, there is also an offline bank, and also you can put your account on lockdown and only unlock it from your key.


The thing I need help with is registering people to be able to use this system. When you click the banker, you have to register a name. It will ask you for a pin. Once you enter your pin and verify it, it adds you to a list of people allowed to sign in.
This just seems like a bunch of extra work for basically zero gain. However:

var/list/bankingaccounts = list()

bankaccount //this datum would handle anything related to a bank account
var/pin
var/money
proc
withdraw(var/mob/M, var/amount)
if(amount > money)
return 0
else
money -= amount
M.money += amount
deposit(var/mob/M, var/amount)
if(amount > M.money)
return 0
else
M.money -= amount
money += amount

proc/openAccount(var/name, var/pin)
if(bankingaccounts.Find(name))
return 0
else
bankingaccounts.Add(name)
var/bankaccount/B = new()
B.pin = pin
bankingaccounts[name] = B

proc/getAccount(var/name, var/pin)
if(!bankingaccounts.Find(name))
return null
else
var/bankaccount/B = bankingaccounts[name]
if(B.pin != pin)
return null
else
return B