bank.txt 125 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794
  1. //========================================================================================
  2. // -»» OmniAthena Scripts ««-
  3. // Copyright (c) 2004, Athena Advanced
  4. // http://agelessanime.com/aaforums/
  5. // By MC_Cameri
  6. // This Bank NPC doesn't need any items.
  7. // It is useful for servers in which you
  8. // lose zeny when you die.
  9. // Also, if you have 1,000,000,000z this
  10. // will be good to use.
  11. //========================================================================================
  12. //0072FF (sky blue)
  13. //FF7F01 (orange)
  14. prt_in.gat,165,141,4 script Bank Manager 109,{
  15. set @tInterestRate, 2; //no decimals
  16. set @tMaxAccZeny, 1000000000; //max zeny allowed in ^FF7F01Bank Account^000000 1,000,000,000=1 billion
  17. set @tMaxZeny, 1000000000; //max zeny that a player can carry
  18. set @tMinZeny, 100; //min zeny allowed or Bank Account is closed
  19. set @tCreateZeny, 500; //zeny needed in order to create a Bank Account
  20. set @tMinDeposit,100; //min zeny to deposit
  21. set @tBeginningZeny, 100; //amount of zeny in Bank Account after creating
  22. mes "^0072FF[Bank Manager]^000000";
  23. mes "Welcome to this office branch of Midgard's Bank.";
  24. next;
  25. if (vBankAccActive==1) goto AccMenu;
  26. mes "^0072FF[Bank Manager]^000000";
  27. mes "You don't have a ^FF7F01Bank Account^000000 yet, you must buy one.";
  28. mes "It will cost you ^0000FF" + @tCreateZeny + "z^000000 to create it.";
  29. next;
  30. menu "^FF7F01Create Account.^000000",CreateAcc,"^FF7F01Information.^000000",BankInfo,"^FF7F01No thanks.^000000",NoCreateAcc;
  31. BankInfo:
  32. mes "^0072FF[Bank Manager]^000000";
  33. mes "Here are some points that you need to know:";
  34. mes "1. To create a ^FF7F01Bank Account^000000 you have to pay ^0000FF" + @tCreateZeny + "z^000000.";
  35. mes "2. You will be charged ^0000FF" + @tInterestRate + " percent^000000 everytime you Deposit.";
  36. mes "3. You must always have no less than ^0000FF" + @tMinZeny + "z^000000 on your ^FF7F01Bank Account^000000.";
  37. next;
  38. mes "4. You can save up to ^0000FF" + @tMaxAccZeny + "z^000000 in your bank account.";
  39. mes "5. You will be able to access your ^FF7F01Bank Account^000000 in any town with a Bank Office.";
  40. mes "6. You will start by having ^0000FF" + @tBeginningZeny + "z^000000 in your bank account.";
  41. close;
  42. CreateAcc:
  43. mes "^0072FF[Bank Manager]^000000";
  44. mes "First of all, you will have to have at least ^0000FF" + @tCreateZeny + "z^000000 with you.";
  45. mes "Your account will start with ^0000FF" + @tBeginningZeny +"z^000000.";
  46. mes "Are you sure you want to continue?";
  47. next;
  48. menu "^FF7F01Sure.^000000",CreateAccCont,"^FF7F01Nah, it's ok.^000000",NoCreateAcc;
  49. CreateAccCont:
  50. if (@tCreateZeny > Zeny) goto CreateAccNoEnoughZeny;
  51. set Zeny, Zeny - @tCreateZeny;
  52. set vBankAccActive,1;
  53. set vBankAccZeny, @tBeginningZeny;
  54. set vBankAccLastZeny, @tBeginningZeny;
  55. set vBankAccInterests,0;
  56. mes "^0072FF[Bank Manager]^000000";
  57. mes "Congratulations, your ^FF7F01Bank Account^000000 is now created with ^0000FF" + vBankAccZeny + "z^000000.";
  58. mes "You may now proceed to do any transactions.";
  59. next;
  60. goto AccMenu;
  61. CreateAccNoEnoughZeny:
  62. mes "^0072FF[Bank Manager]^000000";
  63. mes "Didn't I tell you to make sure you had enough zeny?";
  64. mes "You can't create it with just ^0000FF" + Zeny + "z^000000.";
  65. mes "Come back when you get those ^0000FF" + @tCreateZeny + "z^000000...";
  66. next;
  67. goto EndNPC;
  68. NoCreateAcc:
  69. mes "^0072FF[Bank Manager]^000000";
  70. mes "Come back when you change your mind!";
  71. next;
  72. goto EndNPC;
  73. AccMenu:
  74. mes "^0072FF[Bank Manager]^000000";
  75. mes "Your current balance is ^0000FF" + vBankAccZeny +"z^000000.";
  76. mes "What would you like to do now?";
  77. next;
  78. menu "^FF7F01Deposit.^000000",AccDeposit,"^FF7F01Withdraw.^000000",AccWithdraw,"^FF7F01Bank Account Info.^000000",AccBalance,"^FF7F01Close Bank Account^000000",AccClose,"^FF7F01Cancel.^000000",EndNPC;
  79. AccDeposit:
  80. mes "^0072FF[Bank Manager]^000000";
  81. mes "It's always good to deposit every once in a while.";
  82. mes "Be noticed that we charge a ^0000FF" + @tInterestRate + " percent ^000000 of interest rate in every deposit you make.";
  83. mes "This means that to deposit ^0000FF100z^000000 you need to have pay us ^0000FF" + 100 * @tInterestRate / 100 + "z^000000.";
  84. mes "How much are you willing to deposit?";
  85. next;
  86. AccDepositInput:
  87. input @tDeposit;
  88. set @tDepositTax, @tDeposit * @tInterestRate / 100;
  89. set @tDepositTotal, @tDeposit - @tDepositTax;
  90. if (@tDeposit <= 0) goto AccDepositNoInput;
  91. if (@tDeposit < @tMinDeposit) goto AccDepositNotEnoughInput;
  92. if (@tDepositTotal > Zeny) goto AccDepositNotEnoughZeny;
  93. set @tBankAccZenyTemp, vBankAccZeny + @tDepositTotal;
  94. if (@tBankAccZenyTemp > @tMaxAccZeny) goto AccDepositOver;
  95. if ((@tDeposit <= Zeny) && (@tBankAccZenyTemp <= @tMaxAccZeny)) goto AccDepositCont;
  96. mes "^0072FF[Bank Manager]^000000";
  97. mes "Sorry, for some weird reason I couldn't deposit your money.";
  98. next;
  99. goto AccMenu;
  100. AccDepositCont:
  101. set Zeny, Zeny - @tDeposit;
  102. set vBankAccLastZeny, vBankAccZeny;
  103. set vBankAccZeny, @tBankAccZenyTemp;
  104. set vBankAccInterests, vBankAccInterests + @tDepositTax;
  105. mes "^0072FF[Bank Manager]^000000";
  106. mes "Transaction completed successfully.";
  107. mes "^0000FF" + @tDeposit + "z^000000 substracted from your money (Taxes applied).";
  108. mes "^0000FF" + @tDepositTotal + "z^000000 successfully added to your ^FF7F01Bank Account^000000.";
  109. next;
  110. goto AccMenu;
  111. AccDepositOver:
  112. mes "^0072FF[Bank Manager]^000000";
  113. mes "There is a limit of ^0000FF" + @tMaxAccZeny + "z^000000 of how much zeny your ^FF7F01Bank Account^000000 can hold.";
  114. mes "You can't deposit more than that, please try again.";
  115. mes "Do you want to try again?";
  116. next;
  117. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  118. AccDepositNotEnoughInput:
  119. mes "^0072FF[Bank Manager]^000000";
  120. mes "You need to put more money in order to make a deposit.";
  121. mes "Do you want to try again?";
  122. next;
  123. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  124. AccDepositNoInput:
  125. mes "^0072FF[Bank Manager]^000000";
  126. mes "You must enter a value higher than ^0000FF" + @tMinDeposit + "z^000000.";
  127. mes "Do you want to try again?";
  128. next;
  129. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  130. AccDepositNotEnoughZeny:
  131. mes "^0072FF[Bank Manager]^000000";
  132. mes "You don't have ^0000FF" + @tDepositTotal + "z^000000.";
  133. mes "Remember that taxes are being applied.";
  134. mes "Do you want to try again?";
  135. next;
  136. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  137. AccWithdraw:
  138. mes "^0072FF[Bank Manager]^000000";
  139. mes "This is the only transaction I don't like... you figure out why...";
  140. mes "You can't withdraw leaving less than ^0000FF" + @tMinZeny +"z^000000 in your ^FF7F01Bank Account^000000.";
  141. mes "Your current balance is ^0000FF" + vBankAccZeny + "z^000000.";
  142. mes "How much are you going to widthdraw?";
  143. next;
  144. AccWithdrawInput:
  145. input @tWithdraw;
  146. set @tZenyLeft, vBankAccZeny - @tWithdraw;
  147. set @tZenyTemp, Zeny + @tWithdraw;
  148. if (@tWithdraw == 0) goto AccWithdrawNoInput;
  149. if (@tZenyLeft < @tMinZeny) goto AccWithdrawMinZeny;
  150. if (@tZenyTemp > @tMaxZeny) goto AccWithDrawOverCharZeny;
  151. set Zeny, Zeny + @tWithdraw;
  152. set vBankAccLastZeny, vBankAccZeny;
  153. set vBankAccZeny, vBankAccZeny - @tWithdraw;
  154. mes "^0072FF[Bank Manager]^000000";
  155. mes "Transaction completed successfully.";
  156. mes "Thank you for using our services.";
  157. next;
  158. goto AccMenu;
  159. AccWithdrawNoInput:
  160. mes "^0072FF[Bank Manager]^000000";
  161. mes "In order to withdraw from the bank, you must withdraw more than 0 zeny.";
  162. mes "Do you want to try again?";
  163. next;
  164. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  165. AccWithdrawMinZeny:
  166. mes "^0072FF[Bank Manager]^000000";
  167. mes "I'm sorry...";
  168. mes "You can't withdraw ^0000FF" + @tWithdraw + "z^000000 because your ^FF7F01Bank Account^000000 must have ^0000FF" + @tMinZeny + "z^000000 left or more at all times.";
  169. mes "In order to take all your money from the bank you must select Close Account in the Account Menu.";
  170. mes "Do you want to try again?";
  171. next;
  172. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  173. AccWithDrawOverCharZeny:
  174. mes "^0072FF[Bank Manager]^000000";
  175. mes "Sorry, but you can't withdraw ^0000FF" + @tWithdraw + "z^000000 because your Player can't carry more than ^0000FF" + @tMaxZeny + "z^000000.";
  176. mes "Do you want to try again?";
  177. next;
  178. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  179. AccBalance:
  180. mes "^0072FF[Bank Manager]^000000";
  181. mes "Account Status:";
  182. //shown in blue if the same or more, show in red if less than previous balance
  183. if (vBankAccZeny >= vBankAccLastZeny) goto AccBalance2;
  184. mes "Current Balance: ^FF0000" + vBankAccZeny +"z^000000.";
  185. goto AccBalance3;
  186. AccBalance2:
  187. mes "Current Balance: ^0000FF" + vBankAccZeny +"z^000000.";
  188. goto AccBalance3;
  189. AccBalance3:
  190. mes "Previous Balance: ^0000FF" + vBankAccLastZeny +"z^000000.";
  191. mes "Interest Rate: ^0000FF" + @tInterestRate + "%^000000.";
  192. mes "Interests Payed: ^0000FF" + vBankAccInterests + "z^000000.";
  193. next;
  194. goto AccMenu;
  195. AccClose:
  196. mes "^0072FF[Bank Manager]^000000";
  197. mes "If you close your ^FF7F01Bank Account^000000, it means you eliminate it.";
  198. mes "Of course, you will get all your money back.";
  199. mes "Are you sure you want to close your ^FF7F01Bank Account^000000?";
  200. next;
  201. menu "^FF7F01I don't want it anymore.^000000",AccCloseConfirm,"^FF7F01No, I'll keep it.^000000",AccCloseKeep;
  202. AccCloseConfirm:
  203. set vBankAccActive,0;
  204. set Zeny, Zeny + vBankAccZeny;
  205. set vBankAccZeny,0;
  206. set vBankAccLastZeny,0;
  207. set vBankAccInterests,0;
  208. mes "^0072FF[Bank Manager]^000000";
  209. mes "Thanks for using our services, we hope you come back to visit us.";
  210. mes "Here's your money.";
  211. next;
  212. goto EndNPC;
  213. AccCloseKeep:
  214. mes "^0072FF[Bank Manager]^000000";
  215. mes "Good choice, thanks for staying with us.";
  216. next;
  217. goto AccMenu;
  218. EndNPC:
  219. set @random,rand(4);
  220. mes "^0072FF[Bank Manager]^000000";
  221. if (@random == 0) mes "Have a nice day!";
  222. if (@random == 1) mes "See you soon!";
  223. if (@random == 2) mes "See you next time!";
  224. if (@random == 3) mes "Come back soon!";
  225. close;
  226. }
  227. izlude_in.gat,57,110,4 script Bank Manager 109,{
  228. set @tInterestRate, 2; //no decimals
  229. set @tMaxAccZeny, 1000000000; //max zeny allowed in ^FF7F01Bank Account^000000 1,000,000,000=1 billion
  230. set @tMaxZeny, 1000000000; //max zeny that a player can carry
  231. set @tMinZeny, 100; //min zeny allowed or Bank Account is closed
  232. set @tCreateZeny, 500; //zeny needed in order to create a Bank Account
  233. set @tMinDeposit,100; //min zeny to deposit
  234. set @tBeginningZeny, 100; //amount of zeny in Bank Account after creating
  235. mes "^0072FF[Bank Manager]^000000";
  236. mes "Welcome to this office branch of Midgard's Bank.";
  237. next;
  238. if (vBankAccActive==1) goto AccMenu;
  239. mes "^0072FF[Bank Manager]^000000";
  240. mes "You don't have a ^FF7F01Bank Account^000000 yet, you must buy one.";
  241. mes "It will cost you ^0000FF" + @tCreateZeny + "z^000000 to create it.";
  242. next;
  243. menu "^FF7F01Create Account.^000000",CreateAcc,"^FF7F01Information.^000000",BankInfo,"^FF7F01No thanks.^000000",NoCreateAcc;
  244. BankInfo:
  245. mes "^0072FF[Bank Manager]^000000";
  246. mes "Here are some points that you need to know:";
  247. mes "1. To create a ^FF7F01Bank Account^000000 you have to pay ^0000FF" + @tCreateZeny + "z^000000.";
  248. mes "2. You will be charged ^0000FF" + @tInterestRate + " percent^000000 everytime you Deposit.";
  249. mes "3. You must always have no less than ^0000FF" + @tMinZeny + "z^000000 on your ^FF7F01Bank Account^000000.";
  250. next;
  251. mes "4. You can save up to ^0000FF" + @tMaxAccZeny + "z^000000 in your bank account.";
  252. mes "5. You will be able to access your ^FF7F01Bank Account^000000 in any town with a Bank Office.";
  253. mes "6. You will start by having ^0000FF" + @tBeginningZeny + "z^000000 in your bank account.";
  254. close;
  255. CreateAcc:
  256. mes "^0072FF[Bank Manager]^000000";
  257. mes "First of all, you will have to have at least ^0000FF" + @tCreateZeny + "z^000000 with you.";
  258. mes "Your account will start with ^0000FF" + @tBeginningZeny +"z^000000.";
  259. mes "Are you sure you want to continue?";
  260. next;
  261. menu "^FF7F01Sure.^000000",CreateAccCont,"^FF7F01Nah, it's ok.^000000",NoCreateAcc;
  262. CreateAccCont:
  263. if (@tCreateZeny > Zeny) goto CreateAccNoEnoughZeny;
  264. set Zeny, Zeny - @tCreateZeny;
  265. set vBankAccActive,1;
  266. set vBankAccZeny, @tBeginningZeny;
  267. set vBankAccLastZeny, @tBeginningZeny;
  268. set vBankAccInterests,0;
  269. mes "^0072FF[Bank Manager]^000000";
  270. mes "Congratulations, your ^FF7F01Bank Account^000000 is now created with ^0000FF" + vBankAccZeny + "z^000000.";
  271. mes "You may now proceed to do any transactions.";
  272. next;
  273. goto AccMenu;
  274. CreateAccNoEnoughZeny:
  275. mes "^0072FF[Bank Manager]^000000";
  276. mes "Didn't I tell you to make sure you had enough zeny?";
  277. mes "You can't create it with just ^0000FF" + Zeny + "z^000000.";
  278. mes "Come back when you get those ^0000FF" + @tCreateZeny + "z^000000...";
  279. next;
  280. goto EndNPC;
  281. NoCreateAcc:
  282. mes "^0072FF[Bank Manager]^000000";
  283. mes "Come back when you change your mind!";
  284. next;
  285. goto EndNPC;
  286. AccMenu:
  287. mes "^0072FF[Bank Manager]^000000";
  288. mes "Your current balance is ^0000FF" + vBankAccZeny +"z^000000.";
  289. mes "What would you like to do now?";
  290. next;
  291. menu "^FF7F01Deposit.^000000",AccDeposit,"^FF7F01Withdraw.^000000",AccWithdraw,"^FF7F01Bank Account Info.^000000",AccBalance,"^FF7F01Close Bank Account^000000",AccClose,"^FF7F01Cancel.^000000",EndNPC;
  292. AccDeposit:
  293. mes "^0072FF[Bank Manager]^000000";
  294. mes "It's always good to deposit every once in a while.";
  295. mes "Be noticed that we charge a ^0000FF" + @tInterestRate + " percent ^000000 of interest rate in every deposit you make.";
  296. mes "This means that to deposit ^0000FF100z^000000 you need to have pay us ^0000FF" + 100 * @tInterestRate / 100 + "z^000000.";
  297. mes "How much are you willing to deposit?";
  298. next;
  299. AccDepositInput:
  300. input @tDeposit;
  301. set @tDepositTax, @tDeposit * @tInterestRate / 100;
  302. set @tDepositTotal, @tDeposit - @tDepositTax;
  303. if (@tDeposit <= 0) goto AccDepositNoInput;
  304. if (@tDeposit < @tMinDeposit) goto AccDepositNotEnoughInput;
  305. if (@tDepositTotal > Zeny) goto AccDepositNotEnoughZeny;
  306. set @tBankAccZenyTemp, vBankAccZeny + @tDepositTotal;
  307. if (@tBankAccZenyTemp > @tMaxAccZeny) goto AccDepositOver;
  308. if ((@tDeposit <= Zeny) && (@tBankAccZenyTemp <= @tMaxAccZeny)) goto AccDepositCont;
  309. mes "^0072FF[Bank Manager]^000000";
  310. mes "Sorry, for some weird reason I couldn't deposit your money.";
  311. next;
  312. goto AccMenu;
  313. AccDepositCont:
  314. set Zeny, Zeny - @tDeposit;
  315. set vBankAccLastZeny, vBankAccZeny;
  316. set vBankAccZeny, @tBankAccZenyTemp;
  317. set vBankAccInterests, vBankAccInterests + @tDepositTax;
  318. mes "^0072FF[Bank Manager]^000000";
  319. mes "Transaction completed successfully.";
  320. mes "^0000FF" + @tDeposit + "z^000000 substracted from your money (Taxes applied).";
  321. mes "^0000FF" + @tDepositTotal + "z^000000 successfully added to your ^FF7F01Bank Account^000000.";
  322. next;
  323. goto AccMenu;
  324. AccDepositOver:
  325. mes "^0072FF[Bank Manager]^000000";
  326. mes "There is a limit of ^0000FF" + @tMaxAccZeny + "z^000000 of how much zeny your ^FF7F01Bank Account^000000 can hold.";
  327. mes "You can't deposit more than that, please try again.";
  328. mes "Do you want to try again?";
  329. next;
  330. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  331. AccDepositNotEnoughInput:
  332. mes "^0072FF[Bank Manager]^000000";
  333. mes "You need to put more money in order to make a deposit.";
  334. mes "Do you want to try again?";
  335. next;
  336. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  337. AccDepositNoInput:
  338. mes "^0072FF[Bank Manager]^000000";
  339. mes "You must enter a value higher than ^0000FF" + @tMinDeposit + "z^000000.";
  340. mes "Do you want to try again?";
  341. next;
  342. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  343. AccDepositNotEnoughZeny:
  344. mes "^0072FF[Bank Manager]^000000";
  345. mes "You don't have ^0000FF" + @tDepositTotal + "z^000000.";
  346. mes "Remember that taxes are being applied.";
  347. mes "Do you want to try again?";
  348. next;
  349. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  350. AccWithdraw:
  351. mes "^0072FF[Bank Manager]^000000";
  352. mes "This is the only transaction I don't like... you figure out why...";
  353. mes "You can't withdraw leaving less than ^0000FF" + @tMinZeny +"z^000000 in your ^FF7F01Bank Account^000000.";
  354. mes "Your current balance is ^0000FF" + vBankAccZeny + "z^000000.";
  355. mes "How much are you going to widthdraw?";
  356. next;
  357. AccWithdrawInput:
  358. input @tWithdraw;
  359. set @tZenyLeft, vBankAccZeny - @tWithdraw;
  360. set @tZenyTemp, Zeny + @tWithdraw;
  361. if (@tWithdraw == 0) goto AccWithdrawNoInput;
  362. if (@tZenyLeft < @tMinZeny) goto AccWithdrawMinZeny;
  363. if (@tZenyTemp > @tMaxZeny) goto AccWithDrawOverCharZeny;
  364. set Zeny, Zeny + @tWithdraw;
  365. set vBankAccLastZeny, vBankAccZeny;
  366. set vBankAccZeny, vBankAccZeny - @tWithdraw;
  367. mes "^0072FF[Bank Manager]^000000";
  368. mes "Transaction completed successfully.";
  369. mes "Thank you for using our services.";
  370. next;
  371. goto AccMenu;
  372. AccWithdrawNoInput:
  373. mes "^0072FF[Bank Manager]^000000";
  374. mes "In order to withdraw from the bank, you must withdraw more than 0 zeny.";
  375. mes "Do you want to try again?";
  376. next;
  377. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  378. AccWithdrawMinZeny:
  379. mes "^0072FF[Bank Manager]^000000";
  380. mes "I'm sorry...";
  381. mes "You can't withdraw ^0000FF" + @tWithdraw + "z^000000 because your ^FF7F01Bank Account^000000 must have ^0000FF" + @tMinZeny + "z^000000 left or more at all times.";
  382. mes "In order to take all your money from the bank you must select Close Account in the Account Menu.";
  383. mes "Do you want to try again?";
  384. next;
  385. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  386. AccWithDrawOverCharZeny:
  387. mes "^0072FF[Bank Manager]^000000";
  388. mes "Sorry, but you can't withdraw ^0000FF" + @tWithdraw + "z^000000 because your Player can't carry more than ^0000FF" + @tMaxZeny + "z^000000.";
  389. mes "Do you want to try again?";
  390. next;
  391. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  392. AccBalance:
  393. mes "^0072FF[Bank Manager]^000000";
  394. mes "Account Status:";
  395. //shown in blue if the same or more, show in red if less than previous balance
  396. if (vBankAccZeny >= vBankAccLastZeny) goto AccBalance2;
  397. mes "Current Balance: ^FF0000" + vBankAccZeny +"z^000000.";
  398. goto AccBalance3;
  399. AccBalance2:
  400. mes "Current Balance: ^0000FF" + vBankAccZeny +"z^000000.";
  401. goto AccBalance3;
  402. AccBalance3:
  403. mes "Previous Balance: ^0000FF" + vBankAccLastZeny +"z^000000.";
  404. mes "Interest Rate: ^0000FF" + @tInterestRate + "%^000000.";
  405. mes "Interests Payed: ^0000FF" + vBankAccInterests + "z^000000.";
  406. next;
  407. goto AccMenu;
  408. AccClose:
  409. mes "^0072FF[Bank Manager]^000000";
  410. mes "If you close your ^FF7F01Bank Account^000000, it means you eliminate it.";
  411. mes "Of course, you will get all your money back.";
  412. mes "Are you sure you want to close your ^FF7F01Bank Account^000000?";
  413. next;
  414. menu "^FF7F01I don't want it anymore.^000000",AccCloseConfirm,"^FF7F01No, I'll keep it.^000000",AccCloseKeep;
  415. AccCloseConfirm:
  416. set vBankAccActive,0;
  417. set Zeny, Zeny + vBankAccZeny;
  418. set vBankAccZeny,0;
  419. set vBankAccLastZeny,0;
  420. set vBankAccInterests,0;
  421. mes "^0072FF[Bank Manager]^000000";
  422. mes "Thanks for using our services, we hope you come back to visit us.";
  423. mes "Here's your money.";
  424. next;
  425. goto EndNPC;
  426. AccCloseKeep:
  427. mes "^0072FF[Bank Manager]^000000";
  428. mes "Good choice, thanks for staying with us.";
  429. next;
  430. goto AccMenu;
  431. EndNPC:
  432. set @random,rand(4);
  433. mes "^0072FF[Bank Manager]^000000";
  434. if (@random == 0) mes "Have a nice day!";
  435. if (@random == 1) mes "See you soon!";
  436. if (@random == 2) mes "See you next time!";
  437. if (@random == 3) mes "Come back soon!";
  438. close;
  439. }
  440. morocc_in.gat,142,64,3 script Bank Manager 109,{
  441. set @tInterestRate, 2; //no decimals
  442. set @tMaxAccZeny, 1000000000; //max zeny allowed in ^FF7F01Bank Account^000000 1,000,000,000=1 billion
  443. set @tMaxZeny, 1000000000; //max zeny that a player can carry
  444. set @tMinZeny, 100; //min zeny allowed or Bank Account is closed
  445. set @tCreateZeny, 500; //zeny needed in order to create a Bank Account
  446. set @tMinDeposit,100; //min zeny to deposit
  447. set @tBeginningZeny, 100; //amount of zeny in Bank Account after creating
  448. mes "^0072FF[Bank Manager]^000000";
  449. mes "Welcome to this office branch of Midgard's Bank.";
  450. next;
  451. if (vBankAccActive==1) goto AccMenu;
  452. mes "^0072FF[Bank Manager]^000000";
  453. mes "You don't have a ^FF7F01Bank Account^000000 yet, you must buy one.";
  454. mes "It will cost you ^0000FF" + @tCreateZeny + "z^000000 to create it.";
  455. next;
  456. menu "^FF7F01Create Account.^000000",CreateAcc,"^FF7F01Information.^000000",BankInfo,"^FF7F01No thanks.^000000",NoCreateAcc;
  457. BankInfo:
  458. mes "^0072FF[Bank Manager]^000000";
  459. mes "Here are some points that you need to know:";
  460. mes "1. To create a ^FF7F01Bank Account^000000 you have to pay ^0000FF" + @tCreateZeny + "z^000000.";
  461. mes "2. You will be charged ^0000FF" + @tInterestRate + " percent^000000 everytime you Deposit.";
  462. mes "3. You must always have no less than ^0000FF" + @tMinZeny + "z^000000 on your ^FF7F01Bank Account^000000.";
  463. next;
  464. mes "4. You can save up to ^0000FF" + @tMaxAccZeny + "z^000000 in your bank account.";
  465. mes "5. You will be able to access your ^FF7F01Bank Account^000000 in any town with a Bank Office.";
  466. mes "6. You will start by having ^0000FF" + @tBeginningZeny + "z^000000 in your bank account.";
  467. close;
  468. CreateAcc:
  469. mes "^0072FF[Bank Manager]^000000";
  470. mes "First of all, you will have to have at least ^0000FF" + @tCreateZeny + "z^000000 with you.";
  471. mes "Your account will start with ^0000FF" + @tBeginningZeny +"z^000000.";
  472. mes "Are you sure you want to continue?";
  473. next;
  474. menu "^FF7F01Sure.^000000",CreateAccCont,"^FF7F01Nah, it's ok.^000000",NoCreateAcc;
  475. CreateAccCont:
  476. if (@tCreateZeny > Zeny) goto CreateAccNoEnoughZeny;
  477. set Zeny, Zeny - @tCreateZeny;
  478. set vBankAccActive,1;
  479. set vBankAccZeny, @tBeginningZeny;
  480. set vBankAccLastZeny, @tBeginningZeny;
  481. set vBankAccInterests,0;
  482. mes "^0072FF[Bank Manager]^000000";
  483. mes "Congratulations, your ^FF7F01Bank Account^000000 is now created with ^0000FF" + vBankAccZeny + "z^000000.";
  484. mes "You may now proceed to do any transactions.";
  485. next;
  486. goto AccMenu;
  487. CreateAccNoEnoughZeny:
  488. mes "^0072FF[Bank Manager]^000000";
  489. mes "Didn't I tell you to make sure you had enough zeny?";
  490. mes "You can't create it with just ^0000FF" + Zeny + "z^000000.";
  491. mes "Come back when you get those ^0000FF" + @tCreateZeny + "z^000000...";
  492. next;
  493. goto EndNPC;
  494. NoCreateAcc:
  495. mes "^0072FF[Bank Manager]^000000";
  496. mes "Come back when you change your mind!";
  497. next;
  498. goto EndNPC;
  499. AccMenu:
  500. mes "^0072FF[Bank Manager]^000000";
  501. mes "Your current balance is ^0000FF" + vBankAccZeny +"z^000000.";
  502. mes "What would you like to do now?";
  503. next;
  504. menu "^FF7F01Deposit.^000000",AccDeposit,"^FF7F01Withdraw.^000000",AccWithdraw,"^FF7F01Bank Account Info.^000000",AccBalance,"^FF7F01Close Bank Account^000000",AccClose,"^FF7F01Cancel.^000000",EndNPC;
  505. AccDeposit:
  506. mes "^0072FF[Bank Manager]^000000";
  507. mes "It's always good to deposit every once in a while.";
  508. mes "Be noticed that we charge a ^0000FF" + @tInterestRate + " percent ^000000 of interest rate in every deposit you make.";
  509. mes "This means that to deposit ^0000FF100z^000000 you need to have pay us ^0000FF" + 100 * @tInterestRate / 100 + "z^000000.";
  510. mes "How much are you willing to deposit?";
  511. next;
  512. AccDepositInput:
  513. input @tDeposit;
  514. set @tDepositTax, @tDeposit * @tInterestRate / 100;
  515. set @tDepositTotal, @tDeposit - @tDepositTax;
  516. if (@tDeposit <= 0) goto AccDepositNoInput;
  517. if (@tDeposit < @tMinDeposit) goto AccDepositNotEnoughInput;
  518. if (@tDepositTotal > Zeny) goto AccDepositNotEnoughZeny;
  519. set @tBankAccZenyTemp, vBankAccZeny + @tDepositTotal;
  520. if (@tBankAccZenyTemp > @tMaxAccZeny) goto AccDepositOver;
  521. if ((@tDeposit <= Zeny) && (@tBankAccZenyTemp <= @tMaxAccZeny)) goto AccDepositCont;
  522. mes "^0072FF[Bank Manager]^000000";
  523. mes "Sorry, for some weird reason I couldn't deposit your money.";
  524. next;
  525. goto AccMenu;
  526. AccDepositCont:
  527. set Zeny, Zeny - @tDeposit;
  528. set vBankAccLastZeny, vBankAccZeny;
  529. set vBankAccZeny, @tBankAccZenyTemp;
  530. set vBankAccInterests, vBankAccInterests + @tDepositTax;
  531. mes "^0072FF[Bank Manager]^000000";
  532. mes "Transaction completed successfully.";
  533. mes "^0000FF" + @tDeposit + "z^000000 substracted from your money (Taxes applied).";
  534. mes "^0000FF" + @tDepositTotal + "z^000000 successfully added to your ^FF7F01Bank Account^000000.";
  535. next;
  536. goto AccMenu;
  537. AccDepositOver:
  538. mes "^0072FF[Bank Manager]^000000";
  539. mes "There is a limit of ^0000FF" + @tMaxAccZeny + "z^000000 of how much zeny your ^FF7F01Bank Account^000000 can hold.";
  540. mes "You can't deposit more than that, please try again.";
  541. mes "Do you want to try again?";
  542. next;
  543. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  544. AccDepositNotEnoughInput:
  545. mes "^0072FF[Bank Manager]^000000";
  546. mes "You need to put more money in order to make a deposit.";
  547. mes "Do you want to try again?";
  548. next;
  549. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  550. AccDepositNoInput:
  551. mes "^0072FF[Bank Manager]^000000";
  552. mes "You must enter a value higher than ^0000FF" + @tMinDeposit + "z^000000.";
  553. mes "Do you want to try again?";
  554. next;
  555. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  556. AccDepositNotEnoughZeny:
  557. mes "^0072FF[Bank Manager]^000000";
  558. mes "You don't have ^0000FF" + @tDepositTotal + "z^000000.";
  559. mes "Remember that taxes are being applied.";
  560. mes "Do you want to try again?";
  561. next;
  562. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  563. AccWithdraw:
  564. mes "^0072FF[Bank Manager]^000000";
  565. mes "This is the only transaction I don't like... you figure out why...";
  566. mes "You can't withdraw leaving less than ^0000FF" + @tMinZeny +"z^000000 in your ^FF7F01Bank Account^000000.";
  567. mes "Your current balance is ^0000FF" + vBankAccZeny + "z^000000.";
  568. mes "How much are you going to widthdraw?";
  569. next;
  570. AccWithdrawInput:
  571. input @tWithdraw;
  572. set @tZenyLeft, vBankAccZeny - @tWithdraw;
  573. set @tZenyTemp, Zeny + @tWithdraw;
  574. if (@tWithdraw == 0) goto AccWithdrawNoInput;
  575. if (@tZenyLeft < @tMinZeny) goto AccWithdrawMinZeny;
  576. if (@tZenyTemp > @tMaxZeny) goto AccWithDrawOverCharZeny;
  577. set Zeny, Zeny + @tWithdraw;
  578. set vBankAccLastZeny, vBankAccZeny;
  579. set vBankAccZeny, vBankAccZeny - @tWithdraw;
  580. mes "^0072FF[Bank Manager]^000000";
  581. mes "Transaction completed successfully.";
  582. mes "Thank you for using our services.";
  583. next;
  584. goto AccMenu;
  585. AccWithdrawNoInput:
  586. mes "^0072FF[Bank Manager]^000000";
  587. mes "In order to withdraw from the bank, you must withdraw more than 0 zeny.";
  588. mes "Do you want to try again?";
  589. next;
  590. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  591. AccWithdrawMinZeny:
  592. mes "^0072FF[Bank Manager]^000000";
  593. mes "I'm sorry...";
  594. mes "You can't withdraw ^0000FF" + @tWithdraw + "z^000000 because your ^FF7F01Bank Account^000000 must have ^0000FF" + @tMinZeny + "z^000000 left or more at all times.";
  595. mes "In order to take all your money from the bank you must select Close Account in the Account Menu.";
  596. mes "Do you want to try again?";
  597. next;
  598. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  599. AccWithDrawOverCharZeny:
  600. mes "^0072FF[Bank Manager]^000000";
  601. mes "Sorry, but you can't withdraw ^0000FF" + @tWithdraw + "z^000000 because your Player can't carry more than ^0000FF" + @tMaxZeny + "z^000000.";
  602. mes "Do you want to try again?";
  603. next;
  604. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  605. AccBalance:
  606. mes "^0072FF[Bank Manager]^000000";
  607. mes "Account Status:";
  608. //shown in blue if the same or more, show in red if less than previous balance
  609. if (vBankAccZeny >= vBankAccLastZeny) goto AccBalance2;
  610. mes "Current Balance: ^FF0000" + vBankAccZeny +"z^000000.";
  611. goto AccBalance3;
  612. AccBalance2:
  613. mes "Current Balance: ^0000FF" + vBankAccZeny +"z^000000.";
  614. goto AccBalance3;
  615. AccBalance3:
  616. mes "Previous Balance: ^0000FF" + vBankAccLastZeny +"z^000000.";
  617. mes "Interest Rate: ^0000FF" + @tInterestRate + "%^000000.";
  618. mes "Interests Payed: ^0000FF" + vBankAccInterests + "z^000000.";
  619. next;
  620. goto AccMenu;
  621. AccClose:
  622. mes "^0072FF[Bank Manager]^000000";
  623. mes "If you close your ^FF7F01Bank Account^000000, it means you eliminate it.";
  624. mes "Of course, you will get all your money back.";
  625. mes "Are you sure you want to close your ^FF7F01Bank Account^000000?";
  626. next;
  627. menu "^FF7F01I don't want it anymore.^000000",AccCloseConfirm,"^FF7F01No, I'll keep it.^000000",AccCloseKeep;
  628. AccCloseConfirm:
  629. set vBankAccActive,0;
  630. set Zeny, Zeny + vBankAccZeny;
  631. set vBankAccZeny,0;
  632. set vBankAccLastZeny,0;
  633. set vBankAccInterests,0;
  634. mes "^0072FF[Bank Manager]^000000";
  635. mes "Thanks for using our services, we hope you come back to visit us.";
  636. mes "Here's your money.";
  637. next;
  638. goto EndNPC;
  639. AccCloseKeep:
  640. mes "^0072FF[Bank Manager]^000000";
  641. mes "Good choice, thanks for staying with us.";
  642. next;
  643. goto AccMenu;
  644. EndNPC:
  645. set @random,rand(4);
  646. mes "^0072FF[Bank Manager]^000000";
  647. if (@random == 0) mes "Have a nice day!";
  648. if (@random == 1) mes "See you soon!";
  649. if (@random == 2) mes "See you next time!";
  650. if (@random == 3) mes "Come back soon!";
  651. close;
  652. }
  653. geffen_in.gat,77,169,2 script Bank Manager 109,{
  654. set @tInterestRate, 2; //no decimals
  655. set @tMaxAccZeny, 1000000000; //max zeny allowed in ^FF7F01Bank Account^000000 1,000,000,000=1 billion
  656. set @tMaxZeny, 1000000000; //max zeny that a player can carry
  657. set @tMinZeny, 100; //min zeny allowed or Bank Account is closed
  658. set @tCreateZeny, 500; //zeny needed in order to create a Bank Account
  659. set @tMinDeposit,100; //min zeny to deposit
  660. set @tBeginningZeny, 100; //amount of zeny in Bank Account after creating
  661. mes "^0072FF[Bank Manager]^000000";
  662. mes "Welcome to this office branch of Midgard's Bank.";
  663. next;
  664. if (vBankAccActive==1) goto AccMenu;
  665. mes "^0072FF[Bank Manager]^000000";
  666. mes "You don't have a ^FF7F01Bank Account^000000 yet, you must buy one.";
  667. mes "It will cost you ^0000FF" + @tCreateZeny + "z^000000 to create it.";
  668. next;
  669. menu "^FF7F01Create Account.^000000",CreateAcc,"^FF7F01Information.^000000",BankInfo,"^FF7F01No thanks.^000000",NoCreateAcc;
  670. BankInfo:
  671. mes "^0072FF[Bank Manager]^000000";
  672. mes "Here are some points that you need to know:";
  673. mes "1. To create a ^FF7F01Bank Account^000000 you have to pay ^0000FF" + @tCreateZeny + "z^000000.";
  674. mes "2. You will be charged ^0000FF" + @tInterestRate + " percent^000000 everytime you Deposit.";
  675. mes "3. You must always have no less than ^0000FF" + @tMinZeny + "z^000000 on your ^FF7F01Bank Account^000000.";
  676. next;
  677. mes "4. You can save up to ^0000FF" + @tMaxAccZeny + "z^000000 in your bank account.";
  678. mes "5. You will be able to access your ^FF7F01Bank Account^000000 in any town with a Bank Office.";
  679. mes "6. You will start by having ^0000FF" + @tBeginningZeny + "z^000000 in your bank account.";
  680. close;
  681. CreateAcc:
  682. mes "^0072FF[Bank Manager]^000000";
  683. mes "First of all, you will have to have at least ^0000FF" + @tCreateZeny + "z^000000 with you.";
  684. mes "Your account will start with ^0000FF" + @tBeginningZeny +"z^000000.";
  685. mes "Are you sure you want to continue?";
  686. next;
  687. menu "^FF7F01Sure.^000000",CreateAccCont,"^FF7F01Nah, it's ok.^000000",NoCreateAcc;
  688. CreateAccCont:
  689. if (@tCreateZeny > Zeny) goto CreateAccNoEnoughZeny;
  690. set Zeny, Zeny - @tCreateZeny;
  691. set vBankAccActive,1;
  692. set vBankAccZeny, @tBeginningZeny;
  693. set vBankAccLastZeny, @tBeginningZeny;
  694. set vBankAccInterests,0;
  695. mes "^0072FF[Bank Manager]^000000";
  696. mes "Congratulations, your ^FF7F01Bank Account^000000 is now created with ^0000FF" + vBankAccZeny + "z^000000.";
  697. mes "You may now proceed to do any transactions.";
  698. next;
  699. goto AccMenu;
  700. CreateAccNoEnoughZeny:
  701. mes "^0072FF[Bank Manager]^000000";
  702. mes "Didn't I tell you to make sure you had enough zeny?";
  703. mes "You can't create it with just ^0000FF" + Zeny + "z^000000.";
  704. mes "Come back when you get those ^0000FF" + @tCreateZeny + "z^000000...";
  705. next;
  706. goto EndNPC;
  707. NoCreateAcc:
  708. mes "^0072FF[Bank Manager]^000000";
  709. mes "Come back when you change your mind!";
  710. next;
  711. goto EndNPC;
  712. AccMenu:
  713. mes "^0072FF[Bank Manager]^000000";
  714. mes "Your current balance is ^0000FF" + vBankAccZeny +"z^000000.";
  715. mes "What would you like to do now?";
  716. next;
  717. menu "^FF7F01Deposit.^000000",AccDeposit,"^FF7F01Withdraw.^000000",AccWithdraw,"^FF7F01Bank Account Info.^000000",AccBalance,"^FF7F01Close Bank Account^000000",AccClose,"^FF7F01Cancel.^000000",EndNPC;
  718. AccDeposit:
  719. mes "^0072FF[Bank Manager]^000000";
  720. mes "It's always good to deposit every once in a while.";
  721. mes "Be noticed that we charge a ^0000FF" + @tInterestRate + " percent ^000000 of interest rate in every deposit you make.";
  722. mes "This means that to deposit ^0000FF100z^000000 you need to have pay us ^0000FF" + 100 * @tInterestRate / 100 + "z^000000.";
  723. mes "How much are you willing to deposit?";
  724. next;
  725. AccDepositInput:
  726. input @tDeposit;
  727. set @tDepositTax, @tDeposit * @tInterestRate / 100;
  728. set @tDepositTotal, @tDeposit - @tDepositTax;
  729. if (@tDeposit <= 0) goto AccDepositNoInput;
  730. if (@tDeposit < @tMinDeposit) goto AccDepositNotEnoughInput;
  731. if (@tDepositTotal > Zeny) goto AccDepositNotEnoughZeny;
  732. set @tBankAccZenyTemp, vBankAccZeny + @tDepositTotal;
  733. if (@tBankAccZenyTemp > @tMaxAccZeny) goto AccDepositOver;
  734. if ((@tDeposit <= Zeny) && (@tBankAccZenyTemp <= @tMaxAccZeny)) goto AccDepositCont;
  735. mes "^0072FF[Bank Manager]^000000";
  736. mes "Sorry, for some weird reason I couldn't deposit your money.";
  737. next;
  738. goto AccMenu;
  739. AccDepositCont:
  740. set Zeny, Zeny - @tDeposit;
  741. set vBankAccLastZeny, vBankAccZeny;
  742. set vBankAccZeny, @tBankAccZenyTemp;
  743. set vBankAccInterests, vBankAccInterests + @tDepositTax;
  744. mes "^0072FF[Bank Manager]^000000";
  745. mes "Transaction completed successfully.";
  746. mes "^0000FF" + @tDeposit + "z^000000 substracted from your money (Taxes applied).";
  747. mes "^0000FF" + @tDepositTotal + "z^000000 successfully added to your ^FF7F01Bank Account^000000.";
  748. next;
  749. goto AccMenu;
  750. AccDepositOver:
  751. mes "^0072FF[Bank Manager]^000000";
  752. mes "There is a limit of ^0000FF" + @tMaxAccZeny + "z^000000 of how much zeny your ^FF7F01Bank Account^000000 can hold.";
  753. mes "You can't deposit more than that, please try again.";
  754. mes "Do you want to try again?";
  755. next;
  756. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  757. AccDepositNotEnoughInput:
  758. mes "^0072FF[Bank Manager]^000000";
  759. mes "You need to put more money in order to make a deposit.";
  760. mes "Do you want to try again?";
  761. next;
  762. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  763. AccDepositNoInput:
  764. mes "^0072FF[Bank Manager]^000000";
  765. mes "You must enter a value higher than ^0000FF" + @tMinDeposit + "z^000000.";
  766. mes "Do you want to try again?";
  767. next;
  768. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  769. AccDepositNotEnoughZeny:
  770. mes "^0072FF[Bank Manager]^000000";
  771. mes "You don't have ^0000FF" + @tDepositTotal + "z^000000.";
  772. mes "Remember that taxes are being applied.";
  773. mes "Do you want to try again?";
  774. next;
  775. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  776. AccWithdraw:
  777. mes "^0072FF[Bank Manager]^000000";
  778. mes "This is the only transaction I don't like... you figure out why...";
  779. mes "You can't withdraw leaving less than ^0000FF" + @tMinZeny +"z^000000 in your ^FF7F01Bank Account^000000.";
  780. mes "Your current balance is ^0000FF" + vBankAccZeny + "z^000000.";
  781. mes "How much are you going to widthdraw?";
  782. next;
  783. AccWithdrawInput:
  784. input @tWithdraw;
  785. set @tZenyLeft, vBankAccZeny - @tWithdraw;
  786. set @tZenyTemp, Zeny + @tWithdraw;
  787. if (@tWithdraw == 0) goto AccWithdrawNoInput;
  788. if (@tZenyLeft < @tMinZeny) goto AccWithdrawMinZeny;
  789. if (@tZenyTemp > @tMaxZeny) goto AccWithDrawOverCharZeny;
  790. set Zeny, Zeny + @tWithdraw;
  791. set vBankAccLastZeny, vBankAccZeny;
  792. set vBankAccZeny, vBankAccZeny - @tWithdraw;
  793. mes "^0072FF[Bank Manager]^000000";
  794. mes "Transaction completed successfully.";
  795. mes "Thank you for using our services.";
  796. next;
  797. goto AccMenu;
  798. AccWithdrawNoInput:
  799. mes "^0072FF[Bank Manager]^000000";
  800. mes "In order to withdraw from the bank, you must withdraw more than 0 zeny.";
  801. mes "Do you want to try again?";
  802. next;
  803. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  804. AccWithdrawMinZeny:
  805. mes "^0072FF[Bank Manager]^000000";
  806. mes "I'm sorry...";
  807. mes "You can't withdraw ^0000FF" + @tWithdraw + "z^000000 because your ^FF7F01Bank Account^000000 must have ^0000FF" + @tMinZeny + "z^000000 left or more at all times.";
  808. mes "In order to take all your money from the bank you must select Close Account in the Account Menu.";
  809. mes "Do you want to try again?";
  810. next;
  811. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  812. AccWithDrawOverCharZeny:
  813. mes "^0072FF[Bank Manager]^000000";
  814. mes "Sorry, but you can't withdraw ^0000FF" + @tWithdraw + "z^000000 because your Player can't carry more than ^0000FF" + @tMaxZeny + "z^000000.";
  815. mes "Do you want to try again?";
  816. next;
  817. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  818. AccBalance:
  819. mes "^0072FF[Bank Manager]^000000";
  820. mes "Account Status:";
  821. //shown in blue if the same or more, show in red if less than previous balance
  822. if (vBankAccZeny >= vBankAccLastZeny) goto AccBalance2;
  823. mes "Current Balance: ^FF0000" + vBankAccZeny +"z^000000.";
  824. goto AccBalance3;
  825. AccBalance2:
  826. mes "Current Balance: ^0000FF" + vBankAccZeny +"z^000000.";
  827. goto AccBalance3;
  828. AccBalance3:
  829. mes "Previous Balance: ^0000FF" + vBankAccLastZeny +"z^000000.";
  830. mes "Interest Rate: ^0000FF" + @tInterestRate + "%^000000.";
  831. mes "Interests Payed: ^0000FF" + vBankAccInterests + "z^000000.";
  832. next;
  833. goto AccMenu;
  834. AccClose:
  835. mes "^0072FF[Bank Manager]^000000";
  836. mes "If you close your ^FF7F01Bank Account^000000, it means you eliminate it.";
  837. mes "Of course, you will get all your money back.";
  838. mes "Are you sure you want to close your ^FF7F01Bank Account^000000?";
  839. next;
  840. menu "^FF7F01I don't want it anymore.^000000",AccCloseConfirm,"^FF7F01No, I'll keep it.^000000",AccCloseKeep;
  841. AccCloseConfirm:
  842. set vBankAccActive,0;
  843. set Zeny, Zeny + vBankAccZeny;
  844. set vBankAccZeny,0;
  845. set vBankAccLastZeny,0;
  846. set vBankAccInterests,0;
  847. mes "^0072FF[Bank Manager]^000000";
  848. mes "Thanks for using our services, we hope you come back to visit us.";
  849. mes "Here's your money.";
  850. next;
  851. goto EndNPC;
  852. AccCloseKeep:
  853. mes "^0072FF[Bank Manager]^000000";
  854. mes "Good choice, thanks for staying with us.";
  855. next;
  856. goto AccMenu;
  857. EndNPC:
  858. set @random,rand(4);
  859. mes "^0072FF[Bank Manager]^000000";
  860. if (@random == 0) mes "Have a nice day!";
  861. if (@random == 1) mes "See you soon!";
  862. if (@random == 2) mes "See you next time!";
  863. if (@random == 3) mes "Come back soon!";
  864. close;
  865. }
  866. //Fixed location for new payon
  867. payon.gat,155,97,4 script Bank Manager 109,{
  868. set @tInterestRate, 2; //no decimals
  869. set @tMaxAccZeny, 1000000000; //max zeny allowed in ^FF7F01Bank Account^000000 1,000,000,000=1 billion
  870. set @tMaxZeny, 1000000000; //max zeny that a player can carry
  871. set @tMinZeny, 100; //min zeny allowed or Bank Account is closed
  872. set @tCreateZeny, 500; //zeny needed in order to create a Bank Account
  873. set @tMinDeposit,100; //min zeny to deposit
  874. set @tBeginningZeny, 100; //amount of zeny in Bank Account after creating
  875. mes "^0072FF[Bank Manager]^000000";
  876. mes "Welcome to this office branch of Midgard's Bank.";
  877. next;
  878. if (vBankAccActive==1) goto AccMenu;
  879. mes "^0072FF[Bank Manager]^000000";
  880. mes "You don't have a ^FF7F01Bank Account^000000 yet, you must buy one.";
  881. mes "It will cost you ^0000FF" + @tCreateZeny + "z^000000 to create it.";
  882. next;
  883. menu "^FF7F01Create Account.^000000",CreateAcc,"^FF7F01Information.^000000",BankInfo,"^FF7F01No thanks.^000000",NoCreateAcc;
  884. BankInfo:
  885. mes "^0072FF[Bank Manager]^000000";
  886. mes "Here are some points that you need to know:";
  887. mes "1. To create a ^FF7F01Bank Account^000000 you have to pay ^0000FF" + @tCreateZeny + "z^000000.";
  888. mes "2. You will be charged ^0000FF" + @tInterestRate + " percent^000000 everytime you Deposit.";
  889. mes "3. You must always have no less than ^0000FF" + @tMinZeny + "z^000000 on your ^FF7F01Bank Account^000000.";
  890. next;
  891. mes "4. You can save up to ^0000FF" + @tMaxAccZeny + "z^000000 in your bank account.";
  892. mes "5. You will be able to access your ^FF7F01Bank Account^000000 in any town with a Bank Office.";
  893. mes "6. You will start by having ^0000FF" + @tBeginningZeny + "z^000000 in your bank account.";
  894. close;
  895. CreateAcc:
  896. mes "^0072FF[Bank Manager]^000000";
  897. mes "First of all, you will have to have at least ^0000FF" + @tCreateZeny + "z^000000 with you.";
  898. mes "Your account will start with ^0000FF" + @tBeginningZeny +"z^000000.";
  899. mes "Are you sure you want to continue?";
  900. next;
  901. menu "^FF7F01Sure.^000000",CreateAccCont,"^FF7F01Nah, it's ok.^000000",NoCreateAcc;
  902. CreateAccCont:
  903. if (@tCreateZeny > Zeny) goto CreateAccNoEnoughZeny;
  904. set Zeny, Zeny - @tCreateZeny;
  905. set vBankAccActive,1;
  906. set vBankAccZeny, @tBeginningZeny;
  907. set vBankAccLastZeny, @tBeginningZeny;
  908. set vBankAccInterests,0;
  909. mes "^0072FF[Bank Manager]^000000";
  910. mes "Congratulations, your ^FF7F01Bank Account^000000 is now created with ^0000FF" + vBankAccZeny + "z^000000.";
  911. mes "You may now proceed to do any transactions.";
  912. next;
  913. goto AccMenu;
  914. CreateAccNoEnoughZeny:
  915. mes "^0072FF[Bank Manager]^000000";
  916. mes "Didn't I tell you to make sure you had enough zeny?";
  917. mes "You can't create it with just ^0000FF" + Zeny + "z^000000.";
  918. mes "Come back when you get those ^0000FF" + @tCreateZeny + "z^000000...";
  919. next;
  920. goto EndNPC;
  921. NoCreateAcc:
  922. mes "^0072FF[Bank Manager]^000000";
  923. mes "Come back when you change your mind!";
  924. next;
  925. goto EndNPC;
  926. AccMenu:
  927. mes "^0072FF[Bank Manager]^000000";
  928. mes "Your current balance is ^0000FF" + vBankAccZeny +"z^000000.";
  929. mes "What would you like to do now?";
  930. next;
  931. menu "^FF7F01Deposit.^000000",AccDeposit,"^FF7F01Withdraw.^000000",AccWithdraw,"^FF7F01Bank Account Info.^000000",AccBalance,"^FF7F01Close Bank Account^000000",AccClose,"^FF7F01Cancel.^000000",EndNPC;
  932. AccDeposit:
  933. mes "^0072FF[Bank Manager]^000000";
  934. mes "It's always good to deposit every once in a while.";
  935. mes "Be noticed that we charge a ^0000FF" + @tInterestRate + " percent ^000000 of interest rate in every deposit you make.";
  936. mes "This means that to deposit ^0000FF100z^000000 you need to have pay us ^0000FF" + 100 * @tInterestRate / 100 + "z^000000.";
  937. mes "How much are you willing to deposit?";
  938. next;
  939. AccDepositInput:
  940. input @tDeposit;
  941. set @tDepositTax, @tDeposit * @tInterestRate / 100;
  942. set @tDepositTotal, @tDeposit - @tDepositTax;
  943. if (@tDeposit <= 0) goto AccDepositNoInput;
  944. if (@tDeposit < @tMinDeposit) goto AccDepositNotEnoughInput;
  945. if (@tDepositTotal > Zeny) goto AccDepositNotEnoughZeny;
  946. set @tBankAccZenyTemp, vBankAccZeny + @tDepositTotal;
  947. if (@tBankAccZenyTemp > @tMaxAccZeny) goto AccDepositOver;
  948. if ((@tDeposit <= Zeny) && (@tBankAccZenyTemp <= @tMaxAccZeny)) goto AccDepositCont;
  949. mes "^0072FF[Bank Manager]^000000";
  950. mes "Sorry, for some weird reason I couldn't deposit your money.";
  951. next;
  952. goto AccMenu;
  953. AccDepositCont:
  954. set Zeny, Zeny - @tDeposit;
  955. set vBankAccLastZeny, vBankAccZeny;
  956. set vBankAccZeny, @tBankAccZenyTemp;
  957. set vBankAccInterests, vBankAccInterests + @tDepositTax;
  958. mes "^0072FF[Bank Manager]^000000";
  959. mes "Transaction completed successfully.";
  960. mes "^0000FF" + @tDeposit + "z^000000 substracted from your money (Taxes applied).";
  961. mes "^0000FF" + @tDepositTotal + "z^000000 successfully added to your ^FF7F01Bank Account^000000.";
  962. next;
  963. goto AccMenu;
  964. AccDepositOver:
  965. mes "^0072FF[Bank Manager]^000000";
  966. mes "There is a limit of ^0000FF" + @tMaxAccZeny + "z^000000 of how much zeny your ^FF7F01Bank Account^000000 can hold.";
  967. mes "You can't deposit more than that, please try again.";
  968. mes "Do you want to try again?";
  969. next;
  970. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  971. AccDepositNotEnoughInput:
  972. mes "^0072FF[Bank Manager]^000000";
  973. mes "You need to put more money in order to make a deposit.";
  974. mes "Do you want to try again?";
  975. next;
  976. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  977. AccDepositNoInput:
  978. mes "^0072FF[Bank Manager]^000000";
  979. mes "You must enter a value higher than ^0000FF" + @tMinDeposit + "z^000000.";
  980. mes "Do you want to try again?";
  981. next;
  982. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  983. AccDepositNotEnoughZeny:
  984. mes "^0072FF[Bank Manager]^000000";
  985. mes "You don't have ^0000FF" + @tDepositTotal + "z^000000.";
  986. mes "Remember that taxes are being applied.";
  987. mes "Do you want to try again?";
  988. next;
  989. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  990. AccWithdraw:
  991. mes "^0072FF[Bank Manager]^000000";
  992. mes "This is the only transaction I don't like... you figure out why...";
  993. mes "You can't withdraw leaving less than ^0000FF" + @tMinZeny +"z^000000 in your ^FF7F01Bank Account^000000.";
  994. mes "Your current balance is ^0000FF" + vBankAccZeny + "z^000000.";
  995. mes "How much are you going to widthdraw?";
  996. next;
  997. AccWithdrawInput:
  998. input @tWithdraw;
  999. set @tZenyLeft, vBankAccZeny - @tWithdraw;
  1000. set @tZenyTemp, Zeny + @tWithdraw;
  1001. if (@tWithdraw == 0) goto AccWithdrawNoInput;
  1002. if (@tZenyLeft < @tMinZeny) goto AccWithdrawMinZeny;
  1003. if (@tZenyTemp > @tMaxZeny) goto AccWithDrawOverCharZeny;
  1004. set Zeny, Zeny + @tWithdraw;
  1005. set vBankAccLastZeny, vBankAccZeny;
  1006. set vBankAccZeny, vBankAccZeny - @tWithdraw;
  1007. mes "^0072FF[Bank Manager]^000000";
  1008. mes "Transaction completed successfully.";
  1009. mes "Thank you for using our services.";
  1010. next;
  1011. goto AccMenu;
  1012. AccWithdrawNoInput:
  1013. mes "^0072FF[Bank Manager]^000000";
  1014. mes "In order to withdraw from the bank, you must withdraw more than 0 zeny.";
  1015. mes "Do you want to try again?";
  1016. next;
  1017. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  1018. AccWithdrawMinZeny:
  1019. mes "^0072FF[Bank Manager]^000000";
  1020. mes "I'm sorry...";
  1021. mes "You can't withdraw ^0000FF" + @tWithdraw + "z^000000 because your ^FF7F01Bank Account^000000 must have ^0000FF" + @tMinZeny + "z^000000 left or more at all times.";
  1022. mes "In order to take all your money from the bank you must select Close Account in the Account Menu.";
  1023. mes "Do you want to try again?";
  1024. next;
  1025. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  1026. AccWithDrawOverCharZeny:
  1027. mes "^0072FF[Bank Manager]^000000";
  1028. mes "Sorry, but you can't withdraw ^0000FF" + @tWithdraw + "z^000000 because your Player can't carry more than ^0000FF" + @tMaxZeny + "z^000000.";
  1029. mes "Do you want to try again?";
  1030. next;
  1031. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  1032. AccBalance:
  1033. mes "^0072FF[Bank Manager]^000000";
  1034. mes "Account Status:";
  1035. //shown in blue if the same or more, show in red if less than previous balance
  1036. if (vBankAccZeny >= vBankAccLastZeny) goto AccBalance2;
  1037. mes "Current Balance: ^FF0000" + vBankAccZeny +"z^000000.";
  1038. goto AccBalance3;
  1039. AccBalance2:
  1040. mes "Current Balance: ^0000FF" + vBankAccZeny +"z^000000.";
  1041. goto AccBalance3;
  1042. AccBalance3:
  1043. mes "Previous Balance: ^0000FF" + vBankAccLastZeny +"z^000000.";
  1044. mes "Interest Rate: ^0000FF" + @tInterestRate + "%^000000.";
  1045. mes "Interests Payed: ^0000FF" + vBankAccInterests + "z^000000.";
  1046. next;
  1047. goto AccMenu;
  1048. AccClose:
  1049. mes "^0072FF[Bank Manager]^000000";
  1050. mes "If you close your ^FF7F01Bank Account^000000, it means you eliminate it.";
  1051. mes "Of course, you will get all your money back.";
  1052. mes "Are you sure you want to close your ^FF7F01Bank Account^000000?";
  1053. next;
  1054. menu "^FF7F01I don't want it anymore.^000000",AccCloseConfirm,"^FF7F01No, I'll keep it.^000000",AccCloseKeep;
  1055. AccCloseConfirm:
  1056. set vBankAccActive,0;
  1057. set Zeny, Zeny + vBankAccZeny;
  1058. set vBankAccZeny,0;
  1059. set vBankAccLastZeny,0;
  1060. set vBankAccInterests,0;
  1061. mes "^0072FF[Bank Manager]^000000";
  1062. mes "Thanks for using our services, we hope you come back to visit us.";
  1063. mes "Here's your money.";
  1064. next;
  1065. goto EndNPC;
  1066. AccCloseKeep:
  1067. mes "^0072FF[Bank Manager]^000000";
  1068. mes "Good choice, thanks for staying with us.";
  1069. next;
  1070. goto AccMenu;
  1071. EndNPC:
  1072. set @random,rand(4);
  1073. mes "^0072FF[Bank Manager]^000000";
  1074. if (@random == 0) mes "Have a nice day!";
  1075. if (@random == 1) mes "See you soon!";
  1076. if (@random == 2) mes "See you next time!";
  1077. if (@random == 3) mes "Come back soon!";
  1078. close;
  1079. }
  1080. alberta_in.gat,187,26,2 script Bank Manager 109,{
  1081. set @tInterestRate, 2; //no decimals
  1082. set @tMaxAccZeny, 1000000000; //max zeny allowed in ^FF7F01Bank Account^000000 1,000,000,000=1 billion
  1083. set @tMaxZeny, 1000000000; //max zeny that a player can carry
  1084. set @tMinZeny, 100; //min zeny allowed or Bank Account is closed
  1085. set @tCreateZeny, 500; //zeny needed in order to create a Bank Account
  1086. set @tMinDeposit,100; //min zeny to deposit
  1087. set @tBeginningZeny, 100; //amount of zeny in Bank Account after creating
  1088. mes "^0072FF[Bank Manager]^000000";
  1089. mes "Welcome to this office branch of Midgard's Bank.";
  1090. next;
  1091. if (vBankAccActive==1) goto AccMenu;
  1092. mes "^0072FF[Bank Manager]^000000";
  1093. mes "You don't have a ^FF7F01Bank Account^000000 yet, you must buy one.";
  1094. mes "It will cost you ^0000FF" + @tCreateZeny + "z^000000 to create it.";
  1095. next;
  1096. menu "^FF7F01Create Account.^000000",CreateAcc,"^FF7F01Information.^000000",BankInfo,"^FF7F01No thanks.^000000",NoCreateAcc;
  1097. BankInfo:
  1098. mes "^0072FF[Bank Manager]^000000";
  1099. mes "Here are some points that you need to know:";
  1100. mes "1. To create a ^FF7F01Bank Account^000000 you have to pay ^0000FF" + @tCreateZeny + "z^000000.";
  1101. mes "2. You will be charged ^0000FF" + @tInterestRate + " percent^000000 everytime you Deposit.";
  1102. mes "3. You must always have no less than ^0000FF" + @tMinZeny + "z^000000 on your ^FF7F01Bank Account^000000.";
  1103. next;
  1104. mes "4. You can save up to ^0000FF" + @tMaxAccZeny + "z^000000 in your bank account.";
  1105. mes "5. You will be able to access your ^FF7F01Bank Account^000000 in any town with a Bank Office.";
  1106. mes "6. You will start by having ^0000FF" + @tBeginningZeny + "z^000000 in your bank account.";
  1107. close;
  1108. CreateAcc:
  1109. mes "^0072FF[Bank Manager]^000000";
  1110. mes "First of all, you will have to have at least ^0000FF" + @tCreateZeny + "z^000000 with you.";
  1111. mes "Your account will start with ^0000FF" + @tBeginningZeny +"z^000000.";
  1112. mes "Are you sure you want to continue?";
  1113. next;
  1114. menu "^FF7F01Sure.^000000",CreateAccCont,"^FF7F01Nah, it's ok.^000000",NoCreateAcc;
  1115. CreateAccCont:
  1116. if (@tCreateZeny > Zeny) goto CreateAccNoEnoughZeny;
  1117. set Zeny, Zeny - @tCreateZeny;
  1118. set vBankAccActive,1;
  1119. set vBankAccZeny, @tBeginningZeny;
  1120. set vBankAccLastZeny, @tBeginningZeny;
  1121. set vBankAccInterests,0;
  1122. mes "^0072FF[Bank Manager]^000000";
  1123. mes "Congratulations, your ^FF7F01Bank Account^000000 is now created with ^0000FF" + vBankAccZeny + "z^000000.";
  1124. mes "You may now proceed to do any transactions.";
  1125. next;
  1126. goto AccMenu;
  1127. CreateAccNoEnoughZeny:
  1128. mes "^0072FF[Bank Manager]^000000";
  1129. mes "Didn't I tell you to make sure you had enough zeny?";
  1130. mes "You can't create it with just ^0000FF" + Zeny + "z^000000.";
  1131. mes "Come back when you get those ^0000FF" + @tCreateZeny + "z^000000...";
  1132. next;
  1133. goto EndNPC;
  1134. NoCreateAcc:
  1135. mes "^0072FF[Bank Manager]^000000";
  1136. mes "Come back when you change your mind!";
  1137. next;
  1138. goto EndNPC;
  1139. AccMenu:
  1140. mes "^0072FF[Bank Manager]^000000";
  1141. mes "Your current balance is ^0000FF" + vBankAccZeny +"z^000000.";
  1142. mes "What would you like to do now?";
  1143. next;
  1144. menu "^FF7F01Deposit.^000000",AccDeposit,"^FF7F01Withdraw.^000000",AccWithdraw,"^FF7F01Bank Account Info.^000000",AccBalance,"^FF7F01Close Bank Account^000000",AccClose,"^FF7F01Cancel.^000000",EndNPC;
  1145. AccDeposit:
  1146. mes "^0072FF[Bank Manager]^000000";
  1147. mes "It's always good to deposit every once in a while.";
  1148. mes "Be noticed that we charge a ^0000FF" + @tInterestRate + " percent ^000000 of interest rate in every deposit you make.";
  1149. mes "This means that to deposit ^0000FF100z^000000 you need to have pay us ^0000FF" + 100 * @tInterestRate / 100 + "z^000000.";
  1150. mes "How much are you willing to deposit?";
  1151. next;
  1152. AccDepositInput:
  1153. input @tDeposit;
  1154. set @tDepositTax, @tDeposit * @tInterestRate / 100;
  1155. set @tDepositTotal, @tDeposit - @tDepositTax;
  1156. if (@tDeposit <= 0) goto AccDepositNoInput;
  1157. if (@tDeposit < @tMinDeposit) goto AccDepositNotEnoughInput;
  1158. if (@tDepositTotal > Zeny) goto AccDepositNotEnoughZeny;
  1159. set @tBankAccZenyTemp, vBankAccZeny + @tDepositTotal;
  1160. if (@tBankAccZenyTemp > @tMaxAccZeny) goto AccDepositOver;
  1161. if ((@tDeposit <= Zeny) && (@tBankAccZenyTemp <= @tMaxAccZeny)) goto AccDepositCont;
  1162. mes "^0072FF[Bank Manager]^000000";
  1163. mes "Sorry, for some weird reason I couldn't deposit your money.";
  1164. next;
  1165. goto AccMenu;
  1166. AccDepositCont:
  1167. set Zeny, Zeny - @tDeposit;
  1168. set vBankAccLastZeny, vBankAccZeny;
  1169. set vBankAccZeny, @tBankAccZenyTemp;
  1170. set vBankAccInterests, vBankAccInterests + @tDepositTax;
  1171. mes "^0072FF[Bank Manager]^000000";
  1172. mes "Transaction completed successfully.";
  1173. mes "^0000FF" + @tDeposit + "z^000000 substracted from your money (Taxes applied).";
  1174. mes "^0000FF" + @tDepositTotal + "z^000000 successfully added to your ^FF7F01Bank Account^000000.";
  1175. next;
  1176. goto AccMenu;
  1177. AccDepositOver:
  1178. mes "^0072FF[Bank Manager]^000000";
  1179. mes "There is a limit of ^0000FF" + @tMaxAccZeny + "z^000000 of how much zeny your ^FF7F01Bank Account^000000 can hold.";
  1180. mes "You can't deposit more than that, please try again.";
  1181. mes "Do you want to try again?";
  1182. next;
  1183. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  1184. AccDepositNotEnoughInput:
  1185. mes "^0072FF[Bank Manager]^000000";
  1186. mes "You need to put more money in order to make a deposit.";
  1187. mes "Do you want to try again?";
  1188. next;
  1189. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  1190. AccDepositNoInput:
  1191. mes "^0072FF[Bank Manager]^000000";
  1192. mes "You must enter a value higher than ^0000FF" + @tMinDeposit + "z^000000.";
  1193. mes "Do you want to try again?";
  1194. next;
  1195. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  1196. AccDepositNotEnoughZeny:
  1197. mes "^0072FF[Bank Manager]^000000";
  1198. mes "You don't have ^0000FF" + @tDepositTotal + "z^000000.";
  1199. mes "Remember that taxes are being applied.";
  1200. mes "Do you want to try again?";
  1201. next;
  1202. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  1203. AccWithdraw:
  1204. mes "^0072FF[Bank Manager]^000000";
  1205. mes "This is the only transaction I don't like... you figure out why...";
  1206. mes "You can't withdraw leaving less than ^0000FF" + @tMinZeny +"z^000000 in your ^FF7F01Bank Account^000000.";
  1207. mes "Your current balance is ^0000FF" + vBankAccZeny + "z^000000.";
  1208. mes "How much are you going to widthdraw?";
  1209. next;
  1210. AccWithdrawInput:
  1211. input @tWithdraw;
  1212. set @tZenyLeft, vBankAccZeny - @tWithdraw;
  1213. set @tZenyTemp, Zeny + @tWithdraw;
  1214. if (@tWithdraw == 0) goto AccWithdrawNoInput;
  1215. if (@tZenyLeft < @tMinZeny) goto AccWithdrawMinZeny;
  1216. if (@tZenyTemp > @tMaxZeny) goto AccWithDrawOverCharZeny;
  1217. set Zeny, Zeny + @tWithdraw;
  1218. set vBankAccLastZeny, vBankAccZeny;
  1219. set vBankAccZeny, vBankAccZeny - @tWithdraw;
  1220. mes "^0072FF[Bank Manager]^000000";
  1221. mes "Transaction completed successfully.";
  1222. mes "Thank you for using our services.";
  1223. next;
  1224. goto AccMenu;
  1225. AccWithdrawNoInput:
  1226. mes "^0072FF[Bank Manager]^000000";
  1227. mes "In order to withdraw from the bank, you must withdraw more than 0 zeny.";
  1228. mes "Do you want to try again?";
  1229. next;
  1230. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  1231. AccWithdrawMinZeny:
  1232. mes "^0072FF[Bank Manager]^000000";
  1233. mes "I'm sorry...";
  1234. mes "You can't withdraw ^0000FF" + @tWithdraw + "z^000000 because your ^FF7F01Bank Account^000000 must have ^0000FF" + @tMinZeny + "z^000000 left or more at all times.";
  1235. mes "In order to take all your money from the bank you must select Close Account in the Account Menu.";
  1236. mes "Do you want to try again?";
  1237. next;
  1238. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  1239. AccWithDrawOverCharZeny:
  1240. mes "^0072FF[Bank Manager]^000000";
  1241. mes "Sorry, but you can't withdraw ^0000FF" + @tWithdraw + "z^000000 because your Player can't carry more than ^0000FF" + @tMaxZeny + "z^000000.";
  1242. mes "Do you want to try again?";
  1243. next;
  1244. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  1245. AccBalance:
  1246. mes "^0072FF[Bank Manager]^000000";
  1247. mes "Account Status:";
  1248. //shown in blue if the same or more, show in red if less than previous balance
  1249. if (vBankAccZeny >= vBankAccLastZeny) goto AccBalance2;
  1250. mes "Current Balance: ^FF0000" + vBankAccZeny +"z^000000.";
  1251. goto AccBalance3;
  1252. AccBalance2:
  1253. mes "Current Balance: ^0000FF" + vBankAccZeny +"z^000000.";
  1254. goto AccBalance3;
  1255. AccBalance3:
  1256. mes "Previous Balance: ^0000FF" + vBankAccLastZeny +"z^000000.";
  1257. mes "Interest Rate: ^0000FF" + @tInterestRate + "%^000000.";
  1258. mes "Interests Payed: ^0000FF" + vBankAccInterests + "z^000000.";
  1259. next;
  1260. goto AccMenu;
  1261. AccClose:
  1262. mes "^0072FF[Bank Manager]^000000";
  1263. mes "If you close your ^FF7F01Bank Account^000000, it means you eliminate it.";
  1264. mes "Of course, you will get all your money back.";
  1265. mes "Are you sure you want to close your ^FF7F01Bank Account^000000?";
  1266. next;
  1267. menu "^FF7F01I don't want it anymore.^000000",AccCloseConfirm,"^FF7F01No, I'll keep it.^000000",AccCloseKeep;
  1268. AccCloseConfirm:
  1269. set vBankAccActive,0;
  1270. set Zeny, Zeny + vBankAccZeny;
  1271. set vBankAccZeny,0;
  1272. set vBankAccLastZeny,0;
  1273. set vBankAccInterests,0;
  1274. mes "^0072FF[Bank Manager]^000000";
  1275. mes "Thanks for using our services, we hope you come back to visit us.";
  1276. mes "Here's your money.";
  1277. next;
  1278. goto EndNPC;
  1279. AccCloseKeep:
  1280. mes "^0072FF[Bank Manager]^000000";
  1281. mes "Good choice, thanks for staying with us.";
  1282. next;
  1283. goto AccMenu;
  1284. EndNPC:
  1285. set @random,rand(4);
  1286. mes "^0072FF[Bank Manager]^000000";
  1287. if (@random == 0) mes "Have a nice day!";
  1288. if (@random == 1) mes "See you soon!";
  1289. if (@random == 2) mes "See you next time!";
  1290. if (@random == 3) mes "Come back soon!";
  1291. close;
  1292. }
  1293. aldebaran.gat,144,120,4 script Bank Manager 109,{
  1294. set @tInterestRate, 2; //no decimals
  1295. set @tMaxAccZeny, 1000000000; //max zeny allowed in ^FF7F01Bank Account^000000 1,000,000,000=1 billion
  1296. set @tMaxZeny, 1000000000; //max zeny that a player can carry
  1297. set @tMinZeny, 100; //min zeny allowed or Bank Account is closed
  1298. set @tCreateZeny, 500; //zeny needed in order to create a Bank Account
  1299. set @tMinDeposit,100; //min zeny to deposit
  1300. set @tBeginningZeny, 100; //amount of zeny in Bank Account after creating
  1301. mes "^0072FF[Bank Manager]^000000";
  1302. mes "Welcome to this office branch of Midgard's Bank.";
  1303. next;
  1304. if (vBankAccActive==1) goto AccMenu;
  1305. mes "^0072FF[Bank Manager]^000000";
  1306. mes "You don't have a ^FF7F01Bank Account^000000 yet, you must buy one.";
  1307. mes "It will cost you ^0000FF" + @tCreateZeny + "z^000000 to create it.";
  1308. next;
  1309. menu "^FF7F01Create Account.^000000",CreateAcc,"^FF7F01Information.^000000",BankInfo,"^FF7F01No thanks.^000000",NoCreateAcc;
  1310. BankInfo:
  1311. mes "^0072FF[Bank Manager]^000000";
  1312. mes "Here are some points that you need to know:";
  1313. mes "1. To create a ^FF7F01Bank Account^000000 you have to pay ^0000FF" + @tCreateZeny + "z^000000.";
  1314. mes "2. You will be charged ^0000FF" + @tInterestRate + " percent^000000 everytime you Deposit.";
  1315. mes "3. You must always have no less than ^0000FF" + @tMinZeny + "z^000000 on your ^FF7F01Bank Account^000000.";
  1316. next;
  1317. mes "4. You can save up to ^0000FF" + @tMaxAccZeny + "z^000000 in your bank account.";
  1318. mes "5. You will be able to access your ^FF7F01Bank Account^000000 in any town with a Bank Office.";
  1319. mes "6. You will start by having ^0000FF" + @tBeginningZeny + "z^000000 in your bank account.";
  1320. close;
  1321. CreateAcc:
  1322. mes "^0072FF[Bank Manager]^000000";
  1323. mes "First of all, you will have to have at least ^0000FF" + @tCreateZeny + "z^000000 with you.";
  1324. mes "Your account will start with ^0000FF" + @tBeginningZeny +"z^000000.";
  1325. mes "Are you sure you want to continue?";
  1326. next;
  1327. menu "^FF7F01Sure.^000000",CreateAccCont,"^FF7F01Nah, it's ok.^000000",NoCreateAcc;
  1328. CreateAccCont:
  1329. if (@tCreateZeny > Zeny) goto CreateAccNoEnoughZeny;
  1330. set Zeny, Zeny - @tCreateZeny;
  1331. set vBankAccActive,1;
  1332. set vBankAccZeny, @tBeginningZeny;
  1333. set vBankAccLastZeny, @tBeginningZeny;
  1334. set vBankAccInterests,0;
  1335. mes "^0072FF[Bank Manager]^000000";
  1336. mes "Congratulations, your ^FF7F01Bank Account^000000 is now created with ^0000FF" + vBankAccZeny + "z^000000.";
  1337. mes "You may now proceed to do any transactions.";
  1338. next;
  1339. goto AccMenu;
  1340. CreateAccNoEnoughZeny:
  1341. mes "^0072FF[Bank Manager]^000000";
  1342. mes "Didn't I tell you to make sure you had enough zeny?";
  1343. mes "You can't create it with just ^0000FF" + Zeny + "z^000000.";
  1344. mes "Come back when you get those ^0000FF" + @tCreateZeny + "z^000000...";
  1345. next;
  1346. goto EndNPC;
  1347. NoCreateAcc:
  1348. mes "^0072FF[Bank Manager]^000000";
  1349. mes "Come back when you change your mind!";
  1350. next;
  1351. goto EndNPC;
  1352. AccMenu:
  1353. mes "^0072FF[Bank Manager]^000000";
  1354. mes "Your current balance is ^0000FF" + vBankAccZeny +"z^000000.";
  1355. mes "What would you like to do now?";
  1356. next;
  1357. menu "^FF7F01Deposit.^000000",AccDeposit,"^FF7F01Withdraw.^000000",AccWithdraw,"^FF7F01Bank Account Info.^000000",AccBalance,"^FF7F01Close Bank Account^000000",AccClose,"^FF7F01Cancel.^000000",EndNPC;
  1358. AccDeposit:
  1359. mes "^0072FF[Bank Manager]^000000";
  1360. mes "It's always good to deposit every once in a while.";
  1361. mes "Be noticed that we charge a ^0000FF" + @tInterestRate + " percent ^000000 of interest rate in every deposit you make.";
  1362. mes "This means that to deposit ^0000FF100z^000000 you need to have pay us ^0000FF" + 100 * @tInterestRate / 100 + "z^000000.";
  1363. mes "How much are you willing to deposit?";
  1364. next;
  1365. AccDepositInput:
  1366. input @tDeposit;
  1367. set @tDepositTax, @tDeposit * @tInterestRate / 100;
  1368. set @tDepositTotal, @tDeposit - @tDepositTax;
  1369. if (@tDeposit <= 0) goto AccDepositNoInput;
  1370. if (@tDeposit < @tMinDeposit) goto AccDepositNotEnoughInput;
  1371. if (@tDepositTotal > Zeny) goto AccDepositNotEnoughZeny;
  1372. set @tBankAccZenyTemp, vBankAccZeny + @tDepositTotal;
  1373. if (@tBankAccZenyTemp > @tMaxAccZeny) goto AccDepositOver;
  1374. if ((@tDeposit <= Zeny) && (@tBankAccZenyTemp <= @tMaxAccZeny)) goto AccDepositCont;
  1375. mes "^0072FF[Bank Manager]^000000";
  1376. mes "Sorry, for some weird reason I couldn't deposit your money.";
  1377. next;
  1378. goto AccMenu;
  1379. AccDepositCont:
  1380. set Zeny, Zeny - @tDeposit;
  1381. set vBankAccLastZeny, vBankAccZeny;
  1382. set vBankAccZeny, @tBankAccZenyTemp;
  1383. set vBankAccInterests, vBankAccInterests + @tDepositTax;
  1384. mes "^0072FF[Bank Manager]^000000";
  1385. mes "Transaction completed successfully.";
  1386. mes "^0000FF" + @tDeposit + "z^000000 substracted from your money (Taxes applied).";
  1387. mes "^0000FF" + @tDepositTotal + "z^000000 successfully added to your ^FF7F01Bank Account^000000.";
  1388. next;
  1389. goto AccMenu;
  1390. AccDepositOver:
  1391. mes "^0072FF[Bank Manager]^000000";
  1392. mes "There is a limit of ^0000FF" + @tMaxAccZeny + "z^000000 of how much zeny your ^FF7F01Bank Account^000000 can hold.";
  1393. mes "You can't deposit more than that, please try again.";
  1394. mes "Do you want to try again?";
  1395. next;
  1396. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  1397. AccDepositNotEnoughInput:
  1398. mes "^0072FF[Bank Manager]^000000";
  1399. mes "You need to put more money in order to make a deposit.";
  1400. mes "Do you want to try again?";
  1401. next;
  1402. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  1403. AccDepositNoInput:
  1404. mes "^0072FF[Bank Manager]^000000";
  1405. mes "You must enter a value higher than ^0000FF" + @tMinDeposit + "z^000000.";
  1406. mes "Do you want to try again?";
  1407. next;
  1408. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  1409. AccDepositNotEnoughZeny:
  1410. mes "^0072FF[Bank Manager]^000000";
  1411. mes "You don't have ^0000FF" + @tDepositTotal + "z^000000.";
  1412. mes "Remember that taxes are being applied.";
  1413. mes "Do you want to try again?";
  1414. next;
  1415. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  1416. AccWithdraw:
  1417. mes "^0072FF[Bank Manager]^000000";
  1418. mes "This is the only transaction I don't like... you figure out why...";
  1419. mes "You can't withdraw leaving less than ^0000FF" + @tMinZeny +"z^000000 in your ^FF7F01Bank Account^000000.";
  1420. mes "Your current balance is ^0000FF" + vBankAccZeny + "z^000000.";
  1421. mes "How much are you going to widthdraw?";
  1422. next;
  1423. AccWithdrawInput:
  1424. input @tWithdraw;
  1425. set @tZenyLeft, vBankAccZeny - @tWithdraw;
  1426. set @tZenyTemp, Zeny + @tWithdraw;
  1427. if (@tWithdraw == 0) goto AccWithdrawNoInput;
  1428. if (@tZenyLeft < @tMinZeny) goto AccWithdrawMinZeny;
  1429. if (@tZenyTemp > @tMaxZeny) goto AccWithDrawOverCharZeny;
  1430. set Zeny, Zeny + @tWithdraw;
  1431. set vBankAccLastZeny, vBankAccZeny;
  1432. set vBankAccZeny, vBankAccZeny - @tWithdraw;
  1433. mes "^0072FF[Bank Manager]^000000";
  1434. mes "Transaction completed successfully.";
  1435. mes "Thank you for using our services.";
  1436. next;
  1437. goto AccMenu;
  1438. AccWithdrawNoInput:
  1439. mes "^0072FF[Bank Manager]^000000";
  1440. mes "In order to withdraw from the bank, you must withdraw more than 0 zeny.";
  1441. mes "Do you want to try again?";
  1442. next;
  1443. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  1444. AccWithdrawMinZeny:
  1445. mes "^0072FF[Bank Manager]^000000";
  1446. mes "I'm sorry...";
  1447. mes "You can't withdraw ^0000FF" + @tWithdraw + "z^000000 because your ^FF7F01Bank Account^000000 must have ^0000FF" + @tMinZeny + "z^000000 left or more at all times.";
  1448. mes "In order to take all your money from the bank you must select Close Account in the Account Menu.";
  1449. mes "Do you want to try again?";
  1450. next;
  1451. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  1452. AccWithDrawOverCharZeny:
  1453. mes "^0072FF[Bank Manager]^000000";
  1454. mes "Sorry, but you can't withdraw ^0000FF" + @tWithdraw + "z^000000 because your Player can't carry more than ^0000FF" + @tMaxZeny + "z^000000.";
  1455. mes "Do you want to try again?";
  1456. next;
  1457. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  1458. AccBalance:
  1459. mes "^0072FF[Bank Manager]^000000";
  1460. mes "Account Status:";
  1461. //shown in blue if the same or more, show in red if less than previous balance
  1462. if (vBankAccZeny >= vBankAccLastZeny) goto AccBalance2;
  1463. mes "Current Balance: ^FF0000" + vBankAccZeny +"z^000000.";
  1464. goto AccBalance3;
  1465. AccBalance2:
  1466. mes "Current Balance: ^0000FF" + vBankAccZeny +"z^000000.";
  1467. goto AccBalance3;
  1468. AccBalance3:
  1469. mes "Previous Balance: ^0000FF" + vBankAccLastZeny +"z^000000.";
  1470. mes "Interest Rate: ^0000FF" + @tInterestRate + "%^000000.";
  1471. mes "Interests Payed: ^0000FF" + vBankAccInterests + "z^000000.";
  1472. next;
  1473. goto AccMenu;
  1474. AccClose:
  1475. mes "^0072FF[Bank Manager]^000000";
  1476. mes "If you close your ^FF7F01Bank Account^000000, it means you eliminate it.";
  1477. mes "Of course, you will get all your money back.";
  1478. mes "Are you sure you want to close your ^FF7F01Bank Account^000000?";
  1479. next;
  1480. menu "^FF7F01I don't want it anymore.^000000",AccCloseConfirm,"^FF7F01No, I'll keep it.^000000",AccCloseKeep;
  1481. AccCloseConfirm:
  1482. set vBankAccActive,0;
  1483. set Zeny, Zeny + vBankAccZeny;
  1484. set vBankAccZeny,0;
  1485. set vBankAccLastZeny,0;
  1486. set vBankAccInterests,0;
  1487. mes "^0072FF[Bank Manager]^000000";
  1488. mes "Thanks for using our services, we hope you come back to visit us.";
  1489. mes "Here's your money.";
  1490. next;
  1491. goto EndNPC;
  1492. AccCloseKeep:
  1493. mes "^0072FF[Bank Manager]^000000";
  1494. mes "Good choice, thanks for staying with us.";
  1495. next;
  1496. goto AccMenu;
  1497. EndNPC:
  1498. set @random,rand(4);
  1499. mes "^0072FF[Bank Manager]^000000";
  1500. if (@random == 0) mes "Have a nice day!";
  1501. if (@random == 1) mes "See you soon!";
  1502. if (@random == 2) mes "See you next time!";
  1503. if (@random == 3) mes "Come back soon!";
  1504. close;
  1505. }
  1506. xmas_in.gat,35,37,5 script Bank Manager 109,{
  1507. set @tInterestRate, 2; //no decimals
  1508. set @tMaxAccZeny, 1000000000; //max zeny allowed in ^FF7F01Bank Account^000000 1,000,000,000=1 billion
  1509. set @tMaxZeny, 1000000000; //max zeny that a player can carry
  1510. set @tMinZeny, 100; //min zeny allowed or Bank Account is closed
  1511. set @tCreateZeny, 500; //zeny needed in order to create a Bank Account
  1512. set @tMinDeposit,100; //min zeny to deposit
  1513. set @tBeginningZeny, 100; //amount of zeny in Bank Account after creating
  1514. mes "^0072FF[Bank Manager]^000000";
  1515. mes "Welcome to this office branch of Midgard's Bank.";
  1516. next;
  1517. if (vBankAccActive==1) goto AccMenu;
  1518. mes "^0072FF[Bank Manager]^000000";
  1519. mes "You don't have a ^FF7F01Bank Account^000000 yet, you must buy one.";
  1520. mes "It will cost you ^0000FF" + @tCreateZeny + "z^000000 to create it.";
  1521. next;
  1522. menu "^FF7F01Create Account.^000000",CreateAcc,"^FF7F01Information.^000000",BankInfo,"^FF7F01No thanks.^000000",NoCreateAcc;
  1523. BankInfo:
  1524. mes "^0072FF[Bank Manager]^000000";
  1525. mes "Here are some points that you need to know:";
  1526. mes "1. To create a ^FF7F01Bank Account^000000 you have to pay ^0000FF" + @tCreateZeny + "z^000000.";
  1527. mes "2. You will be charged ^0000FF" + @tInterestRate + " percent^000000 everytime you Deposit.";
  1528. mes "3. You must always have no less than ^0000FF" + @tMinZeny + "z^000000 on your ^FF7F01Bank Account^000000.";
  1529. next;
  1530. mes "4. You can save up to ^0000FF" + @tMaxAccZeny + "z^000000 in your bank account.";
  1531. mes "5. You will be able to access your ^FF7F01Bank Account^000000 in any town with a Bank Office.";
  1532. mes "6. You will start by having ^0000FF" + @tBeginningZeny + "z^000000 in your bank account.";
  1533. close;
  1534. CreateAcc:
  1535. mes "^0072FF[Bank Manager]^000000";
  1536. mes "First of all, you will have to have at least ^0000FF" + @tCreateZeny + "z^000000 with you.";
  1537. mes "Your account will start with ^0000FF" + @tBeginningZeny +"z^000000.";
  1538. mes "Are you sure you want to continue?";
  1539. next;
  1540. menu "^FF7F01Sure.^000000",CreateAccCont,"^FF7F01Nah, it's ok.^000000",NoCreateAcc;
  1541. CreateAccCont:
  1542. if (@tCreateZeny > Zeny) goto CreateAccNoEnoughZeny;
  1543. set Zeny, Zeny - @tCreateZeny;
  1544. set vBankAccActive,1;
  1545. set vBankAccZeny, @tBeginningZeny;
  1546. set vBankAccLastZeny, @tBeginningZeny;
  1547. set vBankAccInterests,0;
  1548. mes "^0072FF[Bank Manager]^000000";
  1549. mes "Congratulations, your ^FF7F01Bank Account^000000 is now created with ^0000FF" + vBankAccZeny + "z^000000.";
  1550. mes "You may now proceed to do any transactions.";
  1551. next;
  1552. goto AccMenu;
  1553. CreateAccNoEnoughZeny:
  1554. mes "^0072FF[Bank Manager]^000000";
  1555. mes "Didn't I tell you to make sure you had enough zeny?";
  1556. mes "You can't create it with just ^0000FF" + Zeny + "z^000000.";
  1557. mes "Come back when you get those ^0000FF" + @tCreateZeny + "z^000000...";
  1558. next;
  1559. goto EndNPC;
  1560. NoCreateAcc:
  1561. mes "^0072FF[Bank Manager]^000000";
  1562. mes "Come back when you change your mind!";
  1563. next;
  1564. goto EndNPC;
  1565. AccMenu:
  1566. mes "^0072FF[Bank Manager]^000000";
  1567. mes "Your current balance is ^0000FF" + vBankAccZeny +"z^000000.";
  1568. mes "What would you like to do now?";
  1569. next;
  1570. menu "^FF7F01Deposit.^000000",AccDeposit,"^FF7F01Withdraw.^000000",AccWithdraw,"^FF7F01Bank Account Info.^000000",AccBalance,"^FF7F01Close Bank Account^000000",AccClose,"^FF7F01Cancel.^000000",EndNPC;
  1571. AccDeposit:
  1572. mes "^0072FF[Bank Manager]^000000";
  1573. mes "It's always good to deposit every once in a while.";
  1574. mes "Be noticed that we charge a ^0000FF" + @tInterestRate + " percent ^000000 of interest rate in every deposit you make.";
  1575. mes "This means that to deposit ^0000FF100z^000000 you need to have pay us ^0000FF" + 100 * @tInterestRate / 100 + "z^000000.";
  1576. mes "How much are you willing to deposit?";
  1577. next;
  1578. AccDepositInput:
  1579. input @tDeposit;
  1580. set @tDepositTax, @tDeposit * @tInterestRate / 100;
  1581. set @tDepositTotal, @tDeposit - @tDepositTax;
  1582. if (@tDeposit <= 0) goto AccDepositNoInput;
  1583. if (@tDeposit < @tMinDeposit) goto AccDepositNotEnoughInput;
  1584. if (@tDepositTotal > Zeny) goto AccDepositNotEnoughZeny;
  1585. set @tBankAccZenyTemp, vBankAccZeny + @tDepositTotal;
  1586. if (@tBankAccZenyTemp > @tMaxAccZeny) goto AccDepositOver;
  1587. if ((@tDeposit <= Zeny) && (@tBankAccZenyTemp <= @tMaxAccZeny)) goto AccDepositCont;
  1588. mes "^0072FF[Bank Manager]^000000";
  1589. mes "Sorry, for some weird reason I couldn't deposit your money.";
  1590. next;
  1591. goto AccMenu;
  1592. AccDepositCont:
  1593. set Zeny, Zeny - @tDeposit;
  1594. set vBankAccLastZeny, vBankAccZeny;
  1595. set vBankAccZeny, @tBankAccZenyTemp;
  1596. set vBankAccInterests, vBankAccInterests + @tDepositTax;
  1597. mes "^0072FF[Bank Manager]^000000";
  1598. mes "Transaction completed successfully.";
  1599. mes "^0000FF" + @tDeposit + "z^000000 substracted from your money (Taxes applied).";
  1600. mes "^0000FF" + @tDepositTotal + "z^000000 successfully added to your ^FF7F01Bank Account^000000.";
  1601. next;
  1602. goto AccMenu;
  1603. AccDepositOver:
  1604. mes "^0072FF[Bank Manager]^000000";
  1605. mes "There is a limit of ^0000FF" + @tMaxAccZeny + "z^000000 of how much zeny your ^FF7F01Bank Account^000000 can hold.";
  1606. mes "You can't deposit more than that, please try again.";
  1607. mes "Do you want to try again?";
  1608. next;
  1609. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  1610. AccDepositNotEnoughInput:
  1611. mes "^0072FF[Bank Manager]^000000";
  1612. mes "You need to put more money in order to make a deposit.";
  1613. mes "Do you want to try again?";
  1614. next;
  1615. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  1616. AccDepositNoInput:
  1617. mes "^0072FF[Bank Manager]^000000";
  1618. mes "You must enter a value higher than ^0000FF" + @tMinDeposit + "z^000000.";
  1619. mes "Do you want to try again?";
  1620. next;
  1621. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  1622. AccDepositNotEnoughZeny:
  1623. mes "^0072FF[Bank Manager]^000000";
  1624. mes "You don't have ^0000FF" + @tDepositTotal + "z^000000.";
  1625. mes "Remember that taxes are being applied.";
  1626. mes "Do you want to try again?";
  1627. next;
  1628. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  1629. AccWithdraw:
  1630. mes "^0072FF[Bank Manager]^000000";
  1631. mes "This is the only transaction I don't like... you figure out why...";
  1632. mes "You can't withdraw leaving less than ^0000FF" + @tMinZeny +"z^000000 in your ^FF7F01Bank Account^000000.";
  1633. mes "Your current balance is ^0000FF" + vBankAccZeny + "z^000000.";
  1634. mes "How much are you going to widthdraw?";
  1635. next;
  1636. AccWithdrawInput:
  1637. input @tWithdraw;
  1638. set @tZenyLeft, vBankAccZeny - @tWithdraw;
  1639. set @tZenyTemp, Zeny + @tWithdraw;
  1640. if (@tWithdraw == 0) goto AccWithdrawNoInput;
  1641. if (@tZenyLeft < @tMinZeny) goto AccWithdrawMinZeny;
  1642. if (@tZenyTemp > @tMaxZeny) goto AccWithDrawOverCharZeny;
  1643. set Zeny, Zeny + @tWithdraw;
  1644. set vBankAccLastZeny, vBankAccZeny;
  1645. set vBankAccZeny, vBankAccZeny - @tWithdraw;
  1646. mes "^0072FF[Bank Manager]^000000";
  1647. mes "Transaction completed successfully.";
  1648. mes "Thank you for using our services.";
  1649. next;
  1650. goto AccMenu;
  1651. AccWithdrawNoInput:
  1652. mes "^0072FF[Bank Manager]^000000";
  1653. mes "In order to withdraw from the bank, you must withdraw more than 0 zeny.";
  1654. mes "Do you want to try again?";
  1655. next;
  1656. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  1657. AccWithdrawMinZeny:
  1658. mes "^0072FF[Bank Manager]^000000";
  1659. mes "I'm sorry...";
  1660. mes "You can't withdraw ^0000FF" + @tWithdraw + "z^000000 because your ^FF7F01Bank Account^000000 must have ^0000FF" + @tMinZeny + "z^000000 left or more at all times.";
  1661. mes "In order to take all your money from the bank you must select Close Account in the Account Menu.";
  1662. mes "Do you want to try again?";
  1663. next;
  1664. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  1665. AccWithDrawOverCharZeny:
  1666. mes "^0072FF[Bank Manager]^000000";
  1667. mes "Sorry, but you can't withdraw ^0000FF" + @tWithdraw + "z^000000 because your Player can't carry more than ^0000FF" + @tMaxZeny + "z^000000.";
  1668. mes "Do you want to try again?";
  1669. next;
  1670. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  1671. AccBalance:
  1672. mes "^0072FF[Bank Manager]^000000";
  1673. mes "Account Status:";
  1674. //shown in blue if the same or more, show in red if less than previous balance
  1675. if (vBankAccZeny >= vBankAccLastZeny) goto AccBalance2;
  1676. mes "Current Balance: ^FF0000" + vBankAccZeny +"z^000000.";
  1677. goto AccBalance3;
  1678. AccBalance2:
  1679. mes "Current Balance: ^0000FF" + vBankAccZeny +"z^000000.";
  1680. goto AccBalance3;
  1681. AccBalance3:
  1682. mes "Previous Balance: ^0000FF" + vBankAccLastZeny +"z^000000.";
  1683. mes "Interest Rate: ^0000FF" + @tInterestRate + "%^000000.";
  1684. mes "Interests Payed: ^0000FF" + vBankAccInterests + "z^000000.";
  1685. next;
  1686. goto AccMenu;
  1687. AccClose:
  1688. mes "^0072FF[Bank Manager]^000000";
  1689. mes "If you close your ^FF7F01Bank Account^000000, it means you eliminate it.";
  1690. mes "Of course, you will get all your money back.";
  1691. mes "Are you sure you want to close your ^FF7F01Bank Account^000000?";
  1692. next;
  1693. menu "^FF7F01I don't want it anymore.^000000",AccCloseConfirm,"^FF7F01No, I'll keep it.^000000",AccCloseKeep;
  1694. AccCloseConfirm:
  1695. set vBankAccActive,0;
  1696. set Zeny, Zeny + vBankAccZeny;
  1697. set vBankAccZeny,0;
  1698. set vBankAccLastZeny,0;
  1699. set vBankAccInterests,0;
  1700. mes "^0072FF[Bank Manager]^000000";
  1701. mes "Thanks for using our services, we hope you come back to visit us.";
  1702. mes "Here's your money.";
  1703. next;
  1704. goto EndNPC;
  1705. AccCloseKeep:
  1706. mes "^0072FF[Bank Manager]^000000";
  1707. mes "Good choice, thanks for staying with us.";
  1708. next;
  1709. goto AccMenu;
  1710. EndNPC:
  1711. set @random,rand(4);
  1712. mes "^0072FF[Bank Manager]^000000";
  1713. if (@random == 0) mes "Have a nice day!";
  1714. if (@random == 1) mes "See you soon!";
  1715. if (@random == 2) mes "See you next time!";
  1716. if (@random == 3) mes "Come back soon!";
  1717. close;
  1718. }
  1719. cmd_in01.gat,115,171,7 script Bank Manager 109,{
  1720. set @tInterestRate, 2; //no decimals
  1721. set @tMaxAccZeny, 1000000000; //max zeny allowed in ^FF7F01Bank Account^000000 1,000,000,000=1 billion
  1722. set @tMaxZeny, 1000000000; //max zeny that a player can carry
  1723. set @tMinZeny, 100; //min zeny allowed or Bank Account is closed
  1724. set @tCreateZeny, 500; //zeny needed in order to create a Bank Account
  1725. set @tMinDeposit,100; //min zeny to deposit
  1726. set @tBeginningZeny, 100; //amount of zeny in Bank Account after creating
  1727. mes "^0072FF[Bank Manager]^000000";
  1728. mes "Welcome to this office branch of Midgard's Bank.";
  1729. next;
  1730. if (vBankAccActive==1) goto AccMenu;
  1731. mes "^0072FF[Bank Manager]^000000";
  1732. mes "You don't have a ^FF7F01Bank Account^000000 yet, you must buy one.";
  1733. mes "It will cost you ^0000FF" + @tCreateZeny + "z^000000 to create it.";
  1734. next;
  1735. menu "^FF7F01Create Account.^000000",CreateAcc,"^FF7F01Information.^000000",BankInfo,"^FF7F01No thanks.^000000",NoCreateAcc;
  1736. BankInfo:
  1737. mes "^0072FF[Bank Manager]^000000";
  1738. mes "Here are some points that you need to know:";
  1739. mes "1. To create a ^FF7F01Bank Account^000000 you have to pay ^0000FF" + @tCreateZeny + "z^000000.";
  1740. mes "2. You will be charged ^0000FF" + @tInterestRate + " percent^000000 everytime you Deposit.";
  1741. mes "3. You must always have no less than ^0000FF" + @tMinZeny + "z^000000 on your ^FF7F01Bank Account^000000.";
  1742. next;
  1743. mes "4. You can save up to ^0000FF" + @tMaxAccZeny + "z^000000 in your bank account.";
  1744. mes "5. You will be able to access your ^FF7F01Bank Account^000000 in any town with a Bank Office.";
  1745. mes "6. You will start by having ^0000FF" + @tBeginningZeny + "z^000000 in your bank account.";
  1746. close;
  1747. CreateAcc:
  1748. mes "^0072FF[Bank Manager]^000000";
  1749. mes "First of all, you will have to have at least ^0000FF" + @tCreateZeny + "z^000000 with you.";
  1750. mes "Your account will start with ^0000FF" + @tBeginningZeny +"z^000000.";
  1751. mes "Are you sure you want to continue?";
  1752. next;
  1753. menu "^FF7F01Sure.^000000",CreateAccCont,"^FF7F01Nah, it's ok.^000000",NoCreateAcc;
  1754. CreateAccCont:
  1755. if (@tCreateZeny > Zeny) goto CreateAccNoEnoughZeny;
  1756. set Zeny, Zeny - @tCreateZeny;
  1757. set vBankAccActive,1;
  1758. set vBankAccZeny, @tBeginningZeny;
  1759. set vBankAccLastZeny, @tBeginningZeny;
  1760. set vBankAccInterests,0;
  1761. mes "^0072FF[Bank Manager]^000000";
  1762. mes "Congratulations, your ^FF7F01Bank Account^000000 is now created with ^0000FF" + vBankAccZeny + "z^000000.";
  1763. mes "You may now proceed to do any transactions.";
  1764. next;
  1765. goto AccMenu;
  1766. CreateAccNoEnoughZeny:
  1767. mes "^0072FF[Bank Manager]^000000";
  1768. mes "Didn't I tell you to make sure you had enough zeny?";
  1769. mes "You can't create it with just ^0000FF" + Zeny + "z^000000.";
  1770. mes "Come back when you get those ^0000FF" + @tCreateZeny + "z^000000...";
  1771. next;
  1772. goto EndNPC;
  1773. NoCreateAcc:
  1774. mes "^0072FF[Bank Manager]^000000";
  1775. mes "Come back when you change your mind!";
  1776. next;
  1777. goto EndNPC;
  1778. AccMenu:
  1779. mes "^0072FF[Bank Manager]^000000";
  1780. mes "Your current balance is ^0000FF" + vBankAccZeny +"z^000000.";
  1781. mes "What would you like to do now?";
  1782. next;
  1783. menu "^FF7F01Deposit.^000000",AccDeposit,"^FF7F01Withdraw.^000000",AccWithdraw,"^FF7F01Bank Account Info.^000000",AccBalance,"^FF7F01Close Bank Account^000000",AccClose,"^FF7F01Cancel.^000000",EndNPC;
  1784. AccDeposit:
  1785. mes "^0072FF[Bank Manager]^000000";
  1786. mes "It's always good to deposit every once in a while.";
  1787. mes "Be noticed that we charge a ^0000FF" + @tInterestRate + " percent ^000000 of interest rate in every deposit you make.";
  1788. mes "This means that to deposit ^0000FF100z^000000 you need to have pay us ^0000FF" + 100 * @tInterestRate / 100 + "z^000000.";
  1789. mes "How much are you willing to deposit?";
  1790. next;
  1791. AccDepositInput:
  1792. input @tDeposit;
  1793. set @tDepositTax, @tDeposit * @tInterestRate / 100;
  1794. set @tDepositTotal, @tDeposit - @tDepositTax;
  1795. if (@tDeposit <= 0) goto AccDepositNoInput;
  1796. if (@tDeposit < @tMinDeposit) goto AccDepositNotEnoughInput;
  1797. if (@tDepositTotal > Zeny) goto AccDepositNotEnoughZeny;
  1798. set @tBankAccZenyTemp, vBankAccZeny + @tDepositTotal;
  1799. if (@tBankAccZenyTemp > @tMaxAccZeny) goto AccDepositOver;
  1800. if ((@tDeposit <= Zeny) && (@tBankAccZenyTemp <= @tMaxAccZeny)) goto AccDepositCont;
  1801. mes "^0072FF[Bank Manager]^000000";
  1802. mes "Sorry, for some weird reason I couldn't deposit your money.";
  1803. next;
  1804. goto AccMenu;
  1805. AccDepositCont:
  1806. set Zeny, Zeny - @tDeposit;
  1807. set vBankAccLastZeny, vBankAccZeny;
  1808. set vBankAccZeny, @tBankAccZenyTemp;
  1809. set vBankAccInterests, vBankAccInterests + @tDepositTax;
  1810. mes "^0072FF[Bank Manager]^000000";
  1811. mes "Transaction completed successfully.";
  1812. mes "^0000FF" + @tDeposit + "z^000000 substracted from your money (Taxes applied).";
  1813. mes "^0000FF" + @tDepositTotal + "z^000000 successfully added to your ^FF7F01Bank Account^000000.";
  1814. next;
  1815. goto AccMenu;
  1816. AccDepositOver:
  1817. mes "^0072FF[Bank Manager]^000000";
  1818. mes "There is a limit of ^0000FF" + @tMaxAccZeny + "z^000000 of how much zeny your ^FF7F01Bank Account^000000 can hold.";
  1819. mes "You can't deposit more than that, please try again.";
  1820. mes "Do you want to try again?";
  1821. next;
  1822. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  1823. AccDepositNotEnoughInput:
  1824. mes "^0072FF[Bank Manager]^000000";
  1825. mes "You need to put more money in order to make a deposit.";
  1826. mes "Do you want to try again?";
  1827. next;
  1828. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  1829. AccDepositNoInput:
  1830. mes "^0072FF[Bank Manager]^000000";
  1831. mes "You must enter a value higher than ^0000FF" + @tMinDeposit + "z^000000.";
  1832. mes "Do you want to try again?";
  1833. next;
  1834. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  1835. AccDepositNotEnoughZeny:
  1836. mes "^0072FF[Bank Manager]^000000";
  1837. mes "You don't have ^0000FF" + @tDepositTotal + "z^000000.";
  1838. mes "Remember that taxes are being applied.";
  1839. mes "Do you want to try again?";
  1840. next;
  1841. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  1842. AccWithdraw:
  1843. mes "^0072FF[Bank Manager]^000000";
  1844. mes "This is the only transaction I don't like... you figure out why...";
  1845. mes "You can't withdraw leaving less than ^0000FF" + @tMinZeny +"z^000000 in your ^FF7F01Bank Account^000000.";
  1846. mes "Your current balance is ^0000FF" + vBankAccZeny + "z^000000.";
  1847. mes "How much are you going to widthdraw?";
  1848. next;
  1849. AccWithdrawInput:
  1850. input @tWithdraw;
  1851. set @tZenyLeft, vBankAccZeny - @tWithdraw;
  1852. set @tZenyTemp, Zeny + @tWithdraw;
  1853. if (@tWithdraw == 0) goto AccWithdrawNoInput;
  1854. if (@tZenyLeft < @tMinZeny) goto AccWithdrawMinZeny;
  1855. if (@tZenyTemp > @tMaxZeny) goto AccWithDrawOverCharZeny;
  1856. set Zeny, Zeny + @tWithdraw;
  1857. set vBankAccLastZeny, vBankAccZeny;
  1858. set vBankAccZeny, vBankAccZeny - @tWithdraw;
  1859. mes "^0072FF[Bank Manager]^000000";
  1860. mes "Transaction completed successfully.";
  1861. mes "Thank you for using our services.";
  1862. next;
  1863. goto AccMenu;
  1864. AccWithdrawNoInput:
  1865. mes "^0072FF[Bank Manager]^000000";
  1866. mes "In order to withdraw from the bank, you must withdraw more than 0 zeny.";
  1867. mes "Do you want to try again?";
  1868. next;
  1869. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  1870. AccWithdrawMinZeny:
  1871. mes "^0072FF[Bank Manager]^000000";
  1872. mes "I'm sorry...";
  1873. mes "You can't withdraw ^0000FF" + @tWithdraw + "z^000000 because your ^FF7F01Bank Account^000000 must have ^0000FF" + @tMinZeny + "z^000000 left or more at all times.";
  1874. mes "In order to take all your money from the bank you must select Close Account in the Account Menu.";
  1875. mes "Do you want to try again?";
  1876. next;
  1877. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  1878. AccWithDrawOverCharZeny:
  1879. mes "^0072FF[Bank Manager]^000000";
  1880. mes "Sorry, but you can't withdraw ^0000FF" + @tWithdraw + "z^000000 because your Player can't carry more than ^0000FF" + @tMaxZeny + "z^000000.";
  1881. mes "Do you want to try again?";
  1882. next;
  1883. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  1884. AccBalance:
  1885. mes "^0072FF[Bank Manager]^000000";
  1886. mes "Account Status:";
  1887. //shown in blue if the same or more, show in red if less than previous balance
  1888. if (vBankAccZeny >= vBankAccLastZeny) goto AccBalance2;
  1889. mes "Current Balance: ^FF0000" + vBankAccZeny +"z^000000.";
  1890. goto AccBalance3;
  1891. AccBalance2:
  1892. mes "Current Balance: ^0000FF" + vBankAccZeny +"z^000000.";
  1893. goto AccBalance3;
  1894. AccBalance3:
  1895. mes "Previous Balance: ^0000FF" + vBankAccLastZeny +"z^000000.";
  1896. mes "Interest Rate: ^0000FF" + @tInterestRate + "%^000000.";
  1897. mes "Interests Payed: ^0000FF" + vBankAccInterests + "z^000000.";
  1898. next;
  1899. goto AccMenu;
  1900. AccClose:
  1901. mes "^0072FF[Bank Manager]^000000";
  1902. mes "If you close your ^FF7F01Bank Account^000000, it means you eliminate it.";
  1903. mes "Of course, you will get all your money back.";
  1904. mes "Are you sure you want to close your ^FF7F01Bank Account^000000?";
  1905. next;
  1906. menu "^FF7F01I don't want it anymore.^000000",AccCloseConfirm,"^FF7F01No, I'll keep it.^000000",AccCloseKeep;
  1907. AccCloseConfirm:
  1908. set vBankAccActive,0;
  1909. set Zeny, Zeny + vBankAccZeny;
  1910. set vBankAccZeny,0;
  1911. set vBankAccLastZeny,0;
  1912. set vBankAccInterests,0;
  1913. mes "^0072FF[Bank Manager]^000000";
  1914. mes "Thanks for using our services, we hope you come back to visit us.";
  1915. mes "Here's your money.";
  1916. next;
  1917. goto EndNPC;
  1918. AccCloseKeep:
  1919. mes "^0072FF[Bank Manager]^000000";
  1920. mes "Good choice, thanks for staying with us.";
  1921. next;
  1922. goto AccMenu;
  1923. EndNPC:
  1924. set @random,rand(4);
  1925. mes "^0072FF[Bank Manager]^000000";
  1926. if (@random == 0) mes "Have a nice day!";
  1927. if (@random == 1) mes "See you soon!";
  1928. if (@random == 2) mes "See you next time!";
  1929. if (@random == 3) mes "Come back soon!";
  1930. close;
  1931. }
  1932. yuno_in01.gat,119,29,2 script Bank Manager 109,{
  1933. set @tInterestRate, 2; //no decimals
  1934. set @tMaxAccZeny, 1000000000; //max zeny allowed in ^FF7F01Bank Account^000000 1,000,000,000=1 billion
  1935. set @tMaxZeny, 1000000000; //max zeny that a player can carry
  1936. set @tMinZeny, 100; //min zeny allowed or Bank Account is closed
  1937. set @tCreateZeny, 500; //zeny needed in order to create a Bank Account
  1938. set @tMinDeposit,100; //min zeny to deposit
  1939. set @tBeginningZeny, 100; //amount of zeny in Bank Account after creating
  1940. mes "^0072FF[Bank Manager]^000000";
  1941. mes "Welcome to this office branch of Midgard's Bank.";
  1942. next;
  1943. if (vBankAccActive==1) goto AccMenu;
  1944. mes "^0072FF[Bank Manager]^000000";
  1945. mes "You don't have a ^FF7F01Bank Account^000000 yet, you must buy one.";
  1946. mes "It will cost you ^0000FF" + @tCreateZeny + "z^000000 to create it.";
  1947. next;
  1948. menu "^FF7F01Create Account.^000000",CreateAcc,"^FF7F01Information.^000000",BankInfo,"^FF7F01No thanks.^000000",NoCreateAcc;
  1949. BankInfo:
  1950. mes "^0072FF[Bank Manager]^000000";
  1951. mes "Here are some points that you need to know:";
  1952. mes "1. To create a ^FF7F01Bank Account^000000 you have to pay ^0000FF" + @tCreateZeny + "z^000000.";
  1953. mes "2. You will be charged ^0000FF" + @tInterestRate + " percent^000000 everytime you Deposit.";
  1954. mes "3. You must always have no less than ^0000FF" + @tMinZeny + "z^000000 on your ^FF7F01Bank Account^000000.";
  1955. next;
  1956. mes "4. You can save up to ^0000FF" + @tMaxAccZeny + "z^000000 in your bank account.";
  1957. mes "5. You will be able to access your ^FF7F01Bank Account^000000 in any town with a Bank Office.";
  1958. mes "6. You will start by having ^0000FF" + @tBeginningZeny + "z^000000 in your bank account.";
  1959. close;
  1960. CreateAcc:
  1961. mes "^0072FF[Bank Manager]^000000";
  1962. mes "First of all, you will have to have at least ^0000FF" + @tCreateZeny + "z^000000 with you.";
  1963. mes "Your account will start with ^0000FF" + @tBeginningZeny +"z^000000.";
  1964. mes "Are you sure you want to continue?";
  1965. next;
  1966. menu "^FF7F01Sure.^000000",CreateAccCont,"^FF7F01Nah, it's ok.^000000",NoCreateAcc;
  1967. CreateAccCont:
  1968. if (@tCreateZeny > Zeny) goto CreateAccNoEnoughZeny;
  1969. set Zeny, Zeny - @tCreateZeny;
  1970. set vBankAccActive,1;
  1971. set vBankAccZeny, @tBeginningZeny;
  1972. set vBankAccLastZeny, @tBeginningZeny;
  1973. set vBankAccInterests,0;
  1974. mes "^0072FF[Bank Manager]^000000";
  1975. mes "Congratulations, your ^FF7F01Bank Account^000000 is now created with ^0000FF" + vBankAccZeny + "z^000000.";
  1976. mes "You may now proceed to do any transactions.";
  1977. next;
  1978. goto AccMenu;
  1979. CreateAccNoEnoughZeny:
  1980. mes "^0072FF[Bank Manager]^000000";
  1981. mes "Didn't I tell you to make sure you had enough zeny?";
  1982. mes "You can't create it with just ^0000FF" + Zeny + "z^000000.";
  1983. mes "Come back when you get those ^0000FF" + @tCreateZeny + "z^000000...";
  1984. next;
  1985. goto EndNPC;
  1986. NoCreateAcc:
  1987. mes "^0072FF[Bank Manager]^000000";
  1988. mes "Come back when you change your mind!";
  1989. next;
  1990. goto EndNPC;
  1991. AccMenu:
  1992. mes "^0072FF[Bank Manager]^000000";
  1993. mes "Your current balance is ^0000FF" + vBankAccZeny +"z^000000.";
  1994. mes "What would you like to do now?";
  1995. next;
  1996. menu "^FF7F01Deposit.^000000",AccDeposit,"^FF7F01Withdraw.^000000",AccWithdraw,"^FF7F01Bank Account Info.^000000",AccBalance,"^FF7F01Close Bank Account^000000",AccClose,"^FF7F01Cancel.^000000",EndNPC;
  1997. AccDeposit:
  1998. mes "^0072FF[Bank Manager]^000000";
  1999. mes "It's always good to deposit every once in a while.";
  2000. mes "Be noticed that we charge a ^0000FF" + @tInterestRate + " percent ^000000 of interest rate in every deposit you make.";
  2001. mes "This means that to deposit ^0000FF100z^000000 you need to have pay us ^0000FF" + 100 * @tInterestRate / 100 + "z^000000.";
  2002. mes "How much are you willing to deposit?";
  2003. next;
  2004. AccDepositInput:
  2005. input @tDeposit;
  2006. set @tDepositTax, @tDeposit * @tInterestRate / 100;
  2007. set @tDepositTotal, @tDeposit - @tDepositTax;
  2008. if (@tDeposit <= 0) goto AccDepositNoInput;
  2009. if (@tDeposit < @tMinDeposit) goto AccDepositNotEnoughInput;
  2010. if (@tDepositTotal > Zeny) goto AccDepositNotEnoughZeny;
  2011. set @tBankAccZenyTemp, vBankAccZeny + @tDepositTotal;
  2012. if (@tBankAccZenyTemp > @tMaxAccZeny) goto AccDepositOver;
  2013. if ((@tDeposit <= Zeny) && (@tBankAccZenyTemp <= @tMaxAccZeny)) goto AccDepositCont;
  2014. mes "^0072FF[Bank Manager]^000000";
  2015. mes "Sorry, for some weird reason I couldn't deposit your money.";
  2016. next;
  2017. goto AccMenu;
  2018. AccDepositCont:
  2019. set Zeny, Zeny - @tDeposit;
  2020. set vBankAccLastZeny, vBankAccZeny;
  2021. set vBankAccZeny, @tBankAccZenyTemp;
  2022. set vBankAccInterests, vBankAccInterests + @tDepositTax;
  2023. mes "^0072FF[Bank Manager]^000000";
  2024. mes "Transaction completed successfully.";
  2025. mes "^0000FF" + @tDeposit + "z^000000 substracted from your money (Taxes applied).";
  2026. mes "^0000FF" + @tDepositTotal + "z^000000 successfully added to your ^FF7F01Bank Account^000000.";
  2027. next;
  2028. goto AccMenu;
  2029. AccDepositOver:
  2030. mes "^0072FF[Bank Manager]^000000";
  2031. mes "There is a limit of ^0000FF" + @tMaxAccZeny + "z^000000 of how much zeny your ^FF7F01Bank Account^000000 can hold.";
  2032. mes "You can't deposit more than that, please try again.";
  2033. mes "Do you want to try again?";
  2034. next;
  2035. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  2036. AccDepositNotEnoughInput:
  2037. mes "^0072FF[Bank Manager]^000000";
  2038. mes "You need to put more money in order to make a deposit.";
  2039. mes "Do you want to try again?";
  2040. next;
  2041. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  2042. AccDepositNoInput:
  2043. mes "^0072FF[Bank Manager]^000000";
  2044. mes "You must enter a value higher than ^0000FF" + @tMinDeposit + "z^000000.";
  2045. mes "Do you want to try again?";
  2046. next;
  2047. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  2048. AccDepositNotEnoughZeny:
  2049. mes "^0072FF[Bank Manager]^000000";
  2050. mes "You don't have ^0000FF" + @tDepositTotal + "z^000000.";
  2051. mes "Remember that taxes are being applied.";
  2052. mes "Do you want to try again?";
  2053. next;
  2054. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  2055. AccWithdraw:
  2056. mes "^0072FF[Bank Manager]^000000";
  2057. mes "This is the only transaction I don't like... you figure out why...";
  2058. mes "You can't withdraw leaving less than ^0000FF" + @tMinZeny +"z^000000 in your ^FF7F01Bank Account^000000.";
  2059. mes "Your current balance is ^0000FF" + vBankAccZeny + "z^000000.";
  2060. mes "How much are you going to widthdraw?";
  2061. next;
  2062. AccWithdrawInput:
  2063. input @tWithdraw;
  2064. set @tZenyLeft, vBankAccZeny - @tWithdraw;
  2065. set @tZenyTemp, Zeny + @tWithdraw;
  2066. if (@tWithdraw == 0) goto AccWithdrawNoInput;
  2067. if (@tZenyLeft < @tMinZeny) goto AccWithdrawMinZeny;
  2068. if (@tZenyTemp > @tMaxZeny) goto AccWithDrawOverCharZeny;
  2069. set Zeny, Zeny + @tWithdraw;
  2070. set vBankAccLastZeny, vBankAccZeny;
  2071. set vBankAccZeny, vBankAccZeny - @tWithdraw;
  2072. mes "^0072FF[Bank Manager]^000000";
  2073. mes "Transaction completed successfully.";
  2074. mes "Thank you for using our services.";
  2075. next;
  2076. goto AccMenu;
  2077. AccWithdrawNoInput:
  2078. mes "^0072FF[Bank Manager]^000000";
  2079. mes "In order to withdraw from the bank, you must withdraw more than 0 zeny.";
  2080. mes "Do you want to try again?";
  2081. next;
  2082. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  2083. AccWithdrawMinZeny:
  2084. mes "^0072FF[Bank Manager]^000000";
  2085. mes "I'm sorry...";
  2086. mes "You can't withdraw ^0000FF" + @tWithdraw + "z^000000 because your ^FF7F01Bank Account^000000 must have ^0000FF" + @tMinZeny + "z^000000 left or more at all times.";
  2087. mes "In order to take all your money from the bank you must select Close Account in the Account Menu.";
  2088. mes "Do you want to try again?";
  2089. next;
  2090. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  2091. AccWithDrawOverCharZeny:
  2092. mes "^0072FF[Bank Manager]^000000";
  2093. mes "Sorry, but you can't withdraw ^0000FF" + @tWithdraw + "z^000000 because your Player can't carry more than ^0000FF" + @tMaxZeny + "z^000000.";
  2094. mes "Do you want to try again?";
  2095. next;
  2096. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  2097. AccBalance:
  2098. mes "^0072FF[Bank Manager]^000000";
  2099. mes "Account Status:";
  2100. //shown in blue if the same or more, show in red if less than previous balance
  2101. if (vBankAccZeny >= vBankAccLastZeny) goto AccBalance2;
  2102. mes "Current Balance: ^FF0000" + vBankAccZeny +"z^000000.";
  2103. goto AccBalance3;
  2104. AccBalance2:
  2105. mes "Current Balance: ^0000FF" + vBankAccZeny +"z^000000.";
  2106. goto AccBalance3;
  2107. AccBalance3:
  2108. mes "Previous Balance: ^0000FF" + vBankAccLastZeny +"z^000000.";
  2109. mes "Interest Rate: ^0000FF" + @tInterestRate + "%^000000.";
  2110. mes "Interests Payed: ^0000FF" + vBankAccInterests + "z^000000.";
  2111. next;
  2112. goto AccMenu;
  2113. AccClose:
  2114. mes "^0072FF[Bank Manager]^000000";
  2115. mes "If you close your ^FF7F01Bank Account^000000, it means you eliminate it.";
  2116. mes "Of course, you will get all your money back.";
  2117. mes "Are you sure you want to close your ^FF7F01Bank Account^000000?";
  2118. next;
  2119. menu "^FF7F01I don't want it anymore.^000000",AccCloseConfirm,"^FF7F01No, I'll keep it.^000000",AccCloseKeep;
  2120. AccCloseConfirm:
  2121. set vBankAccActive,0;
  2122. set Zeny, Zeny + vBankAccZeny;
  2123. set vBankAccZeny,0;
  2124. set vBankAccLastZeny,0;
  2125. set vBankAccInterests,0;
  2126. mes "^0072FF[Bank Manager]^000000";
  2127. mes "Thanks for using our services, we hope you come back to visit us.";
  2128. mes "Here's your money.";
  2129. next;
  2130. goto EndNPC;
  2131. AccCloseKeep:
  2132. mes "^0072FF[Bank Manager]^000000";
  2133. mes "Good choice, thanks for staying with us.";
  2134. next;
  2135. goto AccMenu;
  2136. EndNPC:
  2137. set @random,rand(4);
  2138. mes "^0072FF[Bank Manager]^000000";
  2139. if (@random == 0) mes "Have a nice day!";
  2140. if (@random == 1) mes "See you soon!";
  2141. if (@random == 2) mes "See you next time!";
  2142. if (@random == 3) mes "Come back soon!";
  2143. close;
  2144. }
  2145. amatsu.gat,189,108,6 script Bank Manager 109,{
  2146. set @tInterestRate, 2; //no decimals
  2147. set @tMaxAccZeny, 1000000000; //max zeny allowed in ^FF7F01Bank Account^000000 1,000,000,000=1 billion
  2148. set @tMaxZeny, 1000000000; //max zeny that a player can carry
  2149. set @tMinZeny, 100; //min zeny allowed or Bank Account is closed
  2150. set @tCreateZeny, 500; //zeny needed in order to create a Bank Account
  2151. set @tMinDeposit,100; //min zeny to deposit
  2152. set @tBeginningZeny, 100; //amount of zeny in Bank Account after creating
  2153. mes "^0072FF[Bank Manager]^000000";
  2154. mes "Welcome to this office branch of Midgard's Bank.";
  2155. next;
  2156. if (vBankAccActive==1) goto AccMenu;
  2157. mes "^0072FF[Bank Manager]^000000";
  2158. mes "You don't have a ^FF7F01Bank Account^000000 yet, you must buy one.";
  2159. mes "It will cost you ^0000FF" + @tCreateZeny + "z^000000 to create it.";
  2160. next;
  2161. menu "^FF7F01Create Account.^000000",CreateAcc,"^FF7F01Information.^000000",BankInfo,"^FF7F01No thanks.^000000",NoCreateAcc;
  2162. BankInfo:
  2163. mes "^0072FF[Bank Manager]^000000";
  2164. mes "Here are some points that you need to know:";
  2165. mes "1. To create a ^FF7F01Bank Account^000000 you have to pay ^0000FF" + @tCreateZeny + "z^000000.";
  2166. mes "2. You will be charged ^0000FF" + @tInterestRate + " percent^000000 everytime you Deposit.";
  2167. mes "3. You must always have no less than ^0000FF" + @tMinZeny + "z^000000 on your ^FF7F01Bank Account^000000.";
  2168. next;
  2169. mes "4. You can save up to ^0000FF" + @tMaxAccZeny + "z^000000 in your bank account.";
  2170. mes "5. You will be able to access your ^FF7F01Bank Account^000000 in any town with a Bank Office.";
  2171. mes "6. You will start by having ^0000FF" + @tBeginningZeny + "z^000000 in your bank account.";
  2172. close;
  2173. CreateAcc:
  2174. mes "^0072FF[Bank Manager]^000000";
  2175. mes "First of all, you will have to have at least ^0000FF" + @tCreateZeny + "z^000000 with you.";
  2176. mes "Your account will start with ^0000FF" + @tBeginningZeny +"z^000000.";
  2177. mes "Are you sure you want to continue?";
  2178. next;
  2179. menu "^FF7F01Sure.^000000",CreateAccCont,"^FF7F01Nah, it's ok.^000000",NoCreateAcc;
  2180. CreateAccCont:
  2181. if (@tCreateZeny > Zeny) goto CreateAccNoEnoughZeny;
  2182. set Zeny, Zeny - @tCreateZeny;
  2183. set vBankAccActive,1;
  2184. set vBankAccZeny, @tBeginningZeny;
  2185. set vBankAccLastZeny, @tBeginningZeny;
  2186. set vBankAccInterests,0;
  2187. mes "^0072FF[Bank Manager]^000000";
  2188. mes "Congratulations, your ^FF7F01Bank Account^000000 is now created with ^0000FF" + vBankAccZeny + "z^000000.";
  2189. mes "You may now proceed to do any transactions.";
  2190. next;
  2191. goto AccMenu;
  2192. CreateAccNoEnoughZeny:
  2193. mes "^0072FF[Bank Manager]^000000";
  2194. mes "Didn't I tell you to make sure you had enough zeny?";
  2195. mes "You can't create it with just ^0000FF" + Zeny + "z^000000.";
  2196. mes "Come back when you get those ^0000FF" + @tCreateZeny + "z^000000...";
  2197. next;
  2198. goto EndNPC;
  2199. NoCreateAcc:
  2200. mes "^0072FF[Bank Manager]^000000";
  2201. mes "Come back when you change your mind!";
  2202. next;
  2203. goto EndNPC;
  2204. AccMenu:
  2205. mes "^0072FF[Bank Manager]^000000";
  2206. mes "Your current balance is ^0000FF" + vBankAccZeny +"z^000000.";
  2207. mes "What would you like to do now?";
  2208. next;
  2209. menu "^FF7F01Deposit.^000000",AccDeposit,"^FF7F01Withdraw.^000000",AccWithdraw,"^FF7F01Bank Account Info.^000000",AccBalance,"^FF7F01Close Bank Account^000000",AccClose,"^FF7F01Cancel.^000000",EndNPC;
  2210. AccDeposit:
  2211. mes "^0072FF[Bank Manager]^000000";
  2212. mes "It's always good to deposit every once in a while.";
  2213. mes "Be noticed that we charge a ^0000FF" + @tInterestRate + " percent ^000000 of interest rate in every deposit you make.";
  2214. mes "This means that to deposit ^0000FF100z^000000 you need to have pay us ^0000FF" + 100 * @tInterestRate / 100 + "z^000000.";
  2215. mes "How much are you willing to deposit?";
  2216. next;
  2217. AccDepositInput:
  2218. input @tDeposit;
  2219. set @tDepositTax, @tDeposit * @tInterestRate / 100;
  2220. set @tDepositTotal, @tDeposit - @tDepositTax;
  2221. if (@tDeposit <= 0) goto AccDepositNoInput;
  2222. if (@tDeposit < @tMinDeposit) goto AccDepositNotEnoughInput;
  2223. if (@tDepositTotal > Zeny) goto AccDepositNotEnoughZeny;
  2224. set @tBankAccZenyTemp, vBankAccZeny + @tDepositTotal;
  2225. if (@tBankAccZenyTemp > @tMaxAccZeny) goto AccDepositOver;
  2226. if ((@tDeposit <= Zeny) && (@tBankAccZenyTemp <= @tMaxAccZeny)) goto AccDepositCont;
  2227. mes "^0072FF[Bank Manager]^000000";
  2228. mes "Sorry, for some weird reason I couldn't deposit your money.";
  2229. next;
  2230. goto AccMenu;
  2231. AccDepositCont:
  2232. set Zeny, Zeny - @tDeposit;
  2233. set vBankAccLastZeny, vBankAccZeny;
  2234. set vBankAccZeny, @tBankAccZenyTemp;
  2235. set vBankAccInterests, vBankAccInterests + @tDepositTax;
  2236. mes "^0072FF[Bank Manager]^000000";
  2237. mes "Transaction completed successfully.";
  2238. mes "^0000FF" + @tDeposit + "z^000000 substracted from your money (Taxes applied).";
  2239. mes "^0000FF" + @tDepositTotal + "z^000000 successfully added to your ^FF7F01Bank Account^000000.";
  2240. next;
  2241. goto AccMenu;
  2242. AccDepositOver:
  2243. mes "^0072FF[Bank Manager]^000000";
  2244. mes "There is a limit of ^0000FF" + @tMaxAccZeny + "z^000000 of how much zeny your ^FF7F01Bank Account^000000 can hold.";
  2245. mes "You can't deposit more than that, please try again.";
  2246. mes "Do you want to try again?";
  2247. next;
  2248. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  2249. AccDepositNotEnoughInput:
  2250. mes "^0072FF[Bank Manager]^000000";
  2251. mes "You need to put more money in order to make a deposit.";
  2252. mes "Do you want to try again?";
  2253. next;
  2254. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  2255. AccDepositNoInput:
  2256. mes "^0072FF[Bank Manager]^000000";
  2257. mes "You must enter a value higher than ^0000FF" + @tMinDeposit + "z^000000.";
  2258. mes "Do you want to try again?";
  2259. next;
  2260. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  2261. AccDepositNotEnoughZeny:
  2262. mes "^0072FF[Bank Manager]^000000";
  2263. mes "You don't have ^0000FF" + @tDepositTotal + "z^000000.";
  2264. mes "Remember that taxes are being applied.";
  2265. mes "Do you want to try again?";
  2266. next;
  2267. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  2268. AccWithdraw:
  2269. mes "^0072FF[Bank Manager]^000000";
  2270. mes "This is the only transaction I don't like... you figure out why...";
  2271. mes "You can't withdraw leaving less than ^0000FF" + @tMinZeny +"z^000000 in your ^FF7F01Bank Account^000000.";
  2272. mes "Your current balance is ^0000FF" + vBankAccZeny + "z^000000.";
  2273. mes "How much are you going to widthdraw?";
  2274. next;
  2275. AccWithdrawInput:
  2276. input @tWithdraw;
  2277. set @tZenyLeft, vBankAccZeny - @tWithdraw;
  2278. set @tZenyTemp, Zeny + @tWithdraw;
  2279. if (@tWithdraw == 0) goto AccWithdrawNoInput;
  2280. if (@tZenyLeft < @tMinZeny) goto AccWithdrawMinZeny;
  2281. if (@tZenyTemp > @tMaxZeny) goto AccWithDrawOverCharZeny;
  2282. set Zeny, Zeny + @tWithdraw;
  2283. set vBankAccLastZeny, vBankAccZeny;
  2284. set vBankAccZeny, vBankAccZeny - @tWithdraw;
  2285. mes "^0072FF[Bank Manager]^000000";
  2286. mes "Transaction completed successfully.";
  2287. mes "Thank you for using our services.";
  2288. next;
  2289. goto AccMenu;
  2290. AccWithdrawNoInput:
  2291. mes "^0072FF[Bank Manager]^000000";
  2292. mes "In order to withdraw from the bank, you must withdraw more than 0 zeny.";
  2293. mes "Do you want to try again?";
  2294. next;
  2295. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  2296. AccWithdrawMinZeny:
  2297. mes "^0072FF[Bank Manager]^000000";
  2298. mes "I'm sorry...";
  2299. mes "You can't withdraw ^0000FF" + @tWithdraw + "z^000000 because your ^FF7F01Bank Account^000000 must have ^0000FF" + @tMinZeny + "z^000000 left or more at all times.";
  2300. mes "In order to take all your money from the bank you must select Close Account in the Account Menu.";
  2301. mes "Do you want to try again?";
  2302. next;
  2303. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  2304. AccWithDrawOverCharZeny:
  2305. mes "^0072FF[Bank Manager]^000000";
  2306. mes "Sorry, but you can't withdraw ^0000FF" + @tWithdraw + "z^000000 because your Player can't carry more than ^0000FF" + @tMaxZeny + "z^000000.";
  2307. mes "Do you want to try again?";
  2308. next;
  2309. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  2310. AccBalance:
  2311. mes "^0072FF[Bank Manager]^000000";
  2312. mes "Account Status:";
  2313. //shown in blue if the same or more, show in red if less than previous balance
  2314. if (vBankAccZeny >= vBankAccLastZeny) goto AccBalance2;
  2315. mes "Current Balance: ^FF0000" + vBankAccZeny +"z^000000.";
  2316. goto AccBalance3;
  2317. AccBalance2:
  2318. mes "Current Balance: ^0000FF" + vBankAccZeny +"z^000000.";
  2319. goto AccBalance3;
  2320. AccBalance3:
  2321. mes "Previous Balance: ^0000FF" + vBankAccLastZeny +"z^000000.";
  2322. mes "Interest Rate: ^0000FF" + @tInterestRate + "%^000000.";
  2323. mes "Interests Payed: ^0000FF" + vBankAccInterests + "z^000000.";
  2324. next;
  2325. goto AccMenu;
  2326. AccClose:
  2327. mes "^0072FF[Bank Manager]^000000";
  2328. mes "If you close your ^FF7F01Bank Account^000000, it means you eliminate it.";
  2329. mes "Of course, you will get all your money back.";
  2330. mes "Are you sure you want to close your ^FF7F01Bank Account^000000?";
  2331. next;
  2332. menu "^FF7F01I don't want it anymore.^000000",AccCloseConfirm,"^FF7F01No, I'll keep it.^000000",AccCloseKeep;
  2333. AccCloseConfirm:
  2334. set vBankAccActive,0;
  2335. set Zeny, Zeny + vBankAccZeny;
  2336. set vBankAccZeny,0;
  2337. set vBankAccLastZeny,0;
  2338. set vBankAccInterests,0;
  2339. mes "^0072FF[Bank Manager]^000000";
  2340. mes "Thanks for using our services, we hope you come back to visit us.";
  2341. mes "Here's your money.";
  2342. next;
  2343. goto EndNPC;
  2344. AccCloseKeep:
  2345. mes "^0072FF[Bank Manager]^000000";
  2346. mes "Good choice, thanks for staying with us.";
  2347. next;
  2348. goto AccMenu;
  2349. EndNPC:
  2350. set @random,rand(4);
  2351. mes "^0072FF[Bank Manager]^000000";
  2352. if (@random == 0) mes "Have a nice day!";
  2353. if (@random == 1) mes "See you soon!";
  2354. if (@random == 2) mes "See you next time!";
  2355. if (@random == 3) mes "Come back soon!";
  2356. close;
  2357. }
  2358. gonryun.gat,146,142,3 script Bank Manager 109,{
  2359. set @tInterestRate, 2; //no decimals
  2360. set @tMaxAccZeny, 1000000000; //max zeny allowed in ^FF7F01Bank Account^000000 1,000,000,000=1 billion
  2361. set @tMaxZeny, 1000000000; //max zeny that a player can carry
  2362. set @tMinZeny, 100; //min zeny allowed or Bank Account is closed
  2363. set @tCreateZeny, 500; //zeny needed in order to create a Bank Account
  2364. set @tMinDeposit,100; //min zeny to deposit
  2365. set @tBeginningZeny, 100; //amount of zeny in Bank Account after creating
  2366. mes "^0072FF[Bank Manager]^000000";
  2367. mes "Welcome to this office branch of Midgard's Bank.";
  2368. next;
  2369. if (vBankAccActive==1) goto AccMenu;
  2370. mes "^0072FF[Bank Manager]^000000";
  2371. mes "You don't have a ^FF7F01Bank Account^000000 yet, you must buy one.";
  2372. mes "It will cost you ^0000FF" + @tCreateZeny + "z^000000 to create it.";
  2373. next;
  2374. menu "^FF7F01Create Account.^000000",CreateAcc,"^FF7F01Information.^000000",BankInfo,"^FF7F01No thanks.^000000",NoCreateAcc;
  2375. BankInfo:
  2376. mes "^0072FF[Bank Manager]^000000";
  2377. mes "Here are some points that you need to know:";
  2378. mes "1. To create a ^FF7F01Bank Account^000000 you have to pay ^0000FF" + @tCreateZeny + "z^000000.";
  2379. mes "2. You will be charged ^0000FF" + @tInterestRate + " percent^000000 everytime you Deposit.";
  2380. mes "3. You must always have no less than ^0000FF" + @tMinZeny + "z^000000 on your ^FF7F01Bank Account^000000.";
  2381. next;
  2382. mes "4. You can save up to ^0000FF" + @tMaxAccZeny + "z^000000 in your bank account.";
  2383. mes "5. You will be able to access your ^FF7F01Bank Account^000000 in any town with a Bank Office.";
  2384. mes "6. You will start by having ^0000FF" + @tBeginningZeny + "z^000000 in your bank account.";
  2385. close;
  2386. CreateAcc:
  2387. mes "^0072FF[Bank Manager]^000000";
  2388. mes "First of all, you will have to have at least ^0000FF" + @tCreateZeny + "z^000000 with you.";
  2389. mes "Your account will start with ^0000FF" + @tBeginningZeny +"z^000000.";
  2390. mes "Are you sure you want to continue?";
  2391. next;
  2392. menu "^FF7F01Sure.^000000",CreateAccCont,"^FF7F01Nah, it's ok.^000000",NoCreateAcc;
  2393. CreateAccCont:
  2394. if (@tCreateZeny > Zeny) goto CreateAccNoEnoughZeny;
  2395. set Zeny, Zeny - @tCreateZeny;
  2396. set vBankAccActive,1;
  2397. set vBankAccZeny, @tBeginningZeny;
  2398. set vBankAccLastZeny, @tBeginningZeny;
  2399. set vBankAccInterests,0;
  2400. mes "^0072FF[Bank Manager]^000000";
  2401. mes "Congratulations, your ^FF7F01Bank Account^000000 is now created with ^0000FF" + vBankAccZeny + "z^000000.";
  2402. mes "You may now proceed to do any transactions.";
  2403. next;
  2404. goto AccMenu;
  2405. CreateAccNoEnoughZeny:
  2406. mes "^0072FF[Bank Manager]^000000";
  2407. mes "Didn't I tell you to make sure you had enough zeny?";
  2408. mes "You can't create it with just ^0000FF" + Zeny + "z^000000.";
  2409. mes "Come back when you get those ^0000FF" + @tCreateZeny + "z^000000...";
  2410. next;
  2411. goto EndNPC;
  2412. NoCreateAcc:
  2413. mes "^0072FF[Bank Manager]^000000";
  2414. mes "Come back when you change your mind!";
  2415. next;
  2416. goto EndNPC;
  2417. AccMenu:
  2418. mes "^0072FF[Bank Manager]^000000";
  2419. mes "Your current balance is ^0000FF" + vBankAccZeny +"z^000000.";
  2420. mes "What would you like to do now?";
  2421. next;
  2422. menu "^FF7F01Deposit.^000000",AccDeposit,"^FF7F01Withdraw.^000000",AccWithdraw,"^FF7F01Bank Account Info.^000000",AccBalance,"^FF7F01Close Bank Account^000000",AccClose,"^FF7F01Cancel.^000000",EndNPC;
  2423. AccDeposit:
  2424. mes "^0072FF[Bank Manager]^000000";
  2425. mes "It's always good to deposit every once in a while.";
  2426. mes "Be noticed that we charge a ^0000FF" + @tInterestRate + " percent ^000000 of interest rate in every deposit you make.";
  2427. mes "This means that to deposit ^0000FF100z^000000 you need to have pay us ^0000FF" + 100 * @tInterestRate / 100 + "z^000000.";
  2428. mes "How much are you willing to deposit?";
  2429. next;
  2430. AccDepositInput:
  2431. input @tDeposit;
  2432. set @tDepositTax, @tDeposit * @tInterestRate / 100;
  2433. set @tDepositTotal, @tDeposit - @tDepositTax;
  2434. if (@tDeposit <= 0) goto AccDepositNoInput;
  2435. if (@tDeposit < @tMinDeposit) goto AccDepositNotEnoughInput;
  2436. if (@tDepositTotal > Zeny) goto AccDepositNotEnoughZeny;
  2437. set @tBankAccZenyTemp, vBankAccZeny + @tDepositTotal;
  2438. if (@tBankAccZenyTemp > @tMaxAccZeny) goto AccDepositOver;
  2439. if ((@tDeposit <= Zeny) && (@tBankAccZenyTemp <= @tMaxAccZeny)) goto AccDepositCont;
  2440. mes "^0072FF[Bank Manager]^000000";
  2441. mes "Sorry, for some weird reason I couldn't deposit your money.";
  2442. next;
  2443. goto AccMenu;
  2444. AccDepositCont:
  2445. set Zeny, Zeny - @tDeposit;
  2446. set vBankAccLastZeny, vBankAccZeny;
  2447. set vBankAccZeny, @tBankAccZenyTemp;
  2448. set vBankAccInterests, vBankAccInterests + @tDepositTax;
  2449. mes "^0072FF[Bank Manager]^000000";
  2450. mes "Transaction completed successfully.";
  2451. mes "^0000FF" + @tDeposit + "z^000000 substracted from your money (Taxes applied).";
  2452. mes "^0000FF" + @tDepositTotal + "z^000000 successfully added to your ^FF7F01Bank Account^000000.";
  2453. next;
  2454. goto AccMenu;
  2455. AccDepositOver:
  2456. mes "^0072FF[Bank Manager]^000000";
  2457. mes "There is a limit of ^0000FF" + @tMaxAccZeny + "z^000000 of how much zeny your ^FF7F01Bank Account^000000 can hold.";
  2458. mes "You can't deposit more than that, please try again.";
  2459. mes "Do you want to try again?";
  2460. next;
  2461. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  2462. AccDepositNotEnoughInput:
  2463. mes "^0072FF[Bank Manager]^000000";
  2464. mes "You need to put more money in order to make a deposit.";
  2465. mes "Do you want to try again?";
  2466. next;
  2467. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  2468. AccDepositNoInput:
  2469. mes "^0072FF[Bank Manager]^000000";
  2470. mes "You must enter a value higher than ^0000FF" + @tMinDeposit + "z^000000.";
  2471. mes "Do you want to try again?";
  2472. next;
  2473. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  2474. AccDepositNotEnoughZeny:
  2475. mes "^0072FF[Bank Manager]^000000";
  2476. mes "You don't have ^0000FF" + @tDepositTotal + "z^000000.";
  2477. mes "Remember that taxes are being applied.";
  2478. mes "Do you want to try again?";
  2479. next;
  2480. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  2481. AccWithdraw:
  2482. mes "^0072FF[Bank Manager]^000000";
  2483. mes "This is the only transaction I don't like... you figure out why...";
  2484. mes "You can't withdraw leaving less than ^0000FF" + @tMinZeny +"z^000000 in your ^FF7F01Bank Account^000000.";
  2485. mes "Your current balance is ^0000FF" + vBankAccZeny + "z^000000.";
  2486. mes "How much are you going to widthdraw?";
  2487. next;
  2488. AccWithdrawInput:
  2489. input @tWithdraw;
  2490. set @tZenyLeft, vBankAccZeny - @tWithdraw;
  2491. set @tZenyTemp, Zeny + @tWithdraw;
  2492. if (@tWithdraw == 0) goto AccWithdrawNoInput;
  2493. if (@tZenyLeft < @tMinZeny) goto AccWithdrawMinZeny;
  2494. if (@tZenyTemp > @tMaxZeny) goto AccWithDrawOverCharZeny;
  2495. set Zeny, Zeny + @tWithdraw;
  2496. set vBankAccLastZeny, vBankAccZeny;
  2497. set vBankAccZeny, vBankAccZeny - @tWithdraw;
  2498. mes "^0072FF[Bank Manager]^000000";
  2499. mes "Transaction completed successfully.";
  2500. mes "Thank you for using our services.";
  2501. next;
  2502. goto AccMenu;
  2503. AccWithdrawNoInput:
  2504. mes "^0072FF[Bank Manager]^000000";
  2505. mes "In order to withdraw from the bank, you must withdraw more than 0 zeny.";
  2506. mes "Do you want to try again?";
  2507. next;
  2508. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  2509. AccWithdrawMinZeny:
  2510. mes "^0072FF[Bank Manager]^000000";
  2511. mes "I'm sorry...";
  2512. mes "You can't withdraw ^0000FF" + @tWithdraw + "z^000000 because your ^FF7F01Bank Account^000000 must have ^0000FF" + @tMinZeny + "z^000000 left or more at all times.";
  2513. mes "In order to take all your money from the bank you must select Close Account in the Account Menu.";
  2514. mes "Do you want to try again?";
  2515. next;
  2516. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  2517. AccWithDrawOverCharZeny:
  2518. mes "^0072FF[Bank Manager]^000000";
  2519. mes "Sorry, but you can't withdraw ^0000FF" + @tWithdraw + "z^000000 because your Player can't carry more than ^0000FF" + @tMaxZeny + "z^000000.";
  2520. mes "Do you want to try again?";
  2521. next;
  2522. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  2523. AccBalance:
  2524. mes "^0072FF[Bank Manager]^000000";
  2525. mes "Account Status:";
  2526. //shown in blue if the same or more, show in red if less than previous balance
  2527. if (vBankAccZeny >= vBankAccLastZeny) goto AccBalance2;
  2528. mes "Current Balance: ^FF0000" + vBankAccZeny +"z^000000.";
  2529. goto AccBalance3;
  2530. AccBalance2:
  2531. mes "Current Balance: ^0000FF" + vBankAccZeny +"z^000000.";
  2532. goto AccBalance3;
  2533. AccBalance3:
  2534. mes "Previous Balance: ^0000FF" + vBankAccLastZeny +"z^000000.";
  2535. mes "Interest Rate: ^0000FF" + @tInterestRate + "%^000000.";
  2536. mes "Interests Payed: ^0000FF" + vBankAccInterests + "z^000000.";
  2537. next;
  2538. goto AccMenu;
  2539. AccClose:
  2540. mes "^0072FF[Bank Manager]^000000";
  2541. mes "If you close your ^FF7F01Bank Account^000000, it means you eliminate it.";
  2542. mes "Of course, you will get all your money back.";
  2543. mes "Are you sure you want to close your ^FF7F01Bank Account^000000?";
  2544. next;
  2545. menu "^FF7F01I don't want it anymore.^000000",AccCloseConfirm,"^FF7F01No, I'll keep it.^000000",AccCloseKeep;
  2546. AccCloseConfirm:
  2547. set vBankAccActive,0;
  2548. set Zeny, Zeny + vBankAccZeny;
  2549. set vBankAccZeny,0;
  2550. set vBankAccLastZeny,0;
  2551. set vBankAccInterests,0;
  2552. mes "^0072FF[Bank Manager]^000000";
  2553. mes "Thanks for using our services, we hope you come back to visit us.";
  2554. mes "Here's your money.";
  2555. next;
  2556. goto EndNPC;
  2557. AccCloseKeep:
  2558. mes "^0072FF[Bank Manager]^000000";
  2559. mes "Good choice, thanks for staying with us.";
  2560. next;
  2561. goto AccMenu;
  2562. EndNPC:
  2563. set @random,rand(4);
  2564. mes "^0072FF[Bank Manager]^000000";
  2565. if (@random == 0) mes "Have a nice day!";
  2566. if (@random == 1) mes "See you soon!";
  2567. if (@random == 2) mes "See you next time!";
  2568. if (@random == 3) mes "Come back soon!";
  2569. close;
  2570. }
  2571. um_in.gat,154,125,4 script Bank Manager 109,{
  2572. set @tInterestRate, 2; //no decimals
  2573. set @tMaxAccZeny, 1000000000; //max zeny allowed in ^FF7F01Bank Account^000000 1,000,000,000=1 billion
  2574. set @tMaxZeny, 1000000000; //max zeny that a player can carry
  2575. set @tMinZeny, 100; //min zeny allowed or Bank Account is closed
  2576. set @tCreateZeny, 500; //zeny needed in order to create a Bank Account
  2577. set @tMinDeposit,100; //min zeny to deposit
  2578. set @tBeginningZeny, 100; //amount of zeny in Bank Account after creating
  2579. mes "^0072FF[Bank Manager]^000000";
  2580. mes "Welcome to this office branch of Midgard's Bank.";
  2581. next;
  2582. if (vBankAccActive==1) goto AccMenu;
  2583. mes "^0072FF[Bank Manager]^000000";
  2584. mes "You don't have a ^FF7F01Bank Account^000000 yet, you must buy one.";
  2585. mes "It will cost you ^0000FF" + @tCreateZeny + "z^000000 to create it.";
  2586. next;
  2587. menu "^FF7F01Create Account.^000000",CreateAcc,"^FF7F01Information.^000000",BankInfo,"^FF7F01No thanks.^000000",NoCreateAcc;
  2588. BankInfo:
  2589. mes "^0072FF[Bank Manager]^000000";
  2590. mes "Here are some points that you need to know:";
  2591. mes "1. To create a ^FF7F01Bank Account^000000 you have to pay ^0000FF" + @tCreateZeny + "z^000000.";
  2592. mes "2. You will be charged ^0000FF" + @tInterestRate + " percent^000000 everytime you Deposit.";
  2593. mes "3. You must always have no less than ^0000FF" + @tMinZeny + "z^000000 on your ^FF7F01Bank Account^000000.";
  2594. next;
  2595. mes "4. You can save up to ^0000FF" + @tMaxAccZeny + "z^000000 in your bank account.";
  2596. mes "5. You will be able to access your ^FF7F01Bank Account^000000 in any town with a Bank Office.";
  2597. mes "6. You will start by having ^0000FF" + @tBeginningZeny + "z^000000 in your bank account.";
  2598. close;
  2599. CreateAcc:
  2600. mes "^0072FF[Bank Manager]^000000";
  2601. mes "First of all, you will have to have at least ^0000FF" + @tCreateZeny + "z^000000 with you.";
  2602. mes "Your account will start with ^0000FF" + @tBeginningZeny +"z^000000.";
  2603. mes "Are you sure you want to continue?";
  2604. next;
  2605. menu "^FF7F01Sure.^000000",CreateAccCont,"^FF7F01Nah, it's ok.^000000",NoCreateAcc;
  2606. CreateAccCont:
  2607. if (@tCreateZeny > Zeny) goto CreateAccNoEnoughZeny;
  2608. set Zeny, Zeny - @tCreateZeny;
  2609. set vBankAccActive,1;
  2610. set vBankAccZeny, @tBeginningZeny;
  2611. set vBankAccLastZeny, @tBeginningZeny;
  2612. set vBankAccInterests,0;
  2613. mes "^0072FF[Bank Manager]^000000";
  2614. mes "Congratulations, your ^FF7F01Bank Account^000000 is now created with ^0000FF" + vBankAccZeny + "z^000000.";
  2615. mes "You may now proceed to do any transactions.";
  2616. next;
  2617. goto AccMenu;
  2618. CreateAccNoEnoughZeny:
  2619. mes "^0072FF[Bank Manager]^000000";
  2620. mes "Didn't I tell you to make sure you had enough zeny?";
  2621. mes "You can't create it with just ^0000FF" + Zeny + "z^000000.";
  2622. mes "Come back when you get those ^0000FF" + @tCreateZeny + "z^000000...";
  2623. next;
  2624. goto EndNPC;
  2625. NoCreateAcc:
  2626. mes "^0072FF[Bank Manager]^000000";
  2627. mes "Come back when you change your mind!";
  2628. next;
  2629. goto EndNPC;
  2630. AccMenu:
  2631. mes "^0072FF[Bank Manager]^000000";
  2632. mes "Your current balance is ^0000FF" + vBankAccZeny +"z^000000.";
  2633. mes "What would you like to do now?";
  2634. next;
  2635. menu "^FF7F01Deposit.^000000",AccDeposit,"^FF7F01Withdraw.^000000",AccWithdraw,"^FF7F01Bank Account Info.^000000",AccBalance,"^FF7F01Close Bank Account^000000",AccClose,"^FF7F01Cancel.^000000",EndNPC;
  2636. AccDeposit:
  2637. mes "^0072FF[Bank Manager]^000000";
  2638. mes "It's always good to deposit every once in a while.";
  2639. mes "Be noticed that we charge a ^0000FF" + @tInterestRate + " percent ^000000 of interest rate in every deposit you make.";
  2640. mes "This means that to deposit ^0000FF100z^000000 you need to have pay us ^0000FF" + 100 * @tInterestRate / 100 + "z^000000.";
  2641. mes "How much are you willing to deposit?";
  2642. next;
  2643. AccDepositInput:
  2644. input @tDeposit;
  2645. set @tDepositTax, @tDeposit * @tInterestRate / 100;
  2646. set @tDepositTotal, @tDeposit - @tDepositTax;
  2647. if (@tDeposit <= 0) goto AccDepositNoInput;
  2648. if (@tDeposit < @tMinDeposit) goto AccDepositNotEnoughInput;
  2649. if (@tDepositTotal > Zeny) goto AccDepositNotEnoughZeny;
  2650. set @tBankAccZenyTemp, vBankAccZeny + @tDepositTotal;
  2651. if (@tBankAccZenyTemp > @tMaxAccZeny) goto AccDepositOver;
  2652. if ((@tDeposit <= Zeny) && (@tBankAccZenyTemp <= @tMaxAccZeny)) goto AccDepositCont;
  2653. mes "^0072FF[Bank Manager]^000000";
  2654. mes "Sorry, for some weird reason I couldn't deposit your money.";
  2655. next;
  2656. goto AccMenu;
  2657. AccDepositCont:
  2658. set Zeny, Zeny - @tDeposit;
  2659. set vBankAccLastZeny, vBankAccZeny;
  2660. set vBankAccZeny, @tBankAccZenyTemp;
  2661. set vBankAccInterests, vBankAccInterests + @tDepositTax;
  2662. mes "^0072FF[Bank Manager]^000000";
  2663. mes "Transaction completed successfully.";
  2664. mes "^0000FF" + @tDeposit + "z^000000 substracted from your money (Taxes applied).";
  2665. mes "^0000FF" + @tDepositTotal + "z^000000 successfully added to your ^FF7F01Bank Account^000000.";
  2666. next;
  2667. goto AccMenu;
  2668. AccDepositOver:
  2669. mes "^0072FF[Bank Manager]^000000";
  2670. mes "There is a limit of ^0000FF" + @tMaxAccZeny + "z^000000 of how much zeny your ^FF7F01Bank Account^000000 can hold.";
  2671. mes "You can't deposit more than that, please try again.";
  2672. mes "Do you want to try again?";
  2673. next;
  2674. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  2675. AccDepositNotEnoughInput:
  2676. mes "^0072FF[Bank Manager]^000000";
  2677. mes "You need to put more money in order to make a deposit.";
  2678. mes "Do you want to try again?";
  2679. next;
  2680. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  2681. AccDepositNoInput:
  2682. mes "^0072FF[Bank Manager]^000000";
  2683. mes "You must enter a value higher than ^0000FF" + @tMinDeposit + "z^000000.";
  2684. mes "Do you want to try again?";
  2685. next;
  2686. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  2687. AccDepositNotEnoughZeny:
  2688. mes "^0072FF[Bank Manager]^000000";
  2689. mes "You don't have ^0000FF" + @tDepositTotal + "z^000000.";
  2690. mes "Remember that taxes are being applied.";
  2691. mes "Do you want to try again?";
  2692. next;
  2693. menu "^FF7F01Yes, please.^000000",AccDepositInput,"^FF7F01No, thanks.^000000",AccMenu;
  2694. AccWithdraw:
  2695. mes "^0072FF[Bank Manager]^000000";
  2696. mes "This is the only transaction I don't like... you figure out why...";
  2697. mes "You can't withdraw leaving less than ^0000FF" + @tMinZeny +"z^000000 in your ^FF7F01Bank Account^000000.";
  2698. mes "Your current balance is ^0000FF" + vBankAccZeny + "z^000000.";
  2699. mes "How much are you going to widthdraw?";
  2700. next;
  2701. AccWithdrawInput:
  2702. input @tWithdraw;
  2703. set @tZenyLeft, vBankAccZeny - @tWithdraw;
  2704. set @tZenyTemp, Zeny + @tWithdraw;
  2705. if (@tWithdraw == 0) goto AccWithdrawNoInput;
  2706. if (@tZenyLeft < @tMinZeny) goto AccWithdrawMinZeny;
  2707. if (@tZenyTemp > @tMaxZeny) goto AccWithDrawOverCharZeny;
  2708. set Zeny, Zeny + @tWithdraw;
  2709. set vBankAccLastZeny, vBankAccZeny;
  2710. set vBankAccZeny, vBankAccZeny - @tWithdraw;
  2711. mes "^0072FF[Bank Manager]^000000";
  2712. mes "Transaction completed successfully.";
  2713. mes "Thank you for using our services.";
  2714. next;
  2715. goto AccMenu;
  2716. AccWithdrawNoInput:
  2717. mes "^0072FF[Bank Manager]^000000";
  2718. mes "In order to withdraw from the bank, you must withdraw more than 0 zeny.";
  2719. mes "Do you want to try again?";
  2720. next;
  2721. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  2722. AccWithdrawMinZeny:
  2723. mes "^0072FF[Bank Manager]^000000";
  2724. mes "I'm sorry...";
  2725. mes "You can't withdraw ^0000FF" + @tWithdraw + "z^000000 because your ^FF7F01Bank Account^000000 must have ^0000FF" + @tMinZeny + "z^000000 left or more at all times.";
  2726. mes "In order to take all your money from the bank you must select Close Account in the Account Menu.";
  2727. mes "Do you want to try again?";
  2728. next;
  2729. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  2730. AccWithDrawOverCharZeny:
  2731. mes "^0072FF[Bank Manager]^000000";
  2732. mes "Sorry, but you can't withdraw ^0000FF" + @tWithdraw + "z^000000 because your Player can't carry more than ^0000FF" + @tMaxZeny + "z^000000.";
  2733. mes "Do you want to try again?";
  2734. next;
  2735. menu "^FF7F01Yes, please.^000000",AccWithdrawInput,"^FF7F01No, thanks.^000000",AccMenu;
  2736. AccBalance:
  2737. mes "^0072FF[Bank Manager]^000000";
  2738. mes "Account Status:";
  2739. //shown in blue if the same or more, show in red if less than previous balance
  2740. if (vBankAccZeny >= vBankAccLastZeny) goto AccBalance2;
  2741. mes "Current Balance: ^FF0000" + vBankAccZeny +"z^000000.";
  2742. goto AccBalance3;
  2743. AccBalance2:
  2744. mes "Current Balance: ^0000FF" + vBankAccZeny +"z^000000.";
  2745. goto AccBalance3;
  2746. AccBalance3:
  2747. mes "Previous Balance: ^0000FF" + vBankAccLastZeny +"z^000000.";
  2748. mes "Interest Rate: ^0000FF" + @tInterestRate + "%^000000.";
  2749. mes "Interests Payed: ^0000FF" + vBankAccInterests + "z^000000.";
  2750. next;
  2751. goto AccMenu;
  2752. AccClose:
  2753. mes "^0072FF[Bank Manager]^000000";
  2754. mes "If you close your ^FF7F01Bank Account^000000, it means you eliminate it.";
  2755. mes "Of course, you will get all your money back.";
  2756. mes "Are you sure you want to close your ^FF7F01Bank Account^000000?";
  2757. next;
  2758. menu "^FF7F01I don't want it anymore.^000000",AccCloseConfirm,"^FF7F01No, I'll keep it.^000000",AccCloseKeep;
  2759. AccCloseConfirm:
  2760. set vBankAccActive,0;
  2761. set Zeny, Zeny + vBankAccZeny;
  2762. set vBankAccZeny,0;
  2763. set vBankAccLastZeny,0;
  2764. set vBankAccInterests,0;
  2765. mes "^0072FF[Bank Manager]^000000";
  2766. mes "Thanks for using our services, we hope you come back to visit us.";
  2767. mes "Here's your money.";
  2768. next;
  2769. goto EndNPC;
  2770. AccCloseKeep:
  2771. mes "^0072FF[Bank Manager]^000000";
  2772. mes "Good choice, thanks for staying with us.";
  2773. next;
  2774. goto AccMenu;
  2775. EndNPC:
  2776. set @random,rand(4);
  2777. mes "^0072FF[Bank Manager]^000000";
  2778. if (@random == 0) mes "Have a nice day!";
  2779. if (@random == 1) mes "See you soon!";
  2780. if (@random == 2) mes "See you next time!";
  2781. if (@random == 3) mes "Come back soon!";
  2782. close;
  2783. }