From 1f708096369b1447e4b970ab6cfb497e8317fce6 Mon Sep 17 00:00:00 2001 From: eaac Date: Mon, 27 Nov 2006 18:20:15 +0000 Subject: - Updating Thanatos quest with a check to prevent multiple Thanatos spawning. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9329 54d463be-8e91-2dee-dedb-b68131a5f0ec --- npc/custom/eAAC_Scripts/banker.txt | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) (limited to 'npc/custom/eAAC_Scripts') diff --git a/npc/custom/eAAC_Scripts/banker.txt b/npc/custom/eAAC_Scripts/banker.txt index 6e3460d75..7e0ac7584 100644 --- a/npc/custom/eAAC_Scripts/banker.txt +++ b/npc/custom/eAAC_Scripts/banker.txt @@ -53,12 +53,18 @@ //| to the ground because A) Too many coins (more than 30,000 ea) //| B) Your current weight + total coins weight were greater than //| your max weight, causing them to drop due to "over-weight". -//| Thanks to Niktout for spotting it. +//| Thanks to Niktout for spotting it. //| Revision: //| v.2.7: Added a check to the Zeny -> Coin Mix label. It seems you -//| can trade with negative zeny (meh...). This should prevent it. -//| Thanks to Niktout. +//| can trade with negative zeny (meh...). This should prevent it. +//| Thanks to Niktout. + +//| Revision: +//| v.2.8: Added a n00b check for the Zeny -> Coin function. Should +//| prevent zeny overflow. Also added a variable cleaning section +//| at the beginning of the Mix function, to prevent old values +//| to be used as a payout. //| Upcomming possible updates: //| v.3.0: Adding a refining system, so you can gather ore and the likes @@ -86,6 +92,7 @@ set @name1$,getitemname(@bronzecoinid); //| set @name2$,getitemname(@silvercoinid); //| set @name3$,getitemname(@goldcoinid); //| set @name4$,getitemname(@mithrilcoinid); //| +set @MAX_ZENY,1000000000; //| //|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mes @npcname$; @@ -133,16 +140,16 @@ L_Coincheckout: switch(getarg(0)) { case @bronzecoinid: set @coinname$,"^996600"+getitemname(getarg(0))+"^000000"; - goto L_PreInputing; + break; case @silvercoinid: set @coinname$,"^999999"+getitemname(getarg(0))+"^000000"; - goto L_PreInputing; + break; case @goldcoinid: set @coinname$,"^FFCC00"+getitemname(getarg(0))+"^000000"; - goto L_PreInputing; + break; case @mithrilcoinid: set @coinname$,"^CCCCCC"+getitemname(getarg(0))+"^000000"; - goto L_PreInputing; + break; } @@ -166,6 +173,11 @@ next; mes "You don't have enough coins, please get some"; next; goto L_Menu; + } else if (@coinamount*getarg(1) > @MAX_ZENY) { + 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 next; @@ -310,6 +322,12 @@ L_End: //| 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"; -- cgit v1.2.3-70-g09d2