Chaos Project

RPG Maker => Event Systems => Topic started by: G_G on August 13, 2008, 05:03:55 pm

Title: Bank System with Interest
Post by: G_G on August 13, 2008, 05:03:55 pm
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!
Title: Re: Bank System with Interest
Post by: Sally on August 15, 2008, 09:50:56 am
nice, do you think you will let me add interest to?
Title: Re: Bank System with Interest
Post by: Blizzard on August 15, 2008, 10:25:19 am
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.