diff options
author | kobra_k88 <kobra_k88@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-16 17:55:11 +0000 |
---|---|---|
committer | kobra_k88 <kobra_k88@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-16 17:55:11 +0000 |
commit | fdd80e74dfdf00ba00f3edd1cf8b32ba25c00109 (patch) | |
tree | 5cf4b10595677faf29af9a3eacb170633bd09c03 /npc/merchants/milk_trader.txt | |
parent | 6f80256e134557926c16ef1fcb89df4bebb4e7fe (diff) | |
download | hercules-fdd80e74dfdf00ba00f3edd1cf8b32ba25c00109.tar.gz hercules-fdd80e74dfdf00ba00f3edd1cf8b32ba25c00109.tar.bz2 hercules-fdd80e74dfdf00ba00f3edd1cf8b32ba25c00109.tar.xz hercules-fdd80e74dfdf00ba00f3edd1cf8b32ba25c00109.zip |
Removed loop from milk trader and added extra input exploit safeguard. Disabled clothes dye for male assassins.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@220 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'npc/merchants/milk_trader.txt')
-rw-r--r-- | npc/merchants/milk_trader.txt | 57 |
1 files changed, 27 insertions, 30 deletions
diff --git a/npc/merchants/milk_trader.txt b/npc/merchants/milk_trader.txt index b8d66c46d..1891d8cf4 100644 --- a/npc/merchants/milk_trader.txt +++ b/npc/merchants/milk_trader.txt @@ -1,20 +1,19 @@ -//===== eAthena Script ======================================= +//===== eAthena Script ======================================= //= Milk Trader -//===== By: ================================================== +//===== By: ================================================== //= kobra_k88 -//===== Current Version: ===================================== -//= 1.1 -//===== Compatible With: ===================================== +//===== Current Version: ===================================== +//= 1.2a +//===== Compatible With: ===================================== //= eAthena 7.15 + -//===== Description: ========================================= +//===== Description: ========================================= //= trades bottles for milk -//===== Additional Comments: ================================= +//===== Additional Comments: ================================= //= Fully working //= 1.1 Negative input bug fixed [Lupus] //= 1.2 Raised the price to close zeny exploit [Lupus] -//============================================================ - - +//= 1.2a Switched to Lupus's "loopless" technique.[kobra_k88] +//============================================================ // Milk Trader ------------------------------------------------------------- @@ -22,29 +21,27 @@ prontera.gat,71,131,7 script Milk Trader 86,{ mes "[Milk Trader]"; mes "If you bring me an empty bottle and 20 Zeny, I will exchange it for 1 bottle of milk."; next; - menu "-Exchange all empty bottles",M_0, "-Let me set the amount.",M_1, "-Cancel",M_End; + menu "-Exchange as many as possible.",M_0, "-Let me set the amount.",M_1, "-Cancel",M_End; M_0: - if(countitem(713) < 1) goto L_NoBottle; - if(Zeny < 20) goto L_NoZeny; - - sL_GetMilk: - if(countitem(713)<1 || Zeny<20) goto M_End; - getitem 519,1; - delitem 713,1; - set Zeny, Zeny - 20; - goto sL_GetMilk; + set @amount, 1000; + if(zeny/20 < @amount) set @amount, zeny/20; + if(countitem(713) < @amount) set @amount, countitem(713); + if(@amount > 0) goto L_Milk; + mes "[Milk Trader]"; + mes "..... Are you trying to make a fool of me.... ?"; + close; M_1: - set @INPUT,0; - input @INPUT; - if(@INPUT < 1 || @INPUT > 100) goto M_End; - if(countitem(713) < @INPUT) goto L_NoBottle; - if(Zeny < (@INPUT*20)) goto L_NoZeny; - getitem 519, @INPUT; - delitem 713, @INPUT; - set Zeny, Zeny - (@INPUT*20); - goto M_End; + input @amount; + if(@amount < 1 || @amount > 1000) goto M_End; + if(countitem(713) < @amount) goto L_NoBottle; + if(zeny < (@amount*20)) goto L_NoZeny; + + L_Milk: + getitem 519, @amount; + delitem 713, @amount; + set zeny, zeny - (@amount*20); M_End: mes "[Milk Trader]"; @@ -59,6 +56,6 @@ prontera.gat,71,131,7 script Milk Trader 86,{ L_NoZeny: mes "[Milk Trader]"; - mes "You need more money."; + mes "You need more zeny."; close; } |