Bank System with Interest

Started by G_G, August 13, 2008, 05:03:55 pm

Previous topic - Next topic

G_G

Ok here is a bank system made by me with interest every 150 frames.

First make these 3 variables, [xxxx:Current Money] [xxxx:Bank Money] [xxxx:Input]
Now make a guy who is the banker and enter this

VarOper:[xxxx:Current Money] set = Current Gold
Hello Sir how may I help you?
ShowChoicesDeposit/Withdraw/Nothing
Deposit Handler
InputNumber[xxxx:Input]
Branch if [xxxx:Input] greater than[xxxx:Current Money]
  Sorry you dont have that much money
Else
  VarOper[xxxx:Bank Money] set = [xxxx:Input]'s Value
  Change Money Decrease by [xxxx:Input]'s value
  VarOper[xxxx:Input] set = 0
End
Withdraw Handler
InputNumber[xxxx:Input]
Branch if [xxxx:Input] greater than [xxxx:Bank Money]
  Sorry you don't have that much in your account.
Else
  VarOper[xxxx:Bank Money] minus - [xxxx:Input]'s valuej
  Change Money Increase by [xxxx:Input]'s Value
  VarOper[xxxx:Input] set = 0
End
Nothing Handler


Ok so theres the withdraw/deposit part, now into the interest, go to common events and make this

Label 1
Wait 150 Frames
Branch if [xxxx:Bank Money] = 0
Jump to Label 1
Else
VarOper[xxxx:Bank Money] add + 10
Jump to Label 1
End

Note there is alot more that can be done like in the else have a branch if Bank Money greater than 100
then VarOper add 25 to bank money. I hope you get the point but I hope you like it!

Sally

nice, do you think you will let me add interest to?

Blizzard

Quote from: game_guy on August 13, 2008, 05:03:55 pm
Ok here is a bank system made by me with interest every 150 frames.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.