Updated Alchemist Guild Dealer.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12259 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
L0ne_W0lf 2008-02-28 06:03:41 +00:00
parent a554d00483
commit 43afd3ea58
2 changed files with 139 additions and 104 deletions

View File

@ -1,6 +1,7 @@
Date Added Date Added
====== ======
2008/02/28 2008/02/28
* Rev 12259 Updated Alchemist Guild Dealer. [L0ne_W0lf]
* Rev 12258 Implemented several "checkweights" in other NPCs. [L0ne_W0lf] * Rev 12258 Implemented several "checkweights" in other NPCs. [L0ne_W0lf]
* Rev 12257 Implemented several "checkweight" NPC merchants. [L0ne_W0lf] * Rev 12257 Implemented several "checkweight" NPC merchants. [L0ne_W0lf]
2008/02/27 2008/02/27

View File

@ -3,9 +3,9 @@
//===== By: ================================================== //===== By: ==================================================
//= eAthena Team //= eAthena Team
//===== Current Version: ===================================== //===== Current Version: =====================================
//= 1.4 //= 1.5
//===== Compatible With: ===================================== //===== Compatible With: =====================================
//= eAthena 1.0+ //= eAthena SVN
//===== Description: ========================================= //===== Description: =========================================
//= Selling Alchemist Materials and Manuals //= Selling Alchemist Materials and Manuals
//===== Additional Comments: ================================= //===== Additional Comments: =================================
@ -14,117 +14,151 @@
//= Potion Guide. [Lupus] //= Potion Guide. [Lupus]
//= 1.3 Deleted Elemental Potions Guide due to original quest [Lupus] //= 1.3 Deleted Elemental Potions Guide due to original quest [Lupus]
//= 1.4 Alchemists can now purchase 2000 Medicine Bowls at once. [SinSloth] //= 1.4 Alchemists can now purchase 2000 Medicine Bowls at once. [SinSloth]
//= 1.5 Updated to Aegis 10.3 Standards. [L0ne_W0lf]
//============================================================ //============================================================
alde_alche,24,188,3 script Guild Dealer 740,{
alde_alche,24,188,3 script Gever AI Sharp 740,{ if (checkweight(1201,1) == 0) {
mes "[Gever AI Sharp]"; mes "- Wait a minute! -";
mes "Welcome to the Alchemist Union."; mes "- Currently you are carrying -";
mes "- too many items with you. -";
mes "- Please come back again -";
mes "- after you store some items into kafra storage. -";
close;
}
mes "[Gever Al Sharp]";
mes "Welcome to the";
mes "Alchemist Union.";
mes "How can I assist you today?"; mes "How can I assist you today?";
next; next;
menu "Purchase materials.",M_Material, "Purchase a production manual.",M_Manual, "Cancel Deal.", M_Bye; switch(select("Purchase materials.:Purchase a production manual.:Quit.")) {
case 1:
M_Material: mes "[Gever Al Sharp]";
mes "[Gever AI Sharp]";
mes "What would you like?"; mes "What would you like?";
next; next;
menu "Medicine Bowl - 8z",-,"Cancel.",M_Bye; if (select("Medicine Bowl - 8 Zeny:Cancel.") == 1) {
mes "[Gever Al Sharp]";
mes "[Gever AI Sharp]";
mes "How many do you want?"; mes "How many do you want?";
mes "Enter '0' if you want to quit."; mes "Enter '0' if you want to quit.";
next; next;
input @num; while(1) {
if((@num < 1) || (@num > 2000)) goto M_Bye; input .@input,0,2001;
set @price,@num * 8; if (.@input == 0) {
mes "[Gever AI Sharp]"; mes "[Gever Al Sharp]";
if(Zeny < @price) goto sL_NoZeny; mes "The deal was cancelled.";
if (checkweight(7134,@num) == 0) goto sL_OverW; mes "Come again next time.";
set Zeny,Zeny-@price; close;
getitem 7134,@num;//Items: Medicine_Bowl, }
goto L_Bye; else if (.@input < 1 || .@input > 2000) {
M_Manual: mes "[Gever Al Sharp]";
mes "[Gever AI Sharp]"; mes "The number must";
mes "What do you need?"; mes "be less than 2000.";
mes "Manuals are generally 100,000 zeny."; next;
mes "Except for a couple of special manuals."; }
next; else {
menu "Potion Creation Guide",sM_Pot, "Alcohol Creation Guide",sM_Alc, "Bottle Grenade Creation Guide",sM_Gren, break;
"Acid Bottle Creation Guide",sM_Acid, "Plant Bottle Creation Guide",sM_Plant, "Marine Sphere Bottle Creation Guide",sM_Mar, }
"Glistening Coat Creation Guide",sM_Coat, "Condensed Potion Creation Guide",sM_Con, "Cancel Deal.",M_Bye; }
sM_Pot: set .@sell,.@input * 8;
set @itemid,7144; set .@item_weight,.@input * 10;
set @price,100000; if (Zeny < .@sell) {
set @itemname$,"Potion"; mes "[Gever Al Sharp]";
goto L_Choice; mes "You don't";
sM_Alc: mes "have enough zeny.";
set @itemid,7127; mes "Check how much zeny";
set @price,100000; mes "you have first.";
set @itemname$,"Alchohol"; close;
goto L_Choice; }
sM_Gren: if ((MaxWeight - Weight) < .@item_weight) {
set @itemid,7128; mes "[Gever Al Sharp]";
set @price,100000; mes "It doesn't seem like";
set @itemname$,"Bottle Grenade"; mes "you can carry everything.";
goto L_Choice; mes "Please check the space";
sM_Acid: mes "in your inventory.";
set @itemid,7129; close;
set @price,100000; }
set @itemname$,"Acid Bottle"; set zeny,zeny-.@sell;
goto L_Choice; getitem 7134,.@input; //Medicine_Bowl
sM_Plant: mes "[Gever Al Sharp]";
set @itemid,7130; mes "Thank you.";
set @price,100000;
set @itemname$,"Plant Bottle";
goto L_Choice;
sM_Mar:
set @itemid,7131;
set @price,100000;
set @itemname$,"Marine Sphere Bottle";
goto L_Choice;
sM_Coat:
set @itemid,7132;
set @price,100000;
set @itemname$,"Glistening Coat";
goto L_Choice;
sM_Con:
set @itemid,7133;
set @price,240000;
set @itemname$,"Condensed Potion";
goto L_Choice;
// sM_Ele:
// set @itemid,7434;
// set @price,240000;
// set @itemname$,"Elemental Potion";
// goto L_Choice;
L_Choice:
mes "[Gever AI Sharp]";
mes "An " + @itemname$ + " Creation Guide??";
mes "That will be "+@price/1000+",000 zeny.";
next;
menu "Purchase.",-,"Quit.",M_Bye;
mes "[Gever AI Sharp]";
if(Zeny < @price) goto sL_NoZeny;
if (checkweight(@itemid,1) == 0) goto sL_OverW;
set Zeny,Zeny-@price;
getitem @itemid,1;
L_Bye:
mes "Thank you for buying!";
mes "Come again."; mes "Come again.";
close; close;
}
sL_NoZeny: mes "[Gever Al Sharp]";
mes "You don't seem to have enough money."; mes "Well then,";
close; mes "come again when";
sL_OverW: mes "you need to purchase";
mes "Hmm.... it seems that you are overweight..."; mes "materials related to";
close; mes "Alchemy, alright?";
M_Bye:
mes "[Gever AI Sharp]";
mes "Then come again next time.";
close; close;
case 2:
mes "[Gever Al Sharp]";
mes "What do you need?";
mes "Manuals are generally 100,000 zeny. But there are a couple of special manuals that will cost more.";
next;
switch(select("Potion Creation Guide:Alcohol Creation Guide:Bottle Grenade Creation Guide:Acid Bottle Creation Guide:Plant Bottle Creation Guide:Marine Sphere Bottle Creation Guide:Glistening Coat Creation Guide:Condensed Potion Creation Guide:Cancel Deal.")) {
case 1:
callsub S_SellManual,7144,100000; //Normal_Potion_Book
break;
case 2:
callsub S_SellManual,7127,100000; //Alcol_Create_Book
break;
case 3:
callsub S_SellManual,7128,100000; //FireBottle_Create_Book
break;
case 4:
callsub S_SellManual,7129,100000; //Acid_Create_Book
break;
case 5:
callsub S_SellManual,7130,100000; //Plant_Create_Book
break;
case 6:
callsub S_SellManual,7131,100000; //Mine_Create_Book
break;
case 7:
callsub S_SellManual,7132,100000; //Coating_Create_Book
break;
case 8:
callsub S_SellManual,7133,240000; //Slim_Potion_Create_Book
break;
case 9:
mes "[Gever Al Sharp]";
mes "Well then...";
mes "Come back if you";
mes "ever need to buy";
mes "a production manual.";
close;
}
case 3:
mes "[Gever Al Sharp]";
mes "Alright then,";
mes "have a good day.";
close;
}
S_SellManual:
if (Zeny < getarg(1)) {
mes "[Gever Al Sharp]";
mes "You don't";
mes "have enough zeny.";
mes "Check how much zeny";
mes "you have first.";
close;
}
mes "[Gever Al Sharp]";
mes ""+getitemname(getarg(0))+"?";
mes "That'll be "+getarg(1)+" zeny.";
next;
switch(select("Purchase.:Quit.")) {
set zeny,zeny-getarg(1);
getitem getarg(0),1;
mes "[Gever Al Sharp]";
mes "Thank you for";
mes "your patronage.";
close;
}
mes "[Gever Al Sharp]";
mes "Come again";
mes "next time.";
close;
} }