Banking System Tutorial With The Works I was looking threw all the other bank tutorials and most of them were good but that's not all a bank has to offer or work... In a real bank you just don't deposit and withdraw money you also get interest from the money you deposit. You can also borrow money from a bank and then pay them back. Now this is a little long and there may be a better way to do this but this is how I did it. We are going to make a bank with these options 1. Deposit money (get interest after a certain amount of time) 2. Withdraw money. 3. Borrow money with a credit line(also a interest on borrowing money) 4. Repay the bank. So for this we need 5 variables I set them up like this 0001:Account money 0002:Players money 0003:Temp money 0004:Credit Line 0005:Owe then open up the database and create a common event that is named Bank. Then set the Event Start Condition to Call. Actual Bank Part -------------------------- For the first event we want the face graphic for the teller. So pick one that you want. Next you want some sort of message so make one that's appropriate such as "welcome to the bank I am your teller today. How may I help you?" Now insert the show choice event Choice #1 should be Deposit #2 should be Withdraw #3 should be Borrow #4 Should be repay then click add case now under the deposit part this is what we want to do Select the event to change a variable. click one then Select the variable that is Players money. then click set. Then under the other pull down menu select money. Then have a message such as "How much would you like to deposit?" Then have the event Input number. have it 6 digits or what ever you want. Store the number into the variable temp money. Now set up a fork. Select variable and select the temp money variable. Now select Variab and select the variable players money. then choose bigger. Also click the add else case. Now have a message in the fork saying "Sorry you don't have that much money to deposit" Now under the else case put a change variable and click one select the account money variable. Then under set put + then put variable to the temp money variable. Now put the next event as change gold held. Select to decrease money then select variab and change it to temp money. Now put a message "Alright you deposited $\V[3] your bank balance is now $\V[1]. You get 3% interest a month." Then the end case comes next. Finally done that part but we only just started. Now under the withdraw case have a message saying "How much would you like to withdraw? You have $\V[1] in the bank" Now have an input number. 6 Digits and store into the temp money variable. now have a fork. have the variable as temp money. and variab as account money. then select bigger and add the else case. Have a message saying "Sorry you don't have that much money in the bank" Now under the else statement have a variable change event. Select one and change it to account money variable. set it to - then under variable select it to temp money. Next have a message saying "Alright you withdrew $\V[3] from the bank. Your bank balance is now $\V[1]" Now do change gold help and select it as increase and set the variable as temp money. Next comes the end case. Good done 2 of the four sections. Now under the Borrow case have a message saying "Your credit line is $\V[4]. How much do you want to borrow?" now have the input number and have it 6 digits or whatever you want. And store it in the temp money variable. (Yes this variable is getting used alot. I sure love temp variables.) Now have a fork. Under variable select the temp money variable. Now for variab select credit line variable. then select below. Also add an else case. Now have a message saying "You have been given $\V[3] Spend it wisely. You will be charged 5% a month. We will take it straight from your account. If you don't have enough money in your account we wont let you use the bank until you pay up." now have an event change gold held. Set it to increase and the variable to temp money. Now have a change variable set one to the owe variable. Now under set select set. Now under variable select the temp money variable. Now have another change variable this time under one select the credit line variable. Set it to - then under variable select the temp money variable. Now have a message saying "Your credit line is now $\V[4] and you owe the bank $\V[5] now under the else have a message saying "Sorry that amount is more then the credit line." next comes the end case. Now under the repay case have a message saying "You owe the bank $\V[5] How much are you going to pay back?" Then have an input number event and have 5 digits or whatever. store it in the temp money variable. Now have the change variable. Have one as players money. now set it to set. And under other choose money. Now set up a fork. Under variable choose the temp money variable. then under variab choose the players money variable and choose below. And now click the add else case. Now set up another fork (yes 2 forks in a row). For this one have the variable to temp money. have the variab as owe and set it to below and add an else. Now have a change variable. set one to owe set it to - and for the variable have it as temp money. Now have a message saying "You paid the bank $\V[3]. You Still owe $\V[5]" now have a change gold held event. set it to decrease and change the variable to temp money. Now comes the else have a message saying "You don't owe that much." then comes the end case. And the 2nd else have a message saying "You don't have enough money." Then there should be another end case. Now there should be a cancel case. Have a message saying "please come again." then the last end case and were done that part. So were done that long part but there still is more. Interest Part ---------------------------- Now make another common events called interest and set it to parallel process. And have the event start condition set as call. Now use the event called timer operations. Set it to set. Operand to set also. now set the time to how ever long you want it to be for a month. I choose 1 hour but you can choose whatever you want but for the sake of this tutorial I will use 1 hour. so put 60 in the minutes section. now click ok. now have another timer operation event. this time set it to start. Dont have a check in the display timer unless if you want the user to know how much time left so you can if you want. Now set up a fork event. Select the timer option and set it to 60 minutes. and then select above. we don't need any else in this one so leave that unchecked. Now create another timer and set it to set. then set it to 60 minutes again. Now another timer event have it set to start. Now have a variable change. Under one set it to temp money. set it to set. and the variable to account money. now have another variable change event set one to temp money. set it to * then under operand use the set and put 30. (30 is the 3% so change it if you want a different interest rate.) We need more steps since we can't use decimal numbers. So now have another change variable. set one to temp money. set it to / and then set it to 100 now we need 1 more change variable. this time set one to account money. set it to + and set variable to temp money. Now have a fork. Set the variable to owe. set the set to 1 and select above. Also add an else case. Now have another change variable set one to temp money. set it to set. and set variable to owe. we need another change variable. set one to temp money. set it to * set it to 5 (interest on the borrowing money.) now another change variable. set one to temp money. set it to / and set it to 100 now create a fork with an else. for the variable set it to account money. set the variab to temp money. and set it to above. now have another change variable set one to account money. Set it to - and set the variable to temp money. next is the else. and now another change variable set one to owe. set it to + and set the variable to temp money. Now make a switch called bank use and set it to off. next is the end case. next is the else case. now have a change variable set one to temp money. set it to set. and set variable to credit line. now have another change variable set one to temp money. set it to * and set it to 5 have another change variable set one to temp money. set it to / and set it to 100 now have another change variable. set one to credit line. set it to + and set variable to temp money. Now there's an end case and another now add a wait event and set it to 3600 seconds. But since the limit is 100 seconds you will need to put in 36 wait commands set for 100 seconds each. So that means the number you type in should be 1000 Now that's all for that section. Only 1 more to go but this is a little shorter. Bank teller ------------------ Now make your bank teller person and make it appropriate to the face you did way back when. Have it set as push key. Same level as hero common/without stepping stay still Ok now for the events. Use a fork and select the switch. choose the one you made earlier called bank use and have it as off. Add an else case to it. Have a message saying "Sorry you can't use the bank unless you pay what you owe. Remember you must pay all of what you owe all at once if you want to use the bank. \$Will you pay back what you owe which is $\V[5]?" Now have a show choice yes and no. For the yes case have change variable set one to player money. set it to set. set other to money. Now create another fork with an else. set the variable to owe. set the variab to player money and set it to below. Now have a change gold held. set it to decrease and set it to the owe variable. now have a change variable set one to owe. set it to set. and set it to 0 now have a message saying "\$Alright you paid back all y our debt. You can now use the bank but you credit line has been set to 250 GP" or what ever you want it to be then have a change variable and set one to credit line set it to set. and set it to 250 or whatever you want. next comes the else case. now have a message saying "You don't have enough money to pay back what you owe." next comes the end case next comes the no case. have a message saying "Well you can't use the bank until you pay your debt." next comes an end case next comes a else now make a call event and set it to bank. next comes the end case. It's now done. Some Loose ends to tie together ------------------------------- A few last things you have to do is at the beginning of the game you need to set the credit line variable to a number you want. So the line of code would be change variable set one to credit line set it to set and then under set type the amount you want. I used 1000 but you can use what you want. Also you have to make the bank use switch on also at the beginning of the game. Now all should be well and you should have a good banking system. Closing ----------------------------------------------------------------------------------------------------------------------------- Well that was one long tutorial but it gets results. I am sure there may be a faster way but this is the way I did it. Just to let you know it took me about 30 minutes to do it all then about 1 hour to debug/improve coding/options. And about another hour to right it all down.. (I am not a fast typer:-( ) Well my e-mail is master_kaos@hotmail.com so if you have any questions/comments or bug reports feel free to e-mail me. Now I guess the copy write stuff. Oh joy. Anyways I really don't believe in copy writes (probably cause I don't follow them such as burning cd's etc. But I guess I should include this anyways. You may use this tutorial on any site if you wish. However please give full credit to me And also send a check to me for $1 million (just kidding) My board name is Master Kaos21