diff options
author | eaac <eaac@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-06-21 21:15:39 +0000 |
---|---|---|
committer | eaac <eaac@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-06-21 21:15:39 +0000 |
commit | 945b5710110eefaf9ddacbfac8f78b6556751015 (patch) | |
tree | 3d5010e39b5e7e67599cacb7ea0a1ba24b001b5f /npc/custom/eAAC_Scripts/banker.txt | |
parent | 904f0fd88b48db84db26f842f65ac9d2d7c110ea (diff) | |
download | hercules-945b5710110eefaf9ddacbfac8f78b6556751015.tar.gz hercules-945b5710110eefaf9ddacbfac8f78b6556751015.tar.bz2 hercules-945b5710110eefaf9ddacbfac8f78b6556751015.tar.xz hercules-945b5710110eefaf9ddacbfac8f78b6556751015.zip |
* Update to the eAAC Scripts (don't ask...). [eAAC]
*= Removed disguiser.txt as it seems to error, thus failing to comply with eAAC terms
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10801 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'npc/custom/eAAC_Scripts/banker.txt')
-rw-r--r-- | npc/custom/eAAC_Scripts/banker.txt | 642 |
1 files changed, 302 insertions, 340 deletions
diff --git a/npc/custom/eAAC_Scripts/banker.txt b/npc/custom/eAAC_Scripts/banker.txt index d0d29b1f1..8ed9cf87b 100644 --- a/npc/custom/eAAC_Scripts/banker.txt +++ b/npc/custom/eAAC_Scripts/banker.txt @@ -1,21 +1,20 @@ -//| ~~~~~~~~~~~ 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 | -//| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//| ~~~~~~~~~~~ Information ~~~~~~~~~~~~~ +//| | This is a simple banking npc, | +//| | 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 @@ -66,6 +65,11 @@ //| at the beginning of the Mix function, to prevent old values //| to be used as a payout. +//| Revision: +//| v.2.8.1 Removed the 'conflicting' switch with variables as case options, +//| and moved the color names to the function, so now it executes once. +//| Did other optimizations and cleanups all around the code. Meh. + //| Upcomming possible updates: //| v.3.0: Adding a refining system, so you can gather ore and the likes //| to make your own coins. They will have a failure chance @@ -73,97 +77,69 @@ //| coin you wish, a mini furnace, an anvil depending on what //| You're crafting, and a hammer according to it. -//| Copyright İ 2006 erKURITA. All Rights Reserved +//| Copyright İ 2006-2007 erKURITA. All Rights Reserved prontera,155,188,3 script Zacariath Madhat 872,{ -//|~~~~~~~~~ Settings of the NPC: ~~~~~~~~~~~~~~~~~ -set @npcname$,"^999999[Zach]^000000"; //| -set @bronzeprice,10000; //| -set @silverprice,100000; //| -set @goldprice,1000000; //| -set @mithrilprice,10000000; //| -set @bronzecoinid,673; //| -set @silvercoinid,677; //| -set @goldcoinid,671; //| -set @mithrilcoinid,674; //| -set @minvalue,@bronzeprice; //| -set @name1$,getitemname(@bronzecoinid); //| -set @name2$,getitemname(@silvercoinid); //| -set @name3$,getitemname(@goldcoinid); //| -set @name4$,getitemname(@mithrilcoinid); //| -set @MAX_ZENY,1000000000; //| -//|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -mes @npcname$; -mes "Hi "+strcharinfo(0)+", I'm this town's banker"; -mes "I can allow you to exchange your zeny into useful and handy coins, which you can use to make trades between players, or just save them"; -next; -mes @npcname$; -mes "^996600"+@name1$+"s^000000 are worth "+@bronzeprice+"z, ^999999"+@name2$+"s^000000 are worth "+@silverprice+"z, ^FFCC00"+@name3$+"s^000000 "+@goldprice+"z, ^CCCCCC"+@name4$+"s^000000 are worth "+@mithrilprice+"z"; -next; -goto L_Menu; - -L_Menu: -mes @npcname$; -mes "What do you want to do then?"; -menu "Exchange my coins into zeny",L_CoinZeny,"Exchange my zeny into coins",L_ZenyCoin,"Nothing for now, sorry",L_End; - -//| Here starts the Coin to Zeny Exchange - -L_CoinZeny: +//|~~~~~~~~~~~~~ Settings of the NPC: ~~~~~~~~~~~~~~~~~ + set @npcname$,"^999999[Zach]^000000"; //| + set @bronzeprice,10000; //| + set @silverprice,100000; //| + set @goldprice,1000000; //| + set @mithrilprice,10000000; //| + set @bronzecoinid,673; //| + set @silvercoinid,677; //| + set @goldcoinid,671; //| + set @mithrilcoinid,674; //| + set @minvalue,@bronzeprice; //| + set @name1$,getitemname(@bronzecoinid); //| + set @name2$,getitemname(@silvercoinid); //| + set @name3$,getitemname(@goldcoinid); //| + set @name4$,getitemname(@mithrilcoinid); //| + set @MAX_ZENY,1000000000; //| +//|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + mes @npcname$; + mes "Hi "+strcharinfo(0)+", I'm this town's banker"; + mes "I can allow you to exchange your zeny into useful and handy coins, which you can use to make trades between players, or just save them"; next; mes @npcname$; - mes "First than anything, what kind of coins are you going to exchange?"; - menu @name1$+"s",L_Bronze,@name2$+"s",L_Silver,@name3$+"s",L_Gold,@name4$+"s",L_Mithril,"None for now",L_Menu; - - - L_Bronze: - callsub L_Coincheckout,@bronzecoinid,@bronzeprice; - goto L_CoinZeny; - - L_Silver: - callsub L_Coincheckout,@silvercoinid,@silverprice; - goto L_CoinZeny; - - L_Gold: - callsub L_Coincheckout,@goldcoinid,@goldprice; - goto L_CoinZeny; - - L_Mithril: - callsub L_Coincheckout,@mithrilcoinid,@mithrilprice; - goto L_CoinZeny; - -L_Coincheckout: - -switch(getarg(0)) { - case @bronzecoinid: - set @coinname$,"^996600"+getitemname(getarg(0))+"^000000"; - break; - case @silvercoinid: - set @coinname$,"^999999"+getitemname(getarg(0))+"^000000"; - break; - case @goldcoinid: - set @coinname$,"^FFCC00"+getitemname(getarg(0))+"^000000"; - break; - case @mithrilcoinid: - set @coinname$,"^CCCCCC"+getitemname(getarg(0))+"^000000"; - break; - } - + mes "^996600"+@name1$+"s^000000 are worth "+@bronzeprice+"z, ^999999"+@name2$+"s^000000 are worth "+@silverprice+"z, ^FFCC00"+@name3$+"s^000000 "+@goldprice+"z, ^CCCCCC"+@name4$+"s^000000 are worth "+@mithrilprice+"z"; + next; + goto L_Menu; -L_PreInputing: -next; + L_Menu: mes @npcname$; - mes "Let's see, how many coins do you want to exchange?"; - next; - goto L_Inputing; + mes "What do you want to do then?"; + menu "Exchange my coins into zeny",-,"Exchange my zeny into coins",L_ZenyCoin,"Nothing for now, sorry",L_End; +//| Here starts the Coin to Zeny Exchange + L_CoinZeny: + next; + mes @npcname$; + mes "First than anything, what kind of coins are you going to exchange?"; + menu @name1$+"s",L_Bronze,@name2$+"s",L_Silver,@name3$+"s",L_Gold,@name4$+"s",L_Mithril,"None for now",L_Menu; + L_Bronze: + callsub L_Coincheckout,@bronzecoinid,@bronzeprice,"^996600"; + goto L_CoinZeny; + L_Silver: + callsub L_Coincheckout,@silvercoinid,@silverprice,"^999999"; + goto L_CoinZeny; + L_Gold: + callsub L_Coincheckout,@goldcoinid,@goldprice,"^FFCC00"; + goto L_CoinZeny; + L_Mithril: + callsub L_Coincheckout,@mithrilcoinid,@mithrilprice,"^CCCCCC"; + goto L_CoinZeny; + L_Coincheckout: + set @coinname$,getarg(2)+getitemname(getarg(0))+"^000000"; + next; + mes @npcname$; + mes "Let's see, how many coins do you want to exchange?"; + next; L_Inputing: input @coinamount; - - if (@coinamount == 0) { + if (@coinamount <= 0) { mes @npcname$; mes "You didn't input any amount, please retry"; next; @@ -177,15 +153,12 @@ next; mes @npcname$; mes "I'm sorry, the quantity you inputted gives a bigger zeny amount than the max allowed. I can't allow this."; next; - goto L_Menu - } else - + goto L_Menu; + } next; mes @npcname$; mes "So, you want to exchange "+@coinamount+" "+@coinname$+" ?"; - menu "Yes, I want to exchange this much",L_Proceed,"No, I want to exchange something else",L_CoinZeny,"No, I want to input another number",L_Inputing,"No, I don't want to exchange anything",L_Menu; - - L_Proceed: + menu "Yes, I want to exchange this much",-,"No, I want to exchange something else",L_CoinZeny,"No, I want to input another number",L_Inputing,"No, I dont want to exchange anything",L_Menu; next; set @price,getarg(1)*@coinamount; set Zeny,Zeny+@price; @@ -197,265 +170,254 @@ next; //| Here starts the Zeny to Coin exchange. -L_ZenyCoin: - next; - if (MaxWeight*50/100 < Weight) { - if (MaxWeight*90/100 < Weight) { + L_ZenyCoin: + next; + if (MaxWeight*50/100 < Weight) { + if (MaxWeight*90/100 < Weight) { + mes @npcname$; + mes "Sorry but you have more than 90% weight. Your coins might drop. I can't give you anything."; + next; + goto L_Menu; + } mes @npcname$; - mes "Sorry but you have more than 90% weight. Your coins might drop. I can't give you anything."; - next; - goto L_Menu; - } else + mes "You have 50% or more weight, do you still want to continue?"; + menu "Yes",L_ContinueZenyCoin,"No, thanks",L_Menu; + } + L_ContinueZenyCoin: mes @npcname$; - mes "You have 50% or more weight, do you still want to continue?"; - menu "Yes",L_ContinueZenyCoin,"No, thanks",L_Menu; - } -L_ContinueZenyCoin: - mes @npcname$; - mes "First, how much zeny do you want to exchange"; - callsub L_Inputingzeny; - callsub L_Zenycoins; - next; - mes @npcname$; - mes "You can have, with "+@zenyamount+":"; - mes "^996600"+@bronzezeny+"^000000 "+@name1$+"s"; - mes "^999999"+@silverzeny+"^000000 "+@name2$+"s"; - mes "^FFCC00"+@goldzeny+"^000000 "+@name3$+"s"; - mes "or"; - mes "^CCCCCC"+@mithrilzeny+"^000000 "+@name4$+"s"; - next; - if (@zenyamount < @minvalue) goto L_Moremoney; - goto L_ZenyCoin2; - - L_ZenyCoin2: + mes "First, how much zeny do you want to exchange"; + callsub L_Inputingzeny; + set @bronzezeny,@zenyamount/@bronzeprice; + set @silverzeny,@zenyamount/@silverprice; + set @goldzeny,@zenyamount/@goldprice; + set @mithrilzeny,@zenyamount/@mithrilprice; + next; mes @npcname$; - mes "Which coins do you want? Or do you want a mix of them?"; - menu "I want the "+@name1$+"s",L_Bronzes,"I want the "+@name2$+"s",L_Silvers,"I want the "+@name3$+"s",L_Golds,"I want the "+@name4$+"s",L_Mithrils,"I want a mix of them",L_Mix,"Nothing for now, sorry",L_Menu; + mes "You can have, with "+@zenyamount+":"; + mes "^996600"+@bronzezeny+"^000000 "+@name1$+"s"; + mes "^999999"+@silverzeny+"^000000 "+@name2$+"s"; + mes "^FFCC00"+@goldzeny+"^000000 "+@name3$+"s"; + mes "or"; + mes "^CCCCCC"+@mithrilzeny+"^000000 "+@name4$+"s"; + next; + if (@zenyamount < @minvalue) goto L_Moremoney; + goto L_ZenyCoin2; - L_Bronzes: + L_ZenyCoin2: + mes @npcname$; + mes "Which coins do you want? Or do you want a mix of them?"; + menu "I want the "+@name1$+"s",-,"I want the "+@name2$+"s",L_Silvers,"I want the "+@name3$+"s",L_Golds,"I want the "+@name4$+"s",L_Mithrils,"I want a mix of them",L_Mix,"Nothing for now, sorry",L_Menu; if (@bronzezeny == 0) goto L_Moremoney; callsub L_Zenycheckout,@bronzecoinid,@bronzeprice,@bronzezeny; goto L_Menu; - L_Silvers: - if (@silverzeny == 0) goto L_Moremoney; - callsub L_Zenycheckout,@silvercoinid,@silverprice,@silverzeny; - goto L_Menu; + L_Silvers: + if (@silverzeny == 0) goto L_Moremoney; + callsub L_Zenycheckout,@silvercoinid,@silverprice,@silverzeny; + goto L_Menu; - L_Golds: - if (@goldzeny == 0) goto L_Moremoney; - callsub L_Zenycheckout,@goldcoinid,@goldprice,@goldzeny; - goto L_Menu; + L_Golds: + if (@goldzeny == 0) goto L_Moremoney; + callsub L_Zenycheckout,@goldcoinid,@goldprice,@goldzeny; + goto L_Menu; - L_Mithrils: - if (@mithrilzeny == 0) goto L_Moremoney; - callsub L_Zenycheckout,@mithrilcoinid,@mithrilprice,@mithrilzeny; - goto L_Menu; + L_Mithrils: + if (@mithrilzeny == 0) goto L_Moremoney; + callsub L_Zenycheckout,@mithrilcoinid,@mithrilprice,@mithrilzeny; + goto L_Menu; -L_Zenycheckout: - next; - if (((getiteminfo(getarg(0),6))*getarg(2)) > (MaxWeight-Weight)) { - mes @npcname$; - mes "Sorry, your max weight does not allow me to give you this much of zeny coins"; - mes "Either choose another type of coins or a lower quantity, thanks"; - close; - } - if (getarg(2) > 30000) { + L_Zenycheckout: + next; + if (((getiteminfo(getarg(0),6))*getarg(2)) > (MaxWeight-Weight)) { + mes @npcname$; + mes "Sorry, your max weight does not allow me to give you this much of zeny coins"; + mes "Either choose another type of coins or a lower quantity, thanks"; + close; + } + if (getarg(2) > 30000) { + mes @npcname$; + mes "Sorry, I can't give you more than 30,000 ea"; + mes "Pick another coin type"; + close; + } + set @itemid,getarg(0); + set @pricea,getarg(1)*getarg(2); + getitem @itemid,getarg(2); + set Zeny,Zeny-@pricea; mes @npcname$; - mes "Sorry, I can't give you more than 30,000 ea"; - mes "Pick another coin type"; - close; - } - set @itemid,getarg(0); - set @pricea,getarg(1)*getarg(2); - getitem @itemid,getarg(2); - set Zeny,Zeny-@pricea; - mes @npcname$; - mes "There you go, here's your coins"; - next; - return; - -L_Zenycoins: - set @bronzezeny,@zenyamount/@bronzeprice; - set @silverzeny,@zenyamount/@silverprice; - set @goldzeny,@zenyamount/@goldprice; - set @mithrilzeny,@zenyamount/@mithrilprice; - return; - -L_Inputingzeny: + mes "There you go, here's your coins"; + next; + return; + L_Inputingzeny: + input @zenyamount; + if (Zeny == 0) { + mes @npcname$; + mes "You don't have any Zeny left. I can't do anything. Get some Zeny first"; + next; + goto L_Menu; + } else if (@zenyamount <= 0) { + mes @npcname$; + mes "You didn't input any amount, please retry"; + next; + goto L_Inputingzeny; + } else if (@zenyamount > 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; - input @zenyamount; - if (Zeny == 0) { +//| Mix function + L_Mix: + set @totalzeny,0; + set @totalcoins,0; + set @bronzecoins,0; + set @silvercoins,0; + set @goldcoins,0; + set @mithrilcoins,0; + next; mes @npcname$; - mes "You don't have any Zeny left. I can't do anything. Get some Zeny first"; + mes "Ok, let's start with ^996600"+@name1$+"s^000000"; next; - goto L_Menu; - } else if (@zenyamount == 0) { mes @npcname$; - mes "You didn't input any amount, please retry"; + mes "How many coins do you want?"; + input @bronzecoins; next; - goto L_Inputingzeny; - } else if (@zenyamount > Zeny) { + 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 || @totalzeny < 0) { + mes "TOTAL Zeny: "+@totalcoins+" - ^CC0000"+@totalzeny+"^000000"; + mes "Zeny Left: "+(@zenyamount-@totalzeny); + goto L_Overzeny; + } + mes "TOTAL Zeny: "+@totalcoins+" ^00CC00"+@totalzeny+"^000000"; + mes "Zeny Left: "+(@zenyamount-@totalzeny); + next; + if (@totalzeny > @zenyamount || @totalzeny < 0) goto L_Overzeny; mes @npcname$; - mes "The inputted zeny amount is bigger than your actual zeny amount"; - mes "Please re-entry another amount"; + mes "Is this enough or do you want more?"; + menu "It's enough, thanks",L_Payoff,"No, I want some more",-; 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: - set @totalzeny,0; - set @totalcoins,0; - set @bronzecoins,0; - set @silvercoins,0; - set @goldcoins,0; - set @mithrilcoins,0; - 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 || @totalzeny < 0) { - mes "TOTAL Zeny: "+@totalcoins+" - ^CC0000"+@totalzeny+"^000000"; + mes @npcname$; + mes "Now ^999999"+@name2$+"s^000000. How many coins do you want?"; + next; + input @silvercoins; + next; + set @totalzeny,@totalzeny+@silvercoins*@silverprice; + set @totalcoins,@totalcoins+@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 || @totalzeny < 0) { + mes "TOTAL Zeny: "+@totalcoins+" - ^CC0000"+@totalzeny+"^000000"; + mes "Zeny Left: "+(@zenyamount-@totalzeny); + goto L_Overzeny; + } + mes "TOTAL Zeny: "+@totalcoins+" ^00CC00"+@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 || @totalzeny < 0) - 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 || @totalzeny < 0) { - mes "TOTAL Zeny: "+@totalcoins+" - ^CC0000"+@totalzeny+"^000000"; + next; + if (@totalzeny > @zenyamount || @totalzeny < 0) 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,@totalzeny+@goldcoins*@goldprice; + set @totalcoins,@totalcoins+@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 || @totalzeny < 0) { + mes "TOTAL Zeny: "+@totalcoins+" - ^CC0000"+@totalzeny+"^000000"; + mes "Zeny Left: "+(@zenyamount-@totalzeny); + goto L_Overzeny; + } + mes "TOTAL Zeny: "+@totalcoins+" ^00CC00"+@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 || @totalzeny < 0) 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 || @totalzeny < 0) { - mes "TOTAL Zeny: "+@totalcoins+" - ^CC0000"+@totalzeny+"^000000"; + next; + if (@totalzeny > @zenyamount || @totalzeny < 0) 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,@totalzeny+@mithrilcoins*@mithrilprice; + set @totalcoins,@totalcoins+@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 || @totalzeny < 0) { + mes "TOTAL Zeny: "+@totalcoins+" - ^CC0000"+@totalzeny+"^000000"; + mes "Zeny Left: "+(@zenyamount-@totalzeny); + goto L_Overzeny; + } + mes "TOTAL: "+@totalcoins+" ^00CC00"+@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 || @totalzeny < 0) 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 || @totalzeny < 0) { - 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 || @totalzeny < 0) 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 don't want anything",L_Menu; + next; + if (@totalzeny > @zenyamount || @totalzeny < 0) 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",-,"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_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; + 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; +//| 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; + + OnInit: + setitemscript 671,"{}"; + end; }
\ No newline at end of file |