summaryrefslogtreecommitdiff
path: root/npc/merchants/alchemist.txt
diff options
context:
space:
mode:
authorL0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-02-28 06:03:41 +0000
committerL0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-02-28 06:03:41 +0000
commit8dfc96876e8dec1baea3c0f6403443e6b2864059 (patch)
tree8e2a9e7d71968eea645f87f1f60c4703bdc7296a /npc/merchants/alchemist.txt
parentc54ae348d8e51d038ee1f35f610d56e2ee55522b (diff)
downloadhercules-8dfc96876e8dec1baea3c0f6403443e6b2864059.tar.gz
hercules-8dfc96876e8dec1baea3c0f6403443e6b2864059.tar.bz2
hercules-8dfc96876e8dec1baea3c0f6403443e6b2864059.tar.xz
hercules-8dfc96876e8dec1baea3c0f6403443e6b2864059.zip
Updated Alchemist Guild Dealer.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12259 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'npc/merchants/alchemist.txt')
-rw-r--r--npc/merchants/alchemist.txt238
1 files changed, 136 insertions, 102 deletions
diff --git a/npc/merchants/alchemist.txt b/npc/merchants/alchemist.txt
index b8c52a0a2..212bc8ab7 100644
--- a/npc/merchants/alchemist.txt
+++ b/npc/merchants/alchemist.txt
@@ -3,9 +3,9 @@
//===== By: ==================================================
//= eAthena Team
//===== Current Version: =====================================
-//= 1.4
+//= 1.5
//===== Compatible With: =====================================
-//= eAthena 1.0+
+//= eAthena SVN
//===== Description: =========================================
//= Selling Alchemist Materials and Manuals
//===== Additional Comments: =================================
@@ -14,117 +14,151 @@
//= Potion Guide. [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.5 Updated to Aegis 10.3 Standards. [L0ne_W0lf]
//============================================================
-
-alde_alche,24,188,3 script Gever AI Sharp 740,{
- mes "[Gever AI Sharp]";
- mes "Welcome to the Alchemist Union.";
+alde_alche,24,188,3 script Guild Dealer 740,{
+ if (checkweight(1201,1) == 0) {
+ mes "- Wait a minute! -";
+ 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?";
next;
- menu "Purchase materials.",M_Material, "Purchase a production manual.",M_Manual, "Cancel Deal.", M_Bye;
-
- M_Material:
- mes "[Gever AI Sharp]";
+ switch(select("Purchase materials.:Purchase a production manual.:Quit.")) {
+ case 1:
+ mes "[Gever Al Sharp]";
mes "What would you like?";
next;
- menu "Medicine Bowl - 8z",-,"Cancel.",M_Bye;
-
- mes "[Gever AI Sharp]";
- mes "How many do you want?";
+ if (select("Medicine Bowl - 8 Zeny:Cancel.") == 1) {
+ mes "[Gever Al Sharp]";
+ mes "How many do you want?";
mes "Enter '0' if you want to quit.";
next;
- input @num;
- if((@num < 1) || (@num > 2000)) goto M_Bye;
- set @price,@num * 8;
- mes "[Gever AI Sharp]";
- if(Zeny < @price) goto sL_NoZeny;
- if (checkweight(7134,@num) == 0) goto sL_OverW;
- set Zeny,Zeny-@price;
- getitem 7134,@num;//Items: Medicine_Bowl,
- goto L_Bye;
- M_Manual:
- mes "[Gever AI Sharp]";
+ while(1) {
+ input .@input,0,2001;
+ if (.@input == 0) {
+ mes "[Gever Al Sharp]";
+ mes "The deal was cancelled.";
+ mes "Come again next time.";
+ close;
+ }
+ else if (.@input < 1 || .@input > 2000) {
+ mes "[Gever Al Sharp]";
+ mes "The number must";
+ mes "be less than 2000.";
+ next;
+ }
+ else {
+ break;
+ }
+ }
+ set .@sell,.@input * 8;
+ set .@item_weight,.@input * 10;
+ if (Zeny < .@sell) {
+ mes "[Gever Al Sharp]";
+ mes "You don't";
+ mes "have enough zeny.";
+ mes "Check how much zeny";
+ mes "you have first.";
+ close;
+ }
+ if ((MaxWeight - Weight) < .@item_weight) {
+ mes "[Gever Al Sharp]";
+ mes "It doesn't seem like";
+ mes "you can carry everything.";
+ mes "Please check the space";
+ mes "in your inventory.";
+ close;
+ }
+ set zeny,zeny-.@sell;
+ getitem 7134,.@input; //Medicine_Bowl
+ mes "[Gever Al Sharp]";
+ mes "Thank you.";
+ mes "Come again.";
+ close;
+ }
+ mes "[Gever Al Sharp]";
+ mes "Well then,";
+ mes "come again when";
+ mes "you need to purchase";
+ mes "materials related to";
+ mes "Alchemy, alright?";
+ close;
+ case 2:
+ mes "[Gever Al Sharp]";
mes "What do you need?";
- mes "Manuals are generally 100,000 zeny.";
- mes "Except for a couple of special manuals.";
- next;
- menu "Potion Creation Guide",sM_Pot, "Alcohol Creation Guide",sM_Alc, "Bottle Grenade Creation Guide",sM_Gren,
- "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 @itemid,7144;
- set @price,100000;
- set @itemname$,"Potion";
- goto L_Choice;
- sM_Alc:
- set @itemid,7127;
- set @price,100000;
- set @itemname$,"Alchohol";
- goto L_Choice;
- sM_Gren:
- set @itemid,7128;
- set @price,100000;
- set @itemname$,"Bottle Grenade";
- goto L_Choice;
- sM_Acid:
- set @itemid,7129;
- set @price,100000;
- set @itemname$,"Acid Bottle";
- goto L_Choice;
- sM_Plant:
- set @itemid,7130;
- 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.";
+ mes "Manuals are generally 100,000 zeny. But there are a couple of special manuals that will cost more.";
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.";
+ 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;
+ }
- sL_NoZeny:
- mes "You don't seem to have enough money.";
- close;
- sL_OverW:
- mes "Hmm.... it seems that you are overweight...";
- close;
-
-
- M_Bye:
- mes "[Gever AI Sharp]";
- mes "Then come again next time.";
+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;
}