//| ~~~~~~~~~~~ Information ~~~~~~~~~~~ //| | This is a simple banking npc, | //| | which uses coins to store zeny | //| | instead of using those global | //| | variables :P | //| | | //| | It's fully customizable, you | //| | can exchange the coin ID used | //| | at will, it won't affect the | //| | script whatsoever =3 | //| | | //| | The prices can also be set, the | //| | way you like the most, as they | //| | won't affect the script either | //| | | //| | No db/client files modification | //| | needed, just "Plug&Play" ;P | //| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //| Revision: //| v.1.0: Released script. No problems or bugs found, at least :P //| It's your duty to find them now if there are. //| @minvalue must contain the coin price of the lowest coin value //| in order for the script to work correctly. By default it's set //| to the bronze coin //| Revision: //| v.2.0: Added a Mix option in the Zeny to Coin function, //| where it allows you to split your desired Zeny into //| the coins you wish to obtain, without having to go //| through the other functions to obtain them all. That way //| you can get them all at once ;3 //| //| It also displays the total zeny being exchanged, //| the total coins obtained and the difference between //| the amount of zeny you've inputted and the sum of //| the coin's values. //| Revision: //| v.2.5: Replaced all the coin names with a variable that has //| getitemname( Zeny) { mes @npcname$; mes "The inputted zeny amount is bigger than your actual zeny amount"; mes "Please re-entry another amount"; next; goto L_Inputingzeny; } else return; //| Other labels L_Moremoney: mes @npcname$; mes "You need to get more zeny, I can't give you anything with "+@zenyamount+"z, sorry"; next; goto L_Menu; L_End: next; mes @npcname$; mes "Good to see you and hope to see you again. Bye"; close; //| Mix function L_Mix: next; mes @npcname$; mes "Ok, let's start with ^996600"+@name1$+"s^000000"; next; mes @npcname$; mes "How many coins do you want?"; input @bronzecoins; next; set @totalzeny,@bronzecoins*@bronzeprice; set @totalcoins,@bronzecoins; mes "Zeny Amount Inputted: ^000066"+@zenyamount+"^000000"; mes "Coins:"; mes " ^996600"+@name1$+"s^000000: "+@bronzecoins+" ^CC0000"+@bronzecoins*@bronzeprice+"^000000"; mes "ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ"; if (@totalzeny > @zenyamount) { mes "TOTAL Zeny: "+@totalcoins+" - ^CC0000"+@totalzeny+"^000000"; mes "Zeny Left: "+(@zenyamount-@totalzeny); goto L_Overzeny; } else mes "TOTAL Zeny: "+@totalcoins+" ^00CC00"+@totalzeny+"^000000"; mes "Zeny Left: "+(@zenyamount-@totalzeny); next; if (@totalzeny > @zenyamount) mes @npcname$; mes "Is this enough or do you want more?"; menu "It's enough, thanks",L_Payoff,"No, I want some more",-; next; mes @npcname$; mes "Now ^999999"+@name2$+"s^000000. How many coins do you want?"; next; input @silvercoins; next; set @totalzeny,@bronzecoins*@bronzeprice+@silvercoins*@silverprice; set @totalcoins,@bronzecoins+@silvercoins; mes "Zeny Amount Inputted: ^000066"+@zenyamount+"^000000"; mes "Coins:"; mes " ^996600"+@name1$+"s^000000: "+@bronzecoins+" ^CC0000"+@bronzecoins*@bronzeprice+"^000000"; mes " ^999999"+@name2$+"s^000000: "+@silvercoins+" ^CC0000"+@silvercoins*@silverprice+"^000000"; mes "ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ"; if (@totalzeny > @zenyamount) { mes "TOTAL Zeny: "+@totalcoins+" - ^CC0000"+@totalzeny+"^000000"; mes "Zeny Left: "+(@zenyamount-@totalzeny); goto L_Overzeny; } else mes "TOTAL Zeny: "+@totalcoins+" ^00CC00"+@totalzeny+"^000000"; mes "Zeny Left: "+(@zenyamount-@totalzeny); next; if (@totalzeny > @zenyamount) goto L_Overzeny; mes @npcname$; mes "Is this enough or do you want more?"; menu "It's enough, thanks",L_Payoff,"No, I want some more",-; next; mes @npcname$; mes "Now ^FFCC00"+@name3$+"s^000000. How many coins do you want?"; input @goldcoins; next; set @totalzeny,@bronzecoins*@bronzeprice+@silvercoins*@silverprice+@goldcoins*@goldprice; set @totalcoins,@bronzecoins+@silvercoins+@goldcoins; mes "Zeny Amount Inputted: ^000066"+@zenyamount+"^000000"; mes "Coins:"; mes " ^996600"+@name1$+"s^000000: "+@bronzecoins+" ^CC0000"+@bronzecoins*@bronzeprice+"^000000"; mes " ^999999"+@name2$+"s^000000: "+@silvercoins+" ^CC0000"+@silvercoins*@silverprice+"^000000"; mes " ^FFCC00"+@name3$+"s^000000: "+@goldcoins+" ^CC0000"+@goldcoins*@goldprice+"^000000"; mes "ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ"; if (@totalzeny > @zenyamount) { mes "TOTAL Zeny: "+@totalcoins+" - ^CC0000"+@totalzeny+"^000000"; mes "Zeny Left: "+(@zenyamount-@totalzeny); goto L_Overzeny; } else mes "TOTAL Zeny: "+@totalcoins+" ^00CC00"+@totalzeny+"^000000"; mes "Zeny Left: "+(@zenyamount-@totalzeny); next; if (@totalzeny > @zenyamount) goto L_Overzeny; mes @npcname$; mes "Is this enough or do you want more?"; menu "It's enough, thanks",L_Payoff,"No, I want some more",-; next; mes @npcname$; mes "Now ^CCCCCC"+@name4$+"s^000000. How many coins do you want?"; input @mithrilcoins; next; set @totalzeny,@bronzecoins*@bronzeprice+@silvercoins*@silverprice+@goldcoins*@goldprice+@mithrilcoins*@mithrilprice; set @totalcoins,@bronzecoins+@silvercoins+@goldcoins+@mithrilcoins; mes "Zeny Amount Inputted: ^000066"+@zenyamount+"^000000"; mes "Coins:"; mes " ^996600"+@name1$+"s^000000: "+@bronzecoins+" ^CC0000"+@bronzecoins*@bronzeprice+"^000000"; mes " ^999999"+@name2$+"s^000000: "+@silvercoins+" ^CC0000"+@silvercoins*@silverprice+"^000000"; mes " ^FFCC00"+@name3$+"s^000000: "+@goldcoins+" ^CC0000"+@goldcoins*@goldprice+"^000000"; mes " ^CCCCCC"+@name4$+"s^000000: "+@mithrilcoins+" ^CC0000"+@mithrilcoins*@mithrilprice+"^000000"; mes "ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ"; if (@totalzeny > @zenyamount) { mes "TOTAL Zeny: "+@totalcoins+" - ^CC0000"+@totalzeny+"^000000"; mes "Zeny Left: "+(@zenyamount-@totalzeny); goto L_Overzeny; } else mes "TOTAL: "+@totalcoins+" ^00CC00"+@totalzeny+"^000000"; mes "Zeny Left: "+(@zenyamount-@totalzeny); next; if (@totalzeny > @zenyamount) goto L_Overzeny; mes @npcname$; mes "Is this ok?: "+@bronzecoins+" "+@name1$+"s, "+@silvercoins+" "+@name2$+"s, "+@goldcoins+" "+@name3$+"s, "+@mithrilcoins+" "+@name4$+"s, for a total amount of "+@totalzeny; menu "Yes, it's ok",L_Payoff,"No, I want to re-intro them",L_Mix,"Sorry, I dont want anything",L_Menu; L_Payoff: next; if (@zenyamount > Zeny) goto L_Overzeny; set Zeny,Zeny-@totalzeny; getitem @bronzecoinid,@bronzecoins; getitem @silvercoinid,@silvercoins; getitem @goldcoinid,@goldcoins; getitem @mithrilcoinid,@mithrilcoins; mes @npcname$; mes "There you go, here's your coins"; next; set @bronzecoins,0; set @silvercoins,0; set @goldcoins,0; set @mithrilcoins,0; goto L_End; L_Overzeny: next; mes @npcname$; mes "Sorry, I can't do anything else. Either the sum of all the coins you inputted is bigger than the zeny amount inputted, or the inputted amout of zeny is bigger that your total Zeny. Please retry."; next; goto L_Menu; OnInit: setitemscript 671,"{}"; end; }