Removed loop from milk trader and added extra input exploit safeguard. Disabled clothes dye for male assassins.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/athena@220 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
kobra_k88
2004-11-16 17:55:11 +00:00
parent ec5d1d3b62
commit 89e985ad13
3 changed files with 45 additions and 42 deletions

View File

@@ -40,6 +40,8 @@ Date Added
exploit safeguards. Used Lupus's "loopless" technique.
- juice_maker.txt: Added subfunction for juice making. Also changed amount of
fruit needed to 1.
- milk_trader.txt: Used Lupus's "loopless" technique. Added input exploit safegaurd.
- clothes_dyer.txt: Disabled dye for male Assassins.
- xmas.txt: Corrected some typos. [kobra_k88]
* - Removed Empty Bottle from amatsu shops to prevent exploits.
- Fixed Npc Position on Lutie( warper.txt and warper2.txt). [shadow]

View File

@@ -47,6 +47,7 @@ M_Menu:
L_Dye:
mes "[Dyer Ginedin Rephere]";
if(Class==0) goto sL_Novice;
if(Class==12) goto L_Assassin_M;
mes "Oh... you need my work? Well... okay sounds good.";
next;
mes "[Dyer Ginedin Rephere]";
@@ -70,7 +71,7 @@ Male_dye:
if(Class==8 || Class==15) goto L_Priest_Monk_M;
if(Class==9 || Class==11 || Class==19 || Class==23) goto L_Wiz_Hunt_Bard_SN_M;
if(Class==10 || Class==18) goto L_BlackSmith_Alchemist_M;
if(Class==12) goto L_Assassin_M;
// if(Class==12) goto L_Assassin_M;
if(Class==17) goto L_Rogue_M;
//1 Class
@@ -125,11 +126,13 @@ Male_dye:
set @black, 4;
menu "- Red",L_Dye_Red,"- Green",L_Dye_Green,"- White",L_Dye_White,"- Black",L_Dye_Black,"- Cancel",L_End;
L_Assassin_M:
set @blue, 1;
set @red, 2;
set @green, 3;
set @black, 4;
menu "- Red",L_Dye_Red,"- Blue",L_Dye_Blue,"- Green",L_Dye_Green,"- Black",L_Dye_Black,"- Cancel",L_End;
mes "I'm am sorry but I currently cannot dye male Assassin clothing.";
close;
// set @blue, 1;
// set @red, 2;
// set @green, 3;
// set @black, 4;
// menu "- Red",L_Dye_Red,"- Blue",L_Dye_Blue,"- Green",L_Dye_Green,"- Black",L_Dye_Black,"- Cancel",L_End;
L_Rogue_M:
set @red, 2;
set @green, 3;
@@ -310,12 +313,13 @@ L_Dye_Yellow:
L_PriceList:
mes "[Dyer Ginedin Rephere]";
mes "Here is the list of colors you can choose from and their prices:";
mes " - Red: 10000 zeny, 1 Scarlet Dyestuff";
mes " - Yellow: 10000 zeny, 1 Lemon Dyestuff";
mes " - Violet: 10000 zeny, 1 Violet Dyestuff";
mes " - Orange: 10000 zeny, 1 Orange Dyestuff";
mes " - Blue: 10000 zeny, 1 CobaltBlue Dyestuff";
mes " - Green: 10000 zeny, 1 DarkGreen Dyestuff";
mes " ";
mes " - ^FF4422Red^000000: 10000 zeny, 1 Scarlet Dyestuff";
mes " - ^D5A500Yellow^000000: 10000 zeny, 1 Lemon Dyestuff";
mes " - ^AA00AAViolet^000000: 10000 zeny, 1 Violet Dyestuff";
mes " - ^FF8800Orange^000000: 10000 zeny, 1 Orange Dyestuff";
mes " - ^4422FFBlue^000000: 10000 zeny, 1 CobaltBlue Dyestuff";
mes " - ^009500Green^000000: 10000 zeny, 1 DarkGreen Dyestuff";
goto M_Menu;
L_End:

View File

@@ -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;
}