summaryrefslogtreecommitdiff
path: root/npc/re/merchants
diff options
context:
space:
mode:
Diffstat (limited to 'npc/re/merchants')
-rw-r--r--npc/re/merchants/3rd_trader.txt4
-rw-r--r--npc/re/merchants/card_separation.txt279
-rw-r--r--npc/re/merchants/coin_exchange.txt827
-rw-r--r--npc/re/merchants/enchan_mal.txt641
-rw-r--r--npc/re/merchants/refine.txt8
-rw-r--r--npc/re/merchants/renters.txt4
-rw-r--r--npc/re/merchants/shops.txt39
7 files changed, 1787 insertions, 15 deletions
diff --git a/npc/re/merchants/3rd_trader.txt b/npc/re/merchants/3rd_trader.txt
index 1fac05c49..7c3ca3cac 100644
--- a/npc/re/merchants/3rd_trader.txt
+++ b/npc/re/merchants/3rd_trader.txt
@@ -1,11 +1,9 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= 3rd Item Seller
//===== By: ==================================================
//= Masao, Mercurial
//===== Current Version: =====================================
//= 1.2
-//===== Compatible With: =====================================
-//= rAthena SVN
//===== Description: =========================================
//= [Aegis Conversion]
//= Sells some 3rd Job related items.
diff --git a/npc/re/merchants/card_separation.txt b/npc/re/merchants/card_separation.txt
new file mode 100644
index 000000000..a81aeb746
--- /dev/null
+++ b/npc/re/merchants/card_separation.txt
@@ -0,0 +1,279 @@
+//===== rAthena Script =======================================
+//= Card Separation System
+//===== By: ==================================================
+//= Muad_Dib
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= rAthena SVN
+//===== Description: =========================================
+//= [Official Conversion]
+//= Separates cards from equipment.
+//===== Additional Comments: =================================
+//= 1.0 First Version. [Euphy]
+//============================================================
+
+malangdo,215,166,4 script Jeremy#mal 553,{
+ disable_items;
+ if (checkweight(1201,1) == 0) {
+ mes "You have too many kinds of objects. Let's try to continue after reducing those objects.";
+ close;
+ }
+ if (MaxWeight - Weight < 10000) {
+ mes "Can't continue because you have too many heavy objects. Let's try to continue after reducing the weight.";
+ close;
+ }
+ mes "[Jeremy]";
+ mes "Long time no see~";
+ mes "I have learned a new skill that separates cards from Armor, Shoes, Garment and Headgear. Do you want to try it?";
+ next;
+ mes "[Jeremy]";
+ mes "Generally the fee is 1,000,000 Zeny. During the card separation, you can use ^990000special items that reduce the rate of destroying equipment or cards^000000. We don't charge additional zeny for this.";
+ next;
+ mes "[Jeremy]";
+ mes "There is a possibility of destroying them even using a special item. Also, ^ff0000the refine level might be lost^000000. Do you have any equipment to separate?";
+ next;
+
+ setarray .@equip_name$[0], "Armor", "Shoes", "Garment", "Upper Hat";
+ setarray .@equip_slot[0], EQI_ARMOR,EQI_SHOES,EQI_GARMENT,EQI_HEAD_TOP;
+ for(set .@i,0; .@i<getarraysize(.@equip_slot); set .@i,.@i+1) {
+ if (getequipisequiped(.@equip_slot[.@i]))
+ set .@menu$, .@menu$+getequipname(.@equip_slot[.@i])+":";
+ else
+ set .@menu$, .@menu$+"^999999"+.@equip_name$[.@i]+" (empty)^000000:";
+ }
+
+ set .@i, select("Stop the work:How is it possible?:"+.@menu$);
+ switch(.@i) {
+ case 1:
+ mes "[Jeremy]";
+ mes "Whenever you need the work, visit me here.";
+ close;
+ case 2:
+ mes "[Jeremy]";
+ mes "You wonder what is so special. Well, I hate to give only a guide, so let me tell you the story...";
+ next;
+ mes "^000099Jeremy is stretching his shoulders and hands. He might be waiting for someone to talk with him.^000000";
+ next;
+ mes "[Jeremy]";
+ mes "Do you know that Malangdo's specialty is canned food?";
+ next;
+ select("I knew that well. Is it that limited?");
+ mes "[Jeremy]";
+ mes "Hehe... Everyone loves it. But there were some problems before.";
+ next;
+ select("Problems? Is there any faulty fish?");
+ mes "[Jeremy]";
+ mes "No, the fish does not have any problem. The problem is lots of fish oil produced after processing. That is such an industrial waste.";
+ next;
+ mes "[Jeremy]";
+ mes "However, after a revitalizing refining process, this fish oil became valuable to use for old equipment care and industrial lubricant.";
+ next;
+ mes "[Jeremy]";
+ mes "In addition, this oil is so useful to separate relics from equipped weapons that we can't buy Premium Lubricant and Ordinary Lubricant with Zeny.";
+ next;
+ mes "[Jeremy]";
+ mes "Well, don't worry about money. Surely the Premium Lubricant is expensive. If you pay some zeny, I can give you cheaper lubricant.";
+ next;
+ mes "[Jeremy]";
+ mes "I'm not sure about the quality of success. Anyway, this is so cheap, right?";
+ close;
+ default:
+ set .@equip_num, .@equip_slot[.@i-3];
+ if (!getequipisequiped(.@equip_num)) {
+ mes "[Jeremy]";
+ mes "In this part, there is nothing?";
+ close;
+ }
+ break;
+ }
+ setarray .@equip_card[0], getequipcardid(.@equip_num,0),getequipcardid(.@equip_num,1),getequipcardid(.@equip_num,2),getequipcardid(.@equip_num,3);
+ for(set .@i,0; .@i<4; set .@i,.@i+1) {
+ if (.@equip_card[.@i] >= 4700) // Armor Enchant System
+ set .@equip_card[.@i],0;
+ }
+ if (!getarraysize(.@equip_card)) {
+ mes "[Jeremy]";
+ mes "The card is not equipped. Do you want to check again?";
+ close;
+ }
+
+ // Detect MVP cards.
+ set .@mvp_list$,
+ "|4408|4128|4456|4168|4142"+ //Gloom_Under_Night_Card, Golden_Bug_Card, Nidhogg_Shadow_Card, Dark_Lord_Card, Doppelganger_Card
+ "|4134|4137|4386|4407|4357"+ //Dracula_Card, Drake_Card, Detale_Card, Randgris_Card, B_Seyren_Card
+ "|4146|4132|4147|4372|4145"+ //Maya_Card, Mistress_Card, Baphomet_Card, Bacsojin_Card, Berzebub_Card
+ "|4374|4352|4367|4236|4425"+ //Apocalips_H_Card, B_Ygnizem_Card, B_Shecil_Card, Amon_Ra_Card, Atroce_Card
+ "|4359|4123|4144|4135|4143"+ //B_Eremes_Card, Eddga_Card, Osiris_Card, Orc_Load_Card, Orc_Hero_Card
+ "|4263|4131|4430|4276|4419"+ //Incant_Samurai_Card, Moonlight_Flower_Card, Ifrit_Card, Lord_Of_Death_Card, Ktullanux_Card
+ "|4403|4399|4376|4441|4302"+ //Kiel_Card, Thanatos_Card, Lady_Tanee_Card, Fallen_Bishop_Card, Tao_Gunka_Card
+ "|4305|4148|4318|4121|4365"+ //Turtle_General_Card, Pharaoh_Card, Knight_Windstorm_Card, Phreeoni_Card, B_Katrinn_Card
+ "|4363|4324|4361|4330|4342|"; //B_Magaleta_Card, Garm_Card, B_Harword_Card, Dark_Snake_Lord_Card, Rsx_0806_Card
+ if ((.@equip_card[0] && compare(.@mvp_list$,"|"+.@equip_card[0]+"|")) ||
+ (.@equip_card[1] && compare(.@mvp_list$,"|"+.@equip_card[1]+"|")) ||
+ (.@equip_card[2] && compare(.@mvp_list$,"|"+.@equip_card[2]+"|")) ||
+ (.@equip_card[3] && compare(.@mvp_list$,"|"+.@equip_card[3]+"|")))
+ set .@boss_chk,1;
+
+ if (.@boss_chk == 0) {
+ mes "[Jeremy]";
+ mes "Except cards, ^ff0000all enchanted effects will disappear.^000000 If you agree to this, please choose the work type:";
+ next;
+ set .@menu$,
+ "Next time...:"+
+ ((Zeny >= 1000000)?"Use 1,000,000z (Do not use special item):":"^999999Use 1,000,000z (Insufficient)^000000:")+
+ ((countitem(6441))?"Use Premium Lubricant:":"^999999Premium Lubricant (Insufficient)^000000:")+
+ ((countitem(6440))?"Use Ordinary Lubricant":"^999999Ordinary Lubricant (Insufficient)^000000");
+ switch(select(.@menu$)) {
+ case 1:
+ mes "[Jeremy]";
+ mes "Whenever you need the work, visit me here.";
+ close;
+ case 2:
+ if (Zeny < 1000000) {
+ mes "[Jeremy]";
+ mes "You don't have enough zeny. Please come back with enough fees.";
+ close;
+ }
+ mes "[Jeremy]";
+ mes "This is pretty old equipment. There is a high rate of destroying the cards or equipment during the work. Are you sure you want to continue?";
+ next;
+ if(select("Next time...:Continue") == 1) {
+ mes "[Jeremy]";
+ mes "Whenever you need the work, visit me here.";
+ close;
+ }
+ set .@sf_c_num,150;
+ set .@sf_r_num,150;
+ set .@sf_w_num,150;
+ set Zeny, Zeny - 1000000;
+ break;
+ case 3:
+ if (countitem(6441) == 0) {
+ mes "[Jeremy]";
+ mes "You don't have Premium Lubricant.";
+ close;
+ }
+ mes "[Jeremy]";
+ mes "If you use the Premium Lubricant, the rate of destruction will be decreased highly, but I can't give you a 100% guarantee. Are you sure you want to continue?";
+ next;
+ if(select("Next time...:Continue") == 1) {
+ mes "[Jeremy]";
+ mes "Whenever you need the work, visit me here.";
+ close;
+ }
+ set .@sf_c_num,75;
+ set .@sf_r_num,75;
+ set .@sf_w_num,75;
+ delitem 6441,1; //High_RankLubricant
+ break;
+ case 4:
+ if (countitem(6440) == 0) {
+ mes "[Jeremy]";
+ mes "You don't have Ordinary Lubricant.";
+ close;
+ }
+ mes "[Jeremy]";
+ mes "If you use the Ordinary Lubricant, the rate of destruction will be decreased highly, but I can't give you a 100% guarantee. Are you sure you want to continue?";
+ next;
+ if(select("Next time...:Continue") == 1) {
+ mes "[Jeremy]";
+ mes "Whenever you need the work, visit me here.";
+ close;
+ }
+ set .@sf_c_num,75;
+ set .@sf_r_num,150;
+ set .@sf_w_num,150;
+ delitem 6440,1; //General_Lubricant
+ break;
+ }
+ } else if (.@boss_chk == 1) {
+ mes "[Jeremy]";
+ mes "This equipment contains a precious MVP card. This card can't be separated with lubricant. If you bring the super surfactant ^0000ffSillit Pong^000000, I will be able to work.";
+ next;
+ switch(select("Next time...:I have a Sillit Pong.")) {
+ case 1:
+ mes "[Jeremy]";
+ mes "Whenever you need the work, visit me here.";
+ close;
+ case 2:
+ if (countitem(6443) == 0) {
+ mes "[Jeremy]";
+ mes "You don't have Sillit Pong.";
+ close;
+ }
+ break;
+ }
+ mes "[Jeremy]";
+ mes "Except cards, ^ff0000all enchanted effects will disappear.^000000 If you agree to this, please choose the work type:";
+ next;
+ switch(select("Next time...:Alright, let's do it!")) {
+ case 1:
+ mes "[Jeremy]";
+ mes "Whenever you need the work, visit me here.";
+ close;
+ case 2:
+ set .@sf_c_num,60;
+ set .@sf_r_num,60;
+ set .@sf_w_num,60;
+ delitem 6443,1; //Sillit_Pong_Bottle
+ break;
+ }
+ }
+
+ set .@equip_id, getequipid(.@equip_num);
+ set .@equip_refine, getequiprefinerycnt(.@equip_num);
+ delequip .@equip_num;
+
+ // Chance of retaining refine level.
+ if (rand(1,.@sf_r_num) >= 61)
+ set .@equip_refine,0;
+
+ // Chance of retaining equipment.
+ if (rand(1,.@sf_w_num) < 61) {
+ set .@equip_safe,1;
+ getitem2 .@equip_id,1,1,.@equip_refine,0,0,0,0,0;
+ }
+
+ // Chance of retaining cards.
+ for(set .@i,0; .@i<4; set .@i,.@i+1) {
+ if (.@equip_card[.@i]) {
+ if (rand(1,.@sf_c_num) < 61)
+ getitem .@equip_card[.@i],1;
+ else
+ set .@card_break,1;
+ }
+ }
+
+ // Display corresponding effect.
+ if (!.@equip_safe && .@card_break)
+ specialeffect2 EF_LORD;
+ else if (.@equip_safe && .@card_break)
+ specialeffect2 EF_SUI_EXPLOSION;
+ else if (!.@equip_safe && !.@card_break)
+ specialeffect2 EF_FIREPILLAR;
+ else
+ specialeffect2 EF_MAXPOWER;
+
+ // Output results.
+ mes "-- Result of Card Separation --";
+ if (.@equip_safe) {
+ mes "Crack has not occured during the card separation process.";
+ mes "^0000FFEquipment separation is normal.^000000";
+ } else {
+ mes "Crack has occured during the card separation process.";
+ mes "Equipment has been damaged. ^ff0000Unrecoverable.^000000";
+ }
+ mes "-------------------";
+ if (!.@card_break) {
+ mes "Erosion of surface has not occured during the card separation process.";
+ mes "^0000ffCard separation has succeeded.^000000";
+ } else {
+ mes "Erosion of surface has occured during the card separation process.";
+ mes "Card has been damaged. ^ff0000Unrecoverable.^000000";
+ }
+ next;
+ mes "[Jeremy]";
+ mes "That is all for the results of the card separation. Please come again.";
+ close;
+}
diff --git a/npc/re/merchants/coin_exchange.txt b/npc/re/merchants/coin_exchange.txt
new file mode 100644
index 000000000..92afddca0
--- /dev/null
+++ b/npc/re/merchants/coin_exchange.txt
@@ -0,0 +1,827 @@
+//===== Hercules Script =======================================
+//= Coin Merchants
+//===== By: ==================================================
+//= rAthena Dev Team
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Hercules
+//===== Description: =========================================
+//= [Official Conversion]
+//= Renewal coin redemption NPCs.
+//===== Additional Comments: =================================
+//= 1.0 First version. [Euphy/Lemongrass]
+//= 1.1 Added remaining Malangdo traders. [Euphy/Lemongrass]
+//============================================================
+
+// Malangdo
+//============================================================
+malangdo,220,167,5 script Coin Exchanger CX-1 564,{
+ if (checkweight(1201,1) == 0) {
+ mes "You have too many kinds of objects. Let's try to continue after reducing those objects.";
+ close;
+ }
+ if (MaxWeight - Weight < 10000) {
+ mes "Can't continue because you have too many heavy objects. Let's try to continue after reducing the weight.";
+ close;
+ }
+ mes "[Coin Exchanger CX-1]";
+ mes "Welcome to CX-1. If you have coins, you can exchange them to high or low grade coins.";
+ next;
+ setarray .@coins[1],
+ 6417, //Silvervine
+ 6418, //Agrade_Coin
+ 6419, //Bgrade_Coin
+ 6420, //Cgrade_Coin
+ 6421, //Dgrade_Coin
+ 6422; //Egrade_Coin
+ set .@menu$,"Stop:";
+ for(set .@i,1; .@i<=6; set .@i,.@i+1) {
+ if (countitem(.@coins[.@i]))
+ set .@menu$, .@menu$+getitemname(.@coins[.@i])+":";
+ else
+ set .@menu$, .@menu$+"^aaaaaa"+getitemname(.@coins[.@i])+" (None)^000000:";
+ }
+ set .@i, select(.@menu$);
+ switch(.@i) {
+ case 1:
+ mes "[Coin Exchanger CX-1]";
+ mes "Thank you for coming.";
+ close;
+ default:
+ set .@coin, .@coins[.@i-1];
+ set .@coin_select, .@i-1;
+ break;
+ }
+ if (countitem(.@coin) == 0) {
+ mes "[Coin Exchanger CX-1]";
+ mes "You chose a coin that you don't have.";
+ mes "Thank you for coming.";
+ close;
+ }
+ mes "[Coin Exchanger CX-1]";
+ mes "----Rate of exchange----";
+ mes "Higher exchange - 30 to 10";
+ mes "Lower exchange - 10 to 30";
+ mes "------------------------";
+ mes "^ff3333When you exchange, we charge a fee according to the current market price.^000000";
+ next;
+ setarray .@exchange_name$[0],"higher","lower";
+ setarray .@exchange_rate[0],30,10;
+ setarray .@exchange_loss[0],rand(1,4),rand(1,2); // Amount deducted per exchange.
+ setarray .@exchange_id[0],.@coins[.@coin_select-1],.@coins[.@coin_select+1];
+ if (.@exchange_id[0] == .@coins[1]) set .@exchange_id[0],0; // Cannot exchange for Silvervine.
+ set .@menu$,"Stop:";
+ for(set .@i,0; .@i<2; set .@i,.@i+1) {
+ if (.@exchange_id[.@i] == 0)
+ set .@menu$, .@menu$+"^ff3333Unavailable exchange to "+.@exchange_name$[.@i]+" coin^000000:";
+ else if (countitem(.@coin) < .@exchange_rate[.@i])
+ set .@menu$, .@menu$+"^aaaaaaExchange to "+.@exchange_name$[.@i]+" coin (null)^000000:";
+ else
+ set .@menu$, .@menu$+"Exchange to "+.@exchange_name$[.@i]+" coin - "+getitemname(.@coin)+" ("+.@exchange_rate[.@i]+" needed):";
+ }
+ set .@i, select(.@menu$)-2;
+ if (.@i == -1) {
+ mes "[Coin Exchanger CX-1]";
+ mes "Thank you for coming.";
+ close;
+ }
+ if (.@exchange_id[.@i] == 0) {
+ mes "[Coin Exchanger CX-1]";
+ mes "This coin is not available to exchange to "+.@exchange_name$[.@i]+" coin.";
+ mes "Thank you for coming.";
+ close;
+ }
+ if (countitem(.@coin) < .@exchange_rate[.@i]) {
+ mes "[Coin Exchanger CX-1]";
+ mes "You don't have enough coins to exchange to "+.@exchange_name$[.@i]+" coin.";
+ mes "Thank you for coming.";
+ close;
+ }
+ set .@exchange_total, .@exchange_rate[(!.@i)] - .@exchange_loss[(!.@i)];
+ delitem .@coin, .@exchange_rate[.@i];
+ getitem .@exchange_id[.@i], .@exchange_total;
+ mes "[Coin Exchanger CX-1]";
+ mes "^003399"+.@exchange_rate[.@i]+"^000000 unit(s) of ^003399 "+getitemname(.@coin)+"^000000 taken.";
+ mes "I exchanged them for ^003399"+.@exchange_name$[.@i]+" coins^000000, after deducting ^003399"+.@exchange_loss[(!.@i)]+"^000000 unit(s), ^003399"+.@exchange_total+"^000000 unit(s) remaining.";
+ close;
+}
+
+malangdo,218,165,5 script Special Vending Machine 562,{
+ if (checkweight(1201,1) == 0) {
+ mes "You have too many kinds of objects. Let's try to continue after reducing those objects.";
+ close;
+ }
+ if (MaxWeight - Weight < 10000) {
+ mes "Can't continue because you have too many heavy objects. Let's try to continue after reducing the weight.";
+ close;
+ }
+ mes "[Special Vending Machine]";
+ mes "Welcome to CX-82. You have a Silvervine Fruit, so you can purchase the Malangdo Specialty that has special ability.";
+ next;
+ callsub L_AddItem, //DisplayName,ItemID,Cost
+ "Seagod's Protection [23 hours]",16740,4,
+ "Seagod's Protection [7 days]",16763,12,
+ "Seagod's Protection [15 days]",16764,24,
+ "Octopus Hunting Stick [23 hours]",16765,2,
+ "Octopus Hunting Stick [3 days]",16766,5,
+ "Octopus Hunting Stick [7 days]",16767,10,
+ "Premium Lubricant",6441,56,
+ "Ordinary Lubricant",6440,36,
+ "Sillit Pong",6443,192;
+L_AddItem:
+ set .@menu$,"Explanation:";
+ for(set .@i,0; .@i<getargcount(); set .@i,.@i+3)
+ set .@menu$, .@menu$+getarg(.@i)+":";
+ set .@i, select(.@menu$)-2;
+ if (.@i == -1) {
+ mes "[Special Vending Machine]";
+ mes "Seagod's Protection is an item used for entering the Culvert memorial dungeon during a certain period.";
+ next;
+ mes "[Special Vending Machine]";
+ mes "Octopus Hunting Stick is an item used for entering the Culvert memorial dungeon during a certain period.";
+ next;
+ mes "[Special Vending Machine]";
+ mes "Premium and Ordinary Lubricant are items used for separation of equipment and cards. If you visit the specialist Jeremy with either item, he will explain more details of the effects.";
+ next;
+ mes "[Special Vending Machine]";
+ mes "Sillit Pong is special item that separates sockets with MVP cards. Unable to separate MVP card by Premium and Ordinary Lubricant.";
+ close;
+ }
+ set .@cost, getarg(.@i*3+2);
+ mes "[Special Vending Machine]";
+ mes "You choose ^005500"+getarg(.@i*3)+"^000000. For purchasing, you need ^005500"+.@cost+"^000000 unit(s) of Silvervine Fruit.";
+ next;
+ if (countitem(6417) < .@cost)
+ set .@ven_menu$, "^999999Silvervine Fruit (missing "+(.@cost - countitem(6417))+")^000000";
+ else
+ set .@ven_menu$, "Purchase - Silvervine Fruit (have "+countitem(6417)+")";
+ switch(select("Stop:"+.@ven_menu$)) {
+ case 1:
+ mes "[Special Vending Machine]";
+ mes "Thank you for coming.";
+ close;
+ case 2:
+ if (countitem(6417) < .@cost) {
+ mes "[Special Vending Machine]";
+ mes "Not enough Silvervine Fruit.";
+ mes "Closing the transaction.";
+ mes "Thank you for coming.";
+ close;
+ }
+ mes "[Special Vending Machine]";
+ mes "The transaction is completed. Thank you for coming.";
+ delitem 6417,.@cost; //Silvervine
+ getitem getarg(.@i*3+1),1;
+ close;
+ }
+}
+
+malangdo,236,179,5 script Dark Merchant K 554,{
+ if (checkweight(1201,1) == 0) {
+ mes "It seems you have too much in your inventory. Let's try again after getting rid of some of your belongings.";
+ close;
+ }
+ if (MaxWeight - Weight < 1000) {
+ mes "Your inventory is too heavy now. Please come back after getting rid of some of your belongings.";
+ close;
+ }
+ mes "[Merchant K]";
+ mes "Thank you for the trade.";
+ mes "We exchange ^ff000010 C Grade Coin^000000 to ^3333ff1 Mora Coin^000000. Shall we begin then?";
+ next;
+ setarray .@coin_amount[0],10,100,500,1000;
+ while(1) {
+ set .@menu$,"";
+ for(set .@i,0; .@i<getarraysize(.@coin_amount); set .@i,.@i+1) {
+ if (countitem(6420) >= .@coin_amount[.@i])
+ set .@menu$, .@menu$+"Exchange "+(.@coin_amount[.@i]/10)+" Mora Coin:";
+ else
+ set .@menu$, .@menu$+"^aaaaaaExchange "+(.@coin_amount[.@i]/10)+" Mora Coin (Not Enough)^000000:";
+ }
+ set .@i, select(.@menu$+"Quit")-1;
+ if (.@i == getarraysize(.@coin_amount)) {
+ mes "[Merchant K]";
+ mes "Let's exchange some other time.";
+ close;
+ }
+ if (countitem(6420) < .@coin_amount[.@i]) {
+ mes "[Merchant K]";
+ mes "You need ^ff0000"+.@coin_amount[.@i]+"^000000 C Grade Coin to perform the exchange. But you don't seem to have enough now.";
+ close;
+ }
+ delitem 6420,.@coin_amount[.@i]; //Cgrade_Coin
+ getitem 6380,.@coin_amount[.@i]/10; //Mora_Coin
+ mes "[Merchant K]";
+ mes "C Grade Coin ^003399"+.@coin_amount[.@i]+"^000000 well received."; //FIXME: Dialogue.
+ mes "Exchanged to ^003399"+(.@coin_amount[.@i]/10)+"^000000 Mora Coin.";
+ next;
+ mes "[Merchant K]";
+ mes "Would you like to continue?";
+ next;
+ }
+}
+
+malangdo,233,180,3 script Dark MachineTX100 564,{
+ if (checkweight(1201,1) == 0) {
+ mes "It seems you have too much in your inventory. Let's try again after getting rid of some of your belongings.";
+ close;
+ }
+ if (MaxWeight - Weight < 1000) {
+ mes "Your inventory is too heavy now. Please come back after getting rid of some of your belongings.";
+ close;
+ }
+ mes "[Dark Machine TX100]";
+ mes "Thank you for visiting TX100. You can exchange coins into higher or lower level coins.";
+ next;
+ mes "[Dark Machine TX100]";
+ mes "For a lower level coin exchange you can do 500 as a 1 time maximum, and for higher level coin exchange you can do 99 as a 1 time maximum.";
+ next;
+ setarray .@coins[1],
+ 6417, //Silvervine
+ 6418, //Agrade_Coin
+ 6419, //Bgrade_Coin
+ 6420, //Cgrade_Coin
+ 6421, //Dgrade_Coin
+ 6422; //Egrade_Coin
+ set .@menu$,"Quit:";
+ for(set .@i,1; .@i<=6; set .@i,.@i+1) {
+ if (countitem(.@coins[.@i]))
+ set .@menu$, .@menu$+getitemname(.@coins[.@i])+" (have "+countitem(.@coins[.@i])+"):";
+ else
+ set .@menu$, .@menu$+"^aaaaaa"+getitemname(.@coins[.@i])+" (None)^000000:";
+ }
+ set .@i, select(.@menu$)-1;
+ if (.@i == 0) {
+ mes "[Dark Machine TX100]";
+ mes "Thank you for coming.";
+ close;
+ }
+ set .@coin, .@coins[.@i];
+ setarray .@exchange_name$[0],"higher","lower";
+ setarray .@exchange_id[0],.@coins[.@i-1],.@coins[.@i+1];
+ if (.@exchange_id[0] == .@coins[1]) set .@exchange_id[0],0; // Cannot exchange for Silvervine.
+ if (.@i > getarraysize(.@coins)) {
+ mes "[Dark Machine TX100]";
+ mes "You've chosen abnormal menu.";
+ mes "Aborting process. Thank you for coming.";
+ close;
+ }
+ if (countitem(.@coin) == 0) {
+ mes "[Dark Machine TX100]";
+ mes "You chose a coin that you don't have.";
+ mes "Aborting process. Thank you for coming.";
+ close;
+ }
+ mes "[Dark Machine TX100]";
+ mes "----Exchange Rate----";
+ mes "Higher Coin - 3 to 1";
+ mes "Lower Coin - 1 to 3";
+ mes "---------------------";
+ mes "^ff3333We take a small vendor fee from your exchanged coins.^000000";
+ next;
+ set .@menu$, "Quit:";
+ if (.@exchange_id[0] == 0)
+ set .@menu$, .@menu$+"^ff3333Cannot exchange to higher level coin^000000:";
+ else {
+ if (countitem(.@coin) >= 99)
+ set .@menu$, .@menu$+"Exchange 99 "+getitemname(.@coin)+" into higher level coin:";
+ else
+ set .@menu$, .@menu$+"^aaaaaaExchange to higher level coin (Not enough)^000000:";
+ }
+ if (.@exchange_id[1] == 0)
+ set .@menu$, .@menu$+"^ff3333Cannot exchange to lower level coin^000000:";
+ else {
+ if (countitem(.@coin) > 500)
+ set .@menu$, .@menu$+"Exchange 500 "+getitemname(.@coin)+" into lower level coin:";
+ else if (countitem(.@coin))
+ set .@menu$, .@menu$+"Exchange "+countitem(.@coin)+" "+getitemname(.@coin)+" into lower level coin:";
+ else
+ set .@menu$, .@menu$+"^aaaaaaExchange to lower level coin (Not enough)^000000:";
+ }
+ set .@i, select(.@menu$)-2;
+ if (.@i == -1) {
+ mes "[Dark Machine TX100]";
+ mes "Thank you for coming.";
+ close;
+ }
+ if (.@exchange_id[.@i] == 0) {
+ mes "[Dark Machine TX100]";
+ mes "This coin cannot be exchanged to a "+.@exchange_name$[.@i]+" level coin.";
+ mes "Aborting process. Thank you for coming.";
+ close;
+ }
+ if ((.@i == 0 && countitem(.@coin) < 100) || (.@i == 1 && countitem(.@coin) == 0)) {
+ mes "[Dark Machine TX100]";
+ mes "You have not enough coins for a "+.@exchange_name$[.@i]+" level coin exchange.";
+ mes "Aborting process. Thank you for coming.";
+ close;
+ }
+ if (countitem(.@exchange_id[.@i]) > 28000) {
+ mes "[Dark Machine TX100]";
+ mes "You have too many "+.@exchange_name$[.@i]+" level coins already. Please come back with less coins.";
+ close;
+ }
+ switch(.@i) {
+ case 0:
+ set .@payment_amount,99;
+ set .@reward_amount, .@payment_amount/3;
+ set .@coin_text$,"High";
+ break;
+ case 1:
+ set .@payment_amount,(((countitem(.@coin) > 500))?500:countitem(.@coin));
+ set .@reward_amount, .@payment_amount*3;
+ set .@coin_text$,"Low";
+ break;
+ }
+ set .@fee, rand(1,3);
+ delitem .@coin, .@payment_amount;
+ getitem .@exchange_id[.@i], .@reward_amount - .@fee;
+ mes "[Dark Machine TX100]";
+ mes "Received ^003399"+getitemname(.@coin)+"^000000 for ^003399"+.@payment_amount+"^000000 unit(s).";
+ mes "We have excanged your coin to ^003399"+(.@reward_amount-.@fee)+"^000000 unit(s) of ^003399"+.@coin_text$+" Level Coin^000000, deducted ^003399"+.@fee+"^000000 unit(s) as exchanging fee.";
+ close;
+}
+
+malangdo,175,145,4 script Can Agency Guard 549,{
+ if (checkweight(1201,1) == 0) {
+ mes "You seem to have too many items. Give it a try after sorting out the item kinds.";
+ close;
+ }
+ if (MaxWeight - Weight < 1000) {
+ mes "You're not likely to be able to go on due to the heavy items you've got. Give it a try after lightening the weight.";
+ close;
+ }
+ mes "[Can Agency Guard]";
+ mes "Hey, you there... Have you seen any ^0000ffMalangdo Cat Can^000000s around here?";
+ next;
+ switch(select("Why are you asking?:Oh, you mean these?")) {
+ case 1:
+ mes "[Can Agency Guard]";
+ mes "Umm.";
+ mes "We at the Can Agency recently got some suspicious intelligence about them...";
+ next;
+ mes "[Can Agency Guard]";
+ mes "There were faulty products in bulk on the can production line for Malangdo specialty. These products, to be discarded, seem to have fallen into a retail dealer's hands.";
+ next;
+ mes "[Can Agency Guard]";
+ mes "Actually they were hard to distinguish from normal products. But it obviously says ^0000ffMalangdo Cat Can^000000 outside.";
+ next;
+ mes "[Can Agency Guard]";
+ mes "As faulty products are moving around on the market, we've been collecting them as is our duty. Have you ever seen anyone who has things like what I'm describing?";
+ next;
+ mes "[Can Agency Guard]";
+ mes "If you find anyone selling these products, please come and tell me.";
+ close;
+ case 2:
+ if (countitem(12633) == 0) {
+ mes "[Can Agency Guard]";
+ mes "Umm? I cannot see the ^0000ffMalangdo Cat Can^000000 from you. Don't forget to bring it to me if you've found out...";
+ close;
+ }
+ break;
+ }
+ mes "[Can Agency Guard]";
+ mes "The Malangdo Cat Can is a faulty product. Let me exchange it to 3 E Grade Coins. How about that?";
+ next;
+ switch(select("I won't exchange:^0000ff1^000000 Can -> ^0000ff3^000000 E Grade Coin:^0000ff10^000000 Can -> ^0000ff30^000000 E Grade Coin:^0000ff100^000000 Can -> ^0000ff300^000000 E Grade Coin:Exchange all I've got")) {
+ case 1:
+ mes "[Can Agency Guard]";
+ mes "Umm, I'm not here forever, so come to me if you'd like to exchange while I still am.";
+ close;
+ case 2:
+ set .@check,1;
+ set .@count,1;
+ break;
+ case 3:
+ set .@check,10;
+ set .@count,10;
+ break;
+ case 4:
+ set .@check,100;
+ set .@count,100;
+ break;
+ case 5:
+ set .@check,1;
+ set .@count,countitem(12633);
+ break;
+ }
+ if (countitem(12633) < .@check) {
+ if (.@check == 1) {
+ mes "[Can Agency Guard]";
+ mes "Umm? I cannot see the ^0000ffMalangdo Cat Can^000000 from you. Don't forget to bring it to me if you've found out...";
+ close;
+ } else {
+ mes "[Can Agency Guard]";
+ mes "Umm? I don't think you have enough to exchange... Come to me again when the amount is exactly decided.";
+ close;
+ }
+ }
+ delitem 12633,.@count; //Malang_Cat_Can
+ getitem 6422,.@count*3; //Egrade_Coin
+ mes "[Can Agency Guard]";
+ mes "Exchanged "+.@count+" Malangdo Cat Can to "+(.@count*3)+" E Class Coin. Check it out.";
+ close;
+}
+
+function script F_mal_coin {
+
+// Initial dialogue and checks:
+// -- callfunc "F_mal_coin",0,"[<NPC Name>]",<NPC ID>;
+ if (getarg(0) == 0) {
+ if (getarg(2) != 2 && BaseLevel < 50) {
+ mes getarg(1);
+ mes "Ahaaa~";
+ mes "If you want to buy this stuff,";
+ mes "you can talk to me";
+ mes "when you grow up little more.";
+ mes "This stuff is too expensive";
+ mes "for a child~";
+ close;
+ }
+ mes getarg(1);
+ mes "Nice to meet you~~";
+ mes "I am! YES~~ That's right!";
+ mes "I'm selling special stuff";
+ mes "which you can see only here on Meow Meow Island!";
+ next;
+ mes getarg(1);
+ mes "How about it? What are you waiting for?";
+ mes "Why don't you take a look at";
+ mes "what kinds of stuff I have?";
+ next;
+ switch(getarg(2)) {
+ case 1:
+ mes "[Wandering Merchant]";
+ mes "Oh~";
+ mes "These are rental items, so make sure you know if you have the ^0000FF1 hour^000000 or ^0000FF7 day^000000 version.";
+ next;
+ break;
+ case 2:
+ break;
+ case 3:
+ mes "[Roving Merchant]";
+ mes "Just for your information,";
+ mes "Sow Bug, Starfish, Dried Squid, and Flying Fish are the items which you can use for 1 hour.";
+ next;
+ break;
+ }
+ mes getarg(1);
+ mes "Well then, do you want to take a look at what I have now?";
+ next;
+ switch(select("Yes:No")) {
+ case 1:
+ if (checkweight(1201,1) == 0) {
+ mes getarg(1);
+ mes "It seems that there are too many items in your inventory.";
+ mes "Please make space and come back again~";
+ close;
+ }
+ if (MaxWeight - Weight < 2500) {
+ mes getarg(1);
+ mes "It seems that you're overweight.";
+ mes "Please reduce your weight and come back again~";
+ close;
+ }
+ mes getarg(1);
+ mes "Well, take a good look at them~~~";
+ next;
+ return;
+ case 2:
+ mes getarg(1);
+ mes "Well, then. I'll see you next time.";
+ mes "Goodbye.";
+ close;
+ }
+ }
+
+// Exchange function:
+// -- callfunc "F_mal_coin",1,"[<NPC Name>]","<Display Name>",<Item ID>,<Egrade_Coin>,<Malang_Sp_Can>,<Silvervine>
+ if (getarg(0) == 1) {
+ mes getarg(1);
+ mes "The price of ^0000FF["+getarg(2)+"]^000000 is";
+ if (getarg(4) && getarg(5)) { // Type 1: Egrade_Coin or Malang_Sp_Can
+ mes getarg(4)+" E Grade Coin or "+getarg(5)+" Malangdo Canned Specialties.";
+ set .@type,1;
+ set .@menu$,"Yes.:No, I'll purchase with cans.:I don't want to purchase any.";
+ } else if (getarg(5)) { // Type 2: Malang_Sp_Can only
+ mes getarg(5)+" Malangdo Canned Specialties.";
+ set .@type,2;
+ set .@menu$,"Yes.::No.";
+ } else { // Type 3: Silvervine only
+ mes getarg(6)+" Silvervine Fruit.";
+ set .@type,3;
+ set .@menu$,"Yes.::I don't want to purchase any.";
+ }
+ next;
+ mes getarg(1);
+ if (.@type == 1) {
+ mes "Would you like to purchase";
+ mes "^0000FF["+getarg(2)+"]^000000 with E Grade Coins?";
+ } else {
+ mes "Would you like to";
+ mes "purchase ^0000FF["+getarg(2)+"]^000000?";
+ }
+ next;
+ switch(select(.@menu$)) {
+ case 2:
+ set .@type,2;
+ case 1:
+ switch(.@type) {
+ case 1:
+ set .@item,6422; //Egrade_Coin
+ set .@amount,getarg(4);
+ set .@str$,"coins";
+ break;
+ case 2:
+ set .@item,12636; //Malang_Sp_Can
+ set .@amount,getarg(5);
+ set .@str$,"cans";
+ break;
+ case 3:
+ set .@item,6417; //Silvervine
+ set .@amount,getarg(6);
+ set .@str$,"Silvervine Fruit";
+ break;
+ }
+ if (countitem(.@item) < .@amount) {
+ mes getarg(1);
+ mes "I'm sorry, you need more "+.@str$+".";
+ close;
+ }
+ if (MaxWeight - Weight < getiteminfo(getarg(3),6)) {
+ mes getarg(1);
+ mes "Sorry, you've purchased too many.";
+ mes "You need to make more space in your inventory. Please come back later.";
+ close;
+ }
+ mes getarg(1);
+ mes "Thank you.";
+ delitem .@item,.@amount;
+ getitem getarg(3),1;
+ return;
+ case 3:
+ mes getarg(1);
+ mes "Always be careful";
+ mes "when you purchase items.";
+ close;
+ }
+ }
+}
+malangdo,162,146,5 script Wandering Merchant#mal 495,{
+ callfunc "F_mal_coin",0,"[Wandering Merchant]",1;
+ setarray .@items[1],
+ 16743,16747,16741,16745,16749,16751, // 1 hour items.
+ 16742,16744,16746,16748,16752,16750; // 7 day items.
+ setarray .@names$[1],
+ "Spearfish","Tuna","Hairtail","Saurel","Malang Snow Crab","Brindle Eel",
+ "Hairtail (7Days)","Spearfish (7Days)","Saurel (7Days)","Tuna (7Days)","Brindle Eel (7Days)","Malang Snow Crab (7Days)";
+ while(1) {
+ set .@i, select(
+ "[Spearfish(1hr)] 8 E-Coins/50 Cans",
+ "[Tuna(1hr)] 8 E-Coins/50 Cans",
+ "[Hairtail(1hr)] 8 E-Coins/50 Cans",
+ "[Saurel(1hr)] 8 E-Coins/50 Can",
+ "[Malang Snow Crab(1hr)] 8 E-Coins/50 Can",
+ "[Brindle Eel(1hr)] 8 E-Coins/50 Can",
+ "[Hairtail(7Days)] 10 Silvervine Fruit",
+ "[Spearfish(7Days)] 10 Silvervine Fruit",
+ "[Saurel(7Days)] 10 Silvervine Fruit",
+ "[Tuna(7Days)] 10 Silvervine Fruit",
+ "[Brindle Eel(7Days)] 10 Silvervine Fruit",
+ "[Malang Snow Crab(7Days)] 10 Silvervine Fruit",
+ "End purchasing."
+ );
+ if (.@i == 13) {
+ mes "[Wandering Merchant]";
+ mes "Well, then. I'll see you next time.";
+ mes "Goodbye.";
+ close;
+ }
+ mes "[Wandering Merchant]";
+ mes "Are you interested in ^0000FF["+.@names$[.@i]+"]^000000?";
+ switch(.@i) {
+ case 1: //Spearfish_Box1
+ case 8: //Spearfish_Box2
+ mes "This is... a fish that moves according to the season, very tasty!";
+ mes "But this is only a food that I'm talking about, yummy~";
+ next;
+ mes "[Wandering Merchant]";
+ mes "Of course, this is ^DC143CTwo-Handed Spear^000000.";
+ mes "It gives a high chance of";
+ mes "causing the Bleeding status";
+ mes "when you're using Pierce or Clashing Spiral~";
+ next;
+ mes "[Wandering Merchant]";
+ mes "More details are...";
+ mes "Increase 100% of Clashing Spiral ATK and 50% of Inspiration ATK,";
+ mes "additional ATK + 30 when Base Lv. is over 100.";
+ mes "Base ATK is 220.";
+ next;
+ break;
+ case 2: //Tuna_Box1
+ case 10: //Tuna_Box2
+ mes "This is a very popular fish";
+ mes "which is used in various dishes.";
+ mes "Swordman, Merchant, and Acolyte classes can use it";
+ mes "as a ^DC143CMace^000000.";
+ next;
+ mes "[Wandering Merchant]";
+ mes "It gives a high chance of executing the Stun or Auto-Spell Bash";
+ mes "when using close-range physical attacks.";
+ mes "Base ATK is 180.";
+ next;
+ mes "[Wandering Merchant]";
+ mes "More details are...";
+ mes "additional ATK + 20 when Base Lv. is over 100,";
+ mes "freeze self with low rate.";
+ next;
+ break;
+ case 3: //Hairtail_Box1
+ case 7: //Hairtail_Box2
+ mes "This fish looks like a long belt.";
+ next;
+ mes "[Wandering Merchant]";
+ mes "This is a ^DC143CTwo-Handed Sword^000000";
+ mes "which most swordmen can use.";
+ mes "It increases 50% of critical damage when attacking and CRI + 20.";
+ mes "Base ATK is 220.";
+ next;
+ mes "[Wandering Merchant]";
+ mes "More details are...";
+ mes "additional ATK + 50 when Base Lv. is over 100.";
+ next;
+ break;
+ case 4: //Saurel_Box1
+ case 9: //Saurel_Box2
+ mes "This is a ^DC143CDagger^000000 which gives MATK + 100";
+ mes "and ATK + 30 for 7sec at a certain rate with physical attacks.";
+ next;
+ mes "[Wandering Merchant]";
+ mes "More details are...";
+ mes "gives MATK + 20 for 7sec at a certain rate with magical attacks";
+ mes "and additional MATK + 10, ATK + 10 when Base Lv. is over 100.";
+ mes "Base ATK is 160.";
+ next;
+ break;
+ case 5: //Malang_Crab_Box1
+ case 12: //Malang_Crab_Box2
+ mes "This is a ^DC143CBow^000000 which increases LUK + 3 and 50% of critical damage,";
+ mes "and increases 20% of long rage phyical ATK when Base Lv. is over 100.";
+ mes "Base ATK is 120.";
+ next;
+ mes "[Wandering Merchant]";
+ mes "More details are...";
+ mes "can be used by Archer, Thief, and Rogue classes.";
+ next;
+ break;
+ case 6: //Brindle_Eel_Box1
+ case 11: //Brindle_Eel_Box2
+ mes "This is a ^DC143CBow^000000.";
+ mes "Because it has elastic force,";
+ mes "we started to use it as a Bow.";
+ mes "Base ATK is 180.";
+ next;
+ mes "[Wandering Merchant]";
+ mes "More details are...";
+ mes "AGI + 3, and ASPD + 2 for 5sec at a certain rate with long range physical attacks.";
+ mes "Also gives additional 20% of long range physical ATK when Base Lv. is over 100.";
+ mes "Hunter, Bard, and Dancer classes can use it.";
+ next;
+ break;
+ }
+ if (.@i < 7)
+ setarray .@price[0],8,50,0; // 1 hour items cost 8 Egrade_Coin or 50 Malang_Sp_Can.
+ else
+ setarray .@price[0],0,0,10; // 7 day items cost 10 Silvervine.
+ callfunc "F_mal_coin",1,"[Wandering Merchant]",.@names$[.@i],.@items[.@i],.@price[0],.@price[1],.@price[2];
+ next;
+ }
+}
+
+malangdo,173,145,4 script Stinky Merchant 496,{
+ callfunc "F_mal_coin",0,"[Stinky Merchant]",2;
+ setarray .@items[1],2873,16015;
+ setarray .@names$[1],"Cat Hand Glove","Cat Club";
+ while(1) {
+ set .@i, select(
+ "[Cat Hand Glove] 32 E-Coins/200 Cans",
+ "[Cat Club] 32 E-Coins/200 Cans",
+ "End purchasing."
+ );
+ if (.@i == 3) {
+ mes "[Stinky Merchant]";
+ mes "Well, then. I'll see you next time.";
+ mes "Goodbye.";
+ close;
+ }
+ mes "[Stinky Merchant]";
+ mes "Are you interested in ^0000FF["+.@names$[.@i]+"]^000000?";
+ switch(.@i) {
+ case 1: //Cat_Hand_Glove
+ mes "This is a glove which can give happiness";
+ mes "just by wearing it.";
+ next;
+ mes "[Stinky Merchant]";
+ mes "This is an ^DC143CAccessory^000000";
+ mes "and its defense is 5.";
+ mes "It also gives";
+ mes "VIT + 1, AGI + 1, DEX + 1, LUK + 1.";
+ next;
+ mes "[Stinky Merchant]";
+ mes "More details are...";
+ mes "SLOT : 1 / Refine : Unable / Destruction : Unable";
+ next;
+ break;
+ case 2: //Cat_Club
+ mes "It looks like it wouldn't hurt, don't you think so?";
+ mes "But I'm telling you, it can hurt someone.";
+ next;
+ mes "[Stinky Merchant]";
+ mes "This is a ^DC143CMace^000000 that increases 15% of damage to the animal type of monster.";
+ mes "Base ATK is 88.";
+ mes "The other details are";
+ mes "Weapon Lv : 1 / SLOT : 3 / Refine : Able / Destruction : Unable";
+ next;
+ break;
+ }
+ callfunc "F_mal_coin",1,"[Stinky Merchant]",.@names$[.@i],.@items[.@i],32,200,0;
+ next;
+ }
+}
+
+malangdo,150,135,5 script Roving Merchant 495,{
+ callfunc "F_mal_coin",0,"[Roving Merchant]",3;
+ setarray .@items[1],12639,12637,12638,12640;
+ setarray .@names$[1],"Flying Fish","Sow Bug","Dried Squid","Starfish";
+ while(1) {
+ set .@i, select(
+ "[Flying Fish] 200 Cans",
+ "[Sow Bug] 200 Cans",
+ "[Dried Squid] 200 Cans",
+ "[Starfish] 200 Cans",
+ "End purchasing."
+ );
+ if (.@i == 5) {
+ mes "[Roving Merchant]";
+ mes "Well, then. I'll see you next time.";
+ mes "Goodbye.";
+ close;
+ }
+ mes "[Roving Merchant]";
+ mes "Are you interested in ^0000FF["+.@names$[.@i]+"]^000000?";
+ switch(.@i) {
+ case 1: //Flying_Fish_Box
+ mes "This is the one that flies";
+ mes "with a big pectoral.";
+ next;
+ mes "[Roving Merchant]";
+ mes "This is a ^DC143CThrowing Weapon^000000.";
+ mes "Of course, it can give fatal wounds to the enemy";
+ mes "at a certain rate when attacking.";
+ next;
+ mes "[Roving Merchant]";
+ mes "Its property is neutral and ATK is 50.";
+ next;
+ break;
+ case 2: //Gong_Bug_Pocket
+ mes "In that case, I'll explain for you.";
+ mes "This is a ^DC143CBullet^000000 which stuns the enemy at a certain rate when attacking.";
+ next;
+ mes "[Roving Merchant]";
+ mes "I feel somthing bad";
+ mes "is moving in my pocket but...";
+ mes "it is neutral property and its ATK is 50.";
+ next;
+ break;
+ case 3: //Dried_Squid_Box
+ mes "I'll explain about this item.";
+ mes "This is a ^DC143CThrowing Weapon^000000 which causes darkness at a certain rate.";
+ mes "It's neutral property and its ATK is 50.";
+ next;
+ mes "[Roving Merchant]";
+ mes "It is compressed";
+ mes "and put into a very small box,";
+ mes "so be careful when you open it.";
+ next;
+ break;
+ case 4: //Starfish_Box
+ mes "I'll explain about this item.";
+ mes "This is a ^DC143CThrowing Weapon^000000 which stuns the enemy at a certain rate.";
+ next;
+ mes "[Roving Merchant]";
+ mes "It is perfectly organized and packed";
+ mes "so you can't even see inside.";
+ mes "It is neutral property and its ATK is 110.";
+ next;
+ break;
+ }
+ mes "[Roving Merchant]";
+ mes "For your information,";
+ mes "one box contains";
+ mes "200 units.";
+ next;
+ callfunc "F_mal_coin",1,"[Roving Merchant]",.@names$[.@i],.@items[.@i],0,200,0;
+ next;
+ }
+}
diff --git a/npc/re/merchants/enchan_mal.txt b/npc/re/merchants/enchan_mal.txt
new file mode 100644
index 000000000..5caa70217
--- /dev/null
+++ b/npc/re/merchants/enchan_mal.txt
@@ -0,0 +1,641 @@
+//===== rAthena Script =======================================
+//= Malangdo Enchants
+//===== By: ==================================================
+//= Muad_Dib
+//===== Current Version: =====================================
+//= 1.0a
+//===== Compatible With: =====================================
+//= rAthena SVN
+//===== Description: =========================================
+//= [Official Conversion]
+//= Adds enchantments to many high level weapons in exchange
+//= for Malangdo coins.
+//===== Additional Comments: =================================
+//= 1.0 First Version. [Euphy]
+//= 1.0a Added 'delequip' command. [Euphy]
+//============================================================
+
+malangdo,213,167,4 script Mayomayo#mal 555,{
+ disable_items;
+ if (checkweight(1201,1) == 0) {
+ mes "You have too many kinds of objects. Let's try to continue after reducing those objects.";
+ close;
+ }
+ if (MaxWeight - Weight < 10000) {
+ mes "Can't continue because you have too many heavy objects. Let's try to continue after reducing the weight.";
+ close;
+ }
+ mes "[Mayomayo]";
+ mes "Wow welcome. It is new Mayomayo refinement store~ I enchant some luxury weapons including level 4 weapons.";
+ next;
+ switch(select("Any store policy is changes?:Enhance high ranked weapons:Reset reinforcement capability")) {
+ case 1:
+ mes "[Mayomayo]";
+ mes "When I enchanted weapons, the slotted cards or refined level sometimes dissipated. I hated it. However, one day I found how to do it without any extinction.";
+ next;
+ mes "[Mayomayo]";
+ mes "Have you ever seen a building of person of reinforcement capacity association?";
+ next;
+ if(select("I've seen it before.:I haven't seen it before.") == 2) {
+ mes "[Mayomayo]";
+ mes "That builiding is located to the southeast of where I am. Why don't you go on a field trip there?";
+ close;
+ }
+ mes "[Mayomayo]";
+ mes "If you go the place, there is someone who enchants the Archangel Wing. At that time that was amazing, because that was impossible ability by my own skill.";
+ next;
+ mes "[Mayomayo]";
+ mes "Every night I became his butler and did odd jobs. That is how I learned to enchant.";
+ next;
+ mes "[Mayomayo]";
+ mes "Several rules are changed. Well, you better have experience.";
+ close;
+ case 2:
+ set @mal_enchant_select,1;
+ break;
+ case 3:
+ set @mal_enchant_select,2;
+ break;
+ }
+
+ if (!getequipisequiped(EQI_HAND_R)) {
+ mes "[Mayomayo]";
+ mes "Did you take off your equipment?";
+ set @mal_enchant_select,0;
+ close;
+ }
+ set @mal_equip_id, getequipid(EQI_HAND_R);
+ set .@equip_type, getiteminfo(@mal_equip_id,11);
+
+ //callsub L_Socket,<cost multiplier>,<type>;
+ switch(.@equip_type) { // Check weapon type first to speed up the checks.
+ case 1: // Daggers
+ switch(@mal_equip_id) {
+ case 1224: callsub L_Socket,1,2; //Sword_Breaker
+ case 1225: callsub L_Socket,1,2; //Mail_Breaker
+ case 1227: callsub L_Socket,1,2; //Weeder_Knife
+ case 1229: callsub L_Socket,1,2; //Mama's_Knife
+ case 1232: callsub L_Socket,1,2; //Assasin_Dagger
+ case 1233: callsub L_Socket,1,2; //Exercise
+ case 1235: callsub L_Socket,1,2; //Azoth
+ case 1236: callsub L_Socket,1,2; //Sucsamad
+ case 1237: callsub L_Socket,1,2; //Grimtooth_
+ case 1240: callsub L_Socket,1,2; //Princess_Knife
+ case 1241: callsub L_Socket,1,2; //Cursed_Dagger
+ case 1242: callsub L_Socket,1,2; //Counter_Dagger
+ case 1244: callsub L_Socket,1,2; //Holy_Dagger
+ case 13046: callsub L_Socket,1,3; //Krieg
+ case 13047: callsub L_Socket,1,2; //Weihna
+ case 13061: callsub L_Socket,1,2; //Black_Wing
+ case 1223: callsub L_Socket,2,2; //Forturn_Sword
+ case 1228: callsub L_Socket,2,2; //Combat_Knife
+ case 1234: callsub L_Socket,2,2; //Moonlight_Sword
+ case 1230: callsub L_Socket,4,2; //House_Auger
+ case 1231: callsub L_Socket,4,2; //Bazerald
+ case 13062: callsub L_Socket,4,2; //Ancient_Dagger
+ }
+ break;
+ case 16: // Katars
+ switch(@mal_equip_id) {
+ case 1271: callsub L_Socket,1,2; //Blood_Tears
+ case 1263: callsub L_Socket,1,2; //Unholy_Touch
+ case 1270: callsub L_Socket,1,2; //Drill_Katar
+ case 1284: callsub L_Socket,1,2; //Krishna
+ case 1285: callsub L_Socket,1,2; //Cakram
+ case 1268: callsub L_Socket,2,2; //Wild_Beast_Claw
+ case 1269: callsub L_Socket,2,2; //Inverse_Scale
+ case 1265: callsub L_Socket,2,2; //Bloody_Roar
+ case 1261: callsub L_Socket,4,2; //Infiltrator
+ case 1266: callsub L_Socket,4,2; //Infiltrator_
+ }
+ break;
+ case 6: // 1-H Axes
+ switch(@mal_equip_id) {
+ case 1305: callsub L_Socket,1,2; //Cleaver
+ case 1311: callsub L_Socket,1,2; //Vecer_Axe
+ }
+ break;
+ case 7: // 2-H Axes
+ switch(@mal_equip_id) {
+ case 1364: callsub L_Socket,1,2; //Great_Axe
+ case 1365: callsub L_Socket,1,2; //Sabbath
+ case 1385: callsub L_Socket,1,2; //Bradium_Stonehammer
+ case 1367: callsub L_Socket,1,2; //Slaughter
+ case 1368: callsub L_Socket,1,2; //Tomahawk
+ case 1387: callsub L_Socket,2,2; //Giant_Axe
+ case 1369: callsub L_Socket,2,2; //Guillotine
+ case 1363: callsub L_Socket,2,2; //Brood_Axe
+ case 1376: callsub L_Socket,4,2; //Heart_Breaker
+ case 1377: callsub L_Socket,4,2; //Hurricane_Fury
+ case 1366: callsub L_Socket,4,2; //Right_Epsilon
+ case 1370: callsub L_Socket,4,2; //Doom_Slayer
+ case 1371: callsub L_Socket,4,2; //Doom_Slayer_
+ }
+ break;
+ case 2: // 1-H Swords
+ switch(@mal_equip_id) {
+ case 1131: callsub L_Socket,1,2; //Ice_Falchon
+ case 1133: callsub L_Socket,1,2; //Fire_Brand
+ case 1134: callsub L_Socket,1,2; //Scissores_Sword
+ case 1135: callsub L_Socket,1,2; //Cutlas
+ case 1136: callsub L_Socket,1,2; //Solar_Sword
+ case 1138: callsub L_Socket,1,2; //Mysteltainn_
+ case 1139: callsub L_Socket,1,2; //Tale_Fing_
+ case 1140: callsub L_Socket,1,2; //Byeorrun_Gum
+ case 1141: callsub L_Socket,1,2; //Immaterial_Sword
+ case 1148: callsub L_Socket,1,2; //Star_Dust_Blade
+ case 13421: callsub L_Socket,1,2; //Ruber
+ case 13431: callsub L_Socket,2,2; //Chrome_Sword
+ case 1137: callsub L_Socket,2,2; //Excalibur
+ case 1130: callsub L_Socket,2,2; //Nagan
+ case 1132: callsub L_Socket,4,2; //Edge
+ }
+ break;
+ case 3: // 2-H Swords
+ switch(@mal_equip_id) {
+ case 1164: callsub L_Socket,1,2; //Muramasa
+ case 1166: callsub L_Socket,1,2; //Dragon_Slayer
+ case 1167: callsub L_Socket,1,2; //Schweizersabel
+ case 1168: callsub L_Socket,1,2; //Zweihander
+ case 1170: callsub L_Socket,1,2; //Katzbalger
+ case 1171: callsub L_Socket,1,2; //Zweihander_
+ case 1176: callsub L_Socket,1,2; //Muscle_Cutter
+ case 1178: callsub L_Socket,1,2; //Schweizersabel_
+ case 1180: callsub L_Socket,1,2; //Dragon_Slayer_
+ case 1181: callsub L_Socket,1,2; //Tae_Goo_Lyeon
+ case 1182: callsub L_Socket,1,2; //Bloody_Eater
+ case 1188: callsub L_Socket,1,2; //Veteran_Sword
+ case 1189: callsub L_Socket,1,3; //Krasnaya
+ case 1196: callsub L_Socket,2,2; //Chrome_Twohand_Sword
+ case 1165: callsub L_Socket,2,2; //Masamune
+ case 1169: callsub L_Socket,2,2; //Executioner_
+ case 1179: callsub L_Socket,2,2; //Executioner__
+ case 1175: callsub L_Socket,2,2; //Altas_Weapon
+ case 1185: callsub L_Socket,4,2; //Violet_Fear
+ case 1186: callsub L_Socket,4,2; //Death_Guidance
+ }
+ break;
+ case 4: // 1-H Spears
+ switch(@mal_equip_id) {
+ case 1420: callsub L_Socket,1,2; //Long_Horn
+ case 1413: callsub L_Socket,1,2; //Gungnir
+ case 1414: callsub L_Socket,1,2; //Gelerdria
+ case 1416: callsub L_Socket,1,2; //Tjungkuletti
+ case 1418: callsub L_Socket,1,2; //Gungnir_
+ case 1433: callsub L_Socket,2,2; //Imperial_Spear
+ case 1415: callsub L_Socket,2,2; //Skewer
+ case 1421: callsub L_Socket,2,2; //Battle_Hook
+ case 1422: callsub L_Socket,4,2; //Hunting_Spear
+ }
+ break;
+ case 5: // 2-H Spears
+ switch(@mal_equip_id) {
+ case 1466: callsub L_Socket,1,2; //Crescent_Scythe
+ case 1467: callsub L_Socket,1,2; //Bill_Guisarme
+ case 1468: callsub L_Socket,1,2; //Zephyrus
+ case 1469: callsub L_Socket,1,2; //Longinus's_Spear
+ case 1470: callsub L_Socket,1,2; //Brionac
+ case 1471: callsub L_Socket,1,2; //Hell_Fire
+ case 1474: callsub L_Socket,1,2; //Gae_Bolg
+ case 1477: callsub L_Socket,1,2; //Spectral_Spear
+ case 1478: callsub L_Socket,1,2; //Ahlspiess
+ case 1479: callsub L_Socket,1,2; //Spectral_Spear_
+ case 1480: callsub L_Socket,1,2; //Gae_Bolg_
+ case 1481: callsub L_Socket,1,3; //Zephyrus_
+ case 1484: callsub L_Socket,2,2; //Cardo
+ }
+ break;
+ case 10: // Staves
+ switch(@mal_equip_id) {
+ case 1616: callsub L_Socket,1,2; //Staff_Of_Wing
+ case 1629: callsub L_Socket,1,2; //Walking_Stick
+ case 1631: callsub L_Socket,1,2; //Holy_Stick
+ case 1643: callsub L_Socket,1,2; //Dead_Tree_Cane
+ case 1654: callsub L_Socket,1,2; //Mental_Stick
+ case 1636: callsub L_Socket,2,2; //Thorn_Staff
+ case 1637: callsub L_Socket,2,2; //Eraser
+ case 1473: callsub L_Socket,1,2; //Wizardy_Staff
+ }
+ break;
+ case 23: // New 2-H Staves
+ switch(@mal_equip_id) {
+ case 2004: callsub L_Socket,1,2; //Kronos
+ case 2005: callsub L_Socket,1,2; //Dea_Staff
+ case 2001: callsub L_Socket,2,2; //Divine_Cross
+ case 2000: callsub L_Socket,4,2; //Destruction_Rod
+ }
+ break;
+ case 8: // Maces
+ switch(@mal_equip_id) {
+ case 1524: callsub L_Socket,1,2; //Golden_Mace
+ case 1525: callsub L_Socket,1,2; //Long_Mace
+ case 1527: callsub L_Socket,1,2; //Quadrille
+ case 1539: callsub L_Socket,1,2; //Golden_Mace_
+ case 1541: callsub L_Socket,1,2; //Nemesis
+ case 16000: callsub L_Socket,1,2; //Erde
+ case 16001: callsub L_Socket,1,2; //Red_Square_Bag
+ case 16010: callsub L_Socket,1,2; //Red_Ether_Bag
+ case 1523: callsub L_Socket,2,2; //Spike
+ case 1538: callsub L_Socket,2,2; //Spike_
+ case 1526: callsub L_Socket,2,2; //Slash
+ case 1528: callsub L_Socket,4,2; //Grand_Cross
+ case 1540: callsub L_Socket,4,2; //Grand_Cross_
+ }
+ break;
+ case 15: // Books
+ switch(@mal_equip_id) {
+ case 1557: callsub L_Socket,1,2; //Book_Of_The_Apocalypse
+ case 1558: callsub L_Socket,1,2; //Girl's_Diary
+ case 1559: callsub L_Socket,1,2; //Legacy_Of_Dragon
+ case 1561: callsub L_Socket,1,2; //Hardback
+ case 1562: callsub L_Socket,1,2; //Bible_Of_Battlefield
+ case 1565: callsub L_Socket,4,2; //Death_Note
+ }
+ break;
+ case 12: // Knuckles
+ switch(@mal_equip_id) {
+ case 1813: callsub L_Socket,1,2; //Kaiser_Knuckle
+ case 1814: callsub L_Socket,1,2; //Berserk
+ case 1815: callsub L_Socket,1,2; //Claw_Of_Garm
+ case 1816: callsub L_Socket,1,2; //Berserk_
+ case 1830: callsub L_Socket,2,2; //Sura_Rampage
+ }
+ break;
+ case 11: // Bows
+ switch(@mal_equip_id) {
+ case 1719: callsub L_Socket,1,2; //Bow_Of_Roguemaster
+ case 1722: callsub L_Socket,1,2; //Balistar
+ case 1724: callsub L_Socket,1,2; //Dragon_Wing
+ case 1725: callsub L_Socket,1,2; //Bow_Of_Minstrel
+ case 1727: callsub L_Socket,1,2; //Balistar_
+ case 1737: callsub L_Socket,1,2; //Ixion_Wing
+ case 1740: callsub L_Socket,1,2; //Nepenthes_Bow
+ case 1741: callsub L_Socket,1,2; //Cursed_Lyre
+ case 1745: callsub L_Socket,1,2; //Falken_Blitz
+ case 18103: callsub L_Socket,1,2; //Mystic_Bow
+ case 1720: callsub L_Socket,2,2; //Bow_Of_Rudra
+ }
+ break;
+ case 13: // Musical Instruments
+ switch(@mal_equip_id) {
+ case 1913: callsub L_Socket,1,2; //Electronic_Guitar
+ case 1918: callsub L_Socket,1,2; //Oriental_Lute
+ case 1920: callsub L_Socket,1,2; //Berserk_Guitar
+ case 1922: callsub L_Socket,1,2; //Oriental_Lute_
+ case 1926: callsub L_Socket,1,2; //Harp_Of_Nepenthes
+ case 1930: callsub L_Socket,2,2; //Green_Whistle
+ }
+ break;
+ case 14: // Whips
+ switch(@mal_equip_id) {
+ case 1962: callsub L_Socket,1,2; //Lariat
+ case 1963: callsub L_Socket,1,2; //Rapture_Rose
+ case 1964: callsub L_Socket,1,2; //Chemeti
+ case 1969: callsub L_Socket,1,2; //Bladed_Whip
+ case 1970: callsub L_Socket,1,2; //Queen's_Whip
+ case 1972: callsub L_Socket,1,2; //Electric_Eel
+ case 1973: callsub L_Socket,1,2; //Sea_Witch_Foot
+ case 1974: callsub L_Socket,1,2; //Carrot_Whip
+ case 1976: callsub L_Socket,1,2; //Queen's_Whip_
+ case 1979: callsub L_Socket,1,2; //Stem_Of_Nepenthes
+ case 1984: callsub L_Socket,2,2; //Stem_Whip
+ case 1985: callsub L_Socket,4,2; //Rosebine
+ }
+ break;
+ }
+ mes "[Mayomayo]";
+ if (@mal_enchant_select == 1)
+ mes "This is not suitable equipment for the enchant. Don't forget we only take care of high class weapons, including level 4 weapons~";
+ else
+ mes "This equipment can not be initialized. Don't forget we only handle some luxury weapons, including level 4 weapons~";
+ set @mal_equip_id,0;
+ set @mal_enchant_select,0;
+ close;
+
+L_Socket:
+ set .@select, @mal_enchant_select;
+ set .@equip_id, @mal_equip_id;
+ set .@equip_name$, getitemname(.@equip_id)+((getitemslots(.@equip_id))?"["+getitemslots(.@equip_id)+"]":"");
+ set .@equip_refine, getequiprefinerycnt(EQI_HAND_R);
+ setarray .@equip_card[0], getequipcardid(EQI_HAND_R,0),getequipcardid(EQI_HAND_R,1),getequipcardid(EQI_HAND_R,2),getequipcardid(EQI_HAND_R,3);
+ set @mal_equip_id,0;
+ set @mal_enchant_select,0;
+
+ if (.@select == 1) {
+ mes "[Mayomayo]";
+ mes "^0000ff"+.@equip_name$+"^000000! Do you want to enchant this equipment? How will you pay for this?";
+ next;
+
+ setarray .@coin[0],6422,6421,6420,6419,6418,6423; // Payment ID
+ setarray .@cost[0], 15, 10, 6, 3, 2, 1; // Payment multiplier
+
+ set .@menu$, "Stop:";
+ for(set .@i,0; .@i<getarraysize(.@coin); set .@i,.@i+1) {
+ set .@count[.@i], countitem(.@coin[.@i]);
+ set .@total[.@i], getarg(0)*.@cost[.@i];
+ if (.@count[.@i] < .@total[.@i])
+ set .@menu$, .@menu$+"^999999"+getitemname(.@coin[.@i])+" (missing "+(.@total[.@i]-.@count[.@i])+")^000000:";
+ else
+ set .@menu$, .@menu$+getitemname(.@coin[.@i])+" (have "+.@count[.@i]+", need "+.@total[.@i]+"):";
+ }
+ set .@coin_select, select(.@menu$)-2;
+ if (.@coin_select == -1) {
+ mes "[Mayomayo]";
+ mes "Come back again if you change your mind.";
+ close;
+ } else if (.@count[.@coin_select] < .@total[.@coin_select]) {
+ mes "[Mayomayo]";
+ mes "You don't have enough coins. Do you want to check again?";
+ close;
+ }
+ switch(.@coin_select) {
+ case 0: //Egrade_Coin
+ set .@enchant_type,10;
+ break;
+ case 1: //Dgrade_Coin
+ set .@enchant_type,9;
+ break;
+ case 2: //Cgrade_Coin
+ set .@enchant_type,8;
+ break;
+ case 3: //Bgrade_Coin
+ set .@enchant_type,7;
+ break;
+ case 4: //Agrade_Coin
+ case 5: //Anger_Seagod
+ mes "[Mayomayo]";
+ mes "When you use the "+getitemname(.@coin[.@coin_select])+", you can choose the enchant type.";
+ next;
+ switch(select("Stop:Short Range Type:Long Range Type:Caster Type")) {
+ case 1:
+ mes "[Mayomayo]";
+ mes "Ok. If you change your mind, let me know.";
+ close;
+ case 2:
+ set .@enchant_type,((.@coin_select == 4)?4:1);
+ break;
+ case 3:
+ set .@enchant_type,((.@coin_select == 4)?5:2);
+ break;
+ case 4:
+ set .@enchant_type,((.@coin_select == 4)?6:3);
+ break;
+ }
+ break;
+ }
+ if (.@equip_card[3] == 0 && getarg(1) < 4) {
+ set .@socket,4;
+ set .@str$,"1st";
+ } else if (.@equip_card[2] == 0 && getarg(1) < 3) {
+ set .@socket,3;
+ set .@str$,"2nd";
+ } else {
+ mes "[Mayomayo]";
+ mes "This equipment is at the end of enchant. Please initialize the enchant and you will be able to enchant it again, or bring another weapon.";
+ close;
+ }
+ mes "[Mayomayo]";
+ mes "I'm trying for the "+.@str$+" enchant. ^ff0000It will not touch previous refinement and cards. Also, the equipment will not be destroyed.^000000 Can I continue?";
+ next;
+ if(select("I'll come back later.:Please, continue.") == 1) {
+ mes "[Mayomayo]";
+ mes "Ok. If you change your mind, come back again.";
+ close;
+ }
+ switch(.@enchant_type) {
+ case 10: //Egrade_Coin
+ set .@i, rand(1,531);
+ if (.@i < 101) set .@enchant,4787; //Mdef4
+ else if (.@i < 201) set .@enchant,4792; //Def6
+ else if (.@i < 301) set .@enchant,4801; //SP100
+ else if (.@i < 351) set .@enchant,4795; //HP100
+ else if (.@i < 401) set .@enchant,4796; //HP200
+ else if (.@i < 451) set .@enchant,4819; //Atk1
+ else if (.@i < 476) set .@enchant,4720; //Dexterity1
+ else if (.@i < 501) set .@enchant,4740; //Vitality1
+ else if (.@i < 526) set .@enchant,4750; //Luck1
+ else if (.@i < 528) set .@enchant,4700; //Strength1
+ else if (.@i < 530) set .@enchant,4730; //Agility1
+ else if (.@i < 532) set .@enchant,4710; //Inteligence1
+ else set .@enchant,9;
+ break;
+ case 9: //Dgrade_Coin
+ set .@i, rand(1,531);
+ if (.@i < 101) set .@enchant,4795; //HP100
+ else if (.@i < 201) set .@enchant,4796; //HP200
+ else if (.@i < 301) set .@enchant,4819; //Atk1
+ else if (.@i < 351) set .@enchant,4720; //Dexterity1
+ else if (.@i < 401) set .@enchant,4740; //Vitality1
+ else if (.@i < 451) set .@enchant,4750; //Luck1
+ else if (.@i < 476) set .@enchant,4700; //Strength1
+ else if (.@i < 501) set .@enchant,4730; //Agility1
+ else if (.@i < 526) set .@enchant,4710; //Inteligence1
+ else if (.@i < 528) set .@enchant,4701; //Strength2
+ else if (.@i < 530) set .@enchant,4731; //Agility2
+ else if (.@i < 532) set .@enchant,4711; //Inteligence2
+ else set .@enchant,9;
+ break;
+ case 8: //Cgrade_Coin
+ set .@i, rand(1,531);
+ if (.@i < 101) set .@enchant,4720; //Dexterity1
+ else if (.@i < 201) set .@enchant,4740; //Vitality1
+ else if (.@i < 301) set .@enchant,4750; //Luck1
+ else if (.@i < 351) set .@enchant,4700; //Strength1
+ else if (.@i < 401) set .@enchant,4730; //Agility1
+ else if (.@i < 451) set .@enchant,4710; //Inteligence1
+ else if (.@i < 476) set .@enchant,4701; //Strength2
+ else if (.@i < 501) set .@enchant,4731; //Agility2
+ else if (.@i < 526) set .@enchant,4711; //Inteligence2
+ else if (.@i < 528) set .@enchant,4702; //Strength3
+ else if (.@i < 530) set .@enchant,4732; //Agility3
+ else if (.@i < 532) set .@enchant,4712; //Inteligence3
+ else set .@enchant,9;
+ break;
+ case 7: //Bgrade_Coin
+ set .@i, rand(1,531);
+ if (.@i < 101) set .@enchant,4700; //Strength1
+ else if (.@i < 201) set .@enchant,4730; //Agility1
+ else if (.@i < 301) set .@enchant,4710; //Inteligence1
+ else if (.@i < 351) set .@enchant,4701; //Strength2
+ else if (.@i < 401) set .@enchant,4731; //Agility2
+ else if (.@i < 451) set .@enchant,4711; //Inteligence2
+ else if (.@i < 476) set .@enchant,4702; //Strength3
+ else if (.@i < 501) set .@enchant,4732; //Agility3
+ else if (.@i < 526) set .@enchant,4712; //Inteligence3
+ else if (.@i < 528) set .@enchant,4703; //Strength4
+ else if (.@i < 530) set .@enchant,4733; //Agility4
+ else if (.@i < 532) set .@enchant,4713; //Inteligence4
+ else set .@enchant,9;
+ break;
+ case 6: //Agrade_Coin - Caster
+ set .@i, rand(1,555);
+ if (.@i < 81) set .@enchant,4711; //Inteligence2
+ else if (.@i < 161) set .@enchant,4721; //Dexterity2
+ else if (.@i < 241) set .@enchant,4814; //Spell2
+ else if (.@i < 311) set .@enchant,4712; //Inteligence3
+ else if (.@i < 371) set .@enchant,4722; //Dexterity3
+ else if (.@i < 431) set .@enchant,4813; //Spell3
+ else if (.@i < 476) set .@enchant,4713; //Inteligence4
+ else if (.@i < 516) set .@enchant,4812; //Spell4
+ else if (.@i < 526) set .@enchant,4760; //Matk1
+ else if (.@i < 546) set .@enchant,4714; //Inteligence5
+ else if (.@i < 551) set .@enchant,4826; //Spell5
+ else if (.@i < 556) set .@enchant,4761; //Matk2
+ else set .@enchant,9;
+ break;
+ case 5: //Agrade_Coin - Long Range
+ set .@i, rand(1,555);
+ if (.@i < 81) set .@enchant,4731; //Agility2
+ else if (.@i < 161) set .@enchant,4833; //Expert_Archer2
+ else if (.@i < 241) set .@enchant,4817; //Sharp2
+ else if (.@i < 311) set .@enchant,4732; //Agility3
+ else if (.@i < 371) set .@enchant,4834; //Expert_Archer3
+ else if (.@i < 431) set .@enchant,4816; //Sharp3
+ else if (.@i < 476) set .@enchant,4733; //Agility4
+ else if (.@i < 516) set .@enchant,4835; //Expert_Archer4
+ else if (.@i < 526) set .@enchant,4807; //Atk_Speed1
+ else if (.@i < 546) set .@enchant,4734; //Agility5
+ else if (.@i < 551) set .@enchant,4836; //Expert_Archer5
+ else if (.@i < 556) set .@enchant,4807; //Atk_Speed1
+ else set .@enchant,9;
+ break;
+ case 4: //Agrade_Coin - Short Range
+ set .@i, rand(1,555);
+ if (.@i < 81) set .@enchant,4731; //Agility2
+ else if (.@i < 161) set .@enchant,4808; //Fighting_Spirit4
+ else if (.@i < 241) set .@enchant,4817; //Sharp2
+ else if (.@i < 311) set .@enchant,4732; //Agility3
+ else if (.@i < 371) set .@enchant,4820; //Fighting_Spirit5
+ else if (.@i < 431) set .@enchant,4816; //Sharp3
+ else if (.@i < 476) set .@enchant,4733; //Agility4
+ else if (.@i < 516) set .@enchant,4821; //Fighting_Spirit6
+ else if (.@i < 526) set .@enchant,4807; //Atk_Speed1
+ else if (.@i < 546) set .@enchant,4734; //Agility5
+ else if (.@i < 551) set .@enchant,4822; //Fighting_Spirit7
+ else if (.@i < 556) set .@enchant,4807; //Atk_Speed1
+ else set .@enchant,9;
+ break;
+ case 3: //Anger_Seagod - Caster
+ set .@i, rand(1,555);
+ if (.@i < 81) set .@enchant,4712; //Inteligence3
+ else if (.@i < 161) set .@enchant,4722; //Dexterity3
+ else if (.@i < 241) set .@enchant,4813; //Spell3
+ else if (.@i < 311) set .@enchant,4713; //Inteligence4
+ else if (.@i < 371) set .@enchant,4812; //Spell4
+ else if (.@i < 431) set .@enchant,4760; //Matk1
+ else if (.@i < 476) set .@enchant,4714; //Inteligence5
+ else if (.@i < 516) set .@enchant,4826; //Spell5
+ else if (.@i < 526) set .@enchant,4761; //Matk2
+ else if (.@i < 546) set .@enchant,4715; //Inteligence6
+ else if (.@i < 551) set .@enchant,4827; //Spell6
+ else if (.@i < 556) set .@enchant,4761; //Matk2
+ else set .@enchant,9;
+ break;
+ case 2: //Anger_Seagod - Long Range
+ set .@i, rand(1,555);
+ if (.@i < 81) set .@enchant,4732; //Agility3
+ else if (.@i < 161) set .@enchant,4834; //Expert_Archer3
+ else if (.@i < 241) set .@enchant,4843; //Sharp4
+ else if (.@i < 311) set .@enchant,4733; //Agility4
+ else if (.@i < 371) set .@enchant,4835; //Expert_Archer4
+ else if (.@i < 431) set .@enchant,4844; //Sharp5
+ else if (.@i < 476) set .@enchant,4734; //Agility5
+ else if (.@i < 516) set .@enchant,4836; //Expert_Archer5
+ else if (.@i < 526) set .@enchant,4807; //Atk_Speed1
+ else if (.@i < 546) set .@enchant,4735; //Agility6
+ else if (.@i < 551) set .@enchant,4837; //Expert_Archer6
+ else if (.@i < 556) set .@enchant,4807; //Atk_Speed1
+ else set .@enchant,9;
+ break;
+ case 1: //Anger_Seagod - Short Range
+ set .@i, rand(1,555);
+ if (.@i < 81) set .@enchant,4732; //Agility3
+ else if (.@i < 161) set .@enchant,4820; //Fighting_Spirit5
+ else if (.@i < 241) set .@enchant,4843; //Sharp4
+ else if (.@i < 311) set .@enchant,4733; //Agility4
+ else if (.@i < 371) set .@enchant,4821; //Fighting_Spirit6
+ else if (.@i < 431) set .@enchant,4844; //Sharp5
+ else if (.@i < 476) set .@enchant,4734; //Agility5
+ else if (.@i < 516) set .@enchant,4822; //Fighting_Spirit7
+ else if (.@i < 526) set .@enchant,4807; //Atk_Speed1
+ else if (.@i < 546) set .@enchant,4735; //Agility6
+ else if (.@i < 551) set .@enchant,4823; //Fighting_Spirit8
+ else if (.@i < 556) set .@enchant,4807; //Atk_Speed1
+ else set .@enchant,9;
+ break;
+ default:
+ mes "[Mayomayo]";
+ mes "There is something wrong. Please try again.";
+ close;
+ }
+ if (.@equip_card[3] == 0 && getarg(1) < 4) set .@equip_card[3],.@enchant;
+ else if (.@equip_card[2] == 0 && getarg(1) < 3) set .@equip_card[2],.@enchant;
+ else if (.@equip_card[1] == 0 && getarg(1) < 2) set .@equip_card[1],.@enchant;
+ else if (.@equip_card[0] == 0 && getarg(1) < 1) set .@equip_card[0],.@enchant;
+ else {
+ mes "[Mayomayo]";
+ mes "This equipment is at the end of enchant. I provide enchant for two times maximum.";
+ next;
+ mes "[Mayomayo]";
+ mes "Surely I don't enchant at card socket, therefore weapons that have 3 slots can be enchanted only 1 time. Don't forget this~";
+ close;
+ }
+ if (.@enchant == 9) { // Should never happen.
+ specialeffect2 EF_SUI_EXPLOSION;
+ mes "[Mayomayo]";
+ mes "Oh my god!";
+ mes "This equipment is destroyed because it could not endure powerful ability. I'm so sorry.";
+ delitem .@coin[.@coin_select],.@total[.@coin_select];
+ delequip EQI_HAND_R;
+ close;
+ }
+ specialeffect2 EF_REPAIRWEAPON;
+ mes "[Mayomayo]";
+ mes "I have enchanted ^990000slot "+.@socket+"^000000 of this equipment.";
+ delitem .@coin[.@coin_select],.@total[.@coin_select];
+ delequip EQI_HAND_R;
+
+// GetNonSlotItemSock2 .@equip_refine .@equip_id .@equip_card[0] .@equip_card[1] .@equip_card[2] .@equip_card[3]
+ getitem2 .@equip_id,1,1,.@equip_refine,0,.@equip_card[0],.@equip_card[1],.@equip_card[2],.@equip_card[3];
+
+ close;
+ } else if (.@select == 2) {
+ mes "[Mayomayo]";
+ mes "I will only initialize the enchant effect without touching previous refined level and cards.";
+ next;
+ if(select("Stop:Continue") == 1) {
+ mes "[Mayomayo]";
+ mes "If you change your mind, come back anytime.";
+ close;
+ }
+ if (countitem(6417) == 0) {
+ mes "[Mayomayo]";
+ mes "I'm sorry. You don't have Silvervine Fruit. Please check your inventory again?";
+ close;
+ }
+ if (!getequipisequiped(EQI_HAND_R)) {
+ mes "[Mayomayo]";
+ mes "Did you take off the equipment?";
+ close;
+ }
+ if (.@equip_card[3] == 0) {
+ mes "[Mayomayo]";
+ mes "This equipment has nothing to initialize. Please check again.";
+ close;
+ }
+ specialeffect2 EF_REPAIRWEAPON;
+ mes "[Mayomayo]";
+ mes "Initialize the enchant effect from the equipment.";
+ delitem 6417,1; //Silvervine
+ delequip EQI_HAND_R;
+
+// GetNonSlotItemSock2 .@equip_refine .@equip_id .@equip_card[0] .@equip_card[1] .@equip_card[2] .@equip_card[3]
+ for(set .@i,0; .@i<4; set .@i,.@i+1) {
+ if (.@equip_card[.@i] >= 4700) // Armor Enchant System
+ set .@equip_card[.@i],0;
+ }
+ getitem2 .@equip_id,1,1,.@equip_refine,0,.@equip_card[0],.@equip_card[1],.@equip_card[2],.@equip_card[3];
+
+ close;
+ }
+}
diff --git a/npc/re/merchants/refine.txt b/npc/re/merchants/refine.txt
index 70e666f82..4b02e0d22 100644
--- a/npc/re/merchants/refine.txt
+++ b/npc/re/merchants/refine.txt
@@ -1,15 +1,16 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Renewal Refining NPCs
//===== By: ==================================================
//= rAthena Dev Team
//===== Current Version: =====================================
-//= 1.0
+//= 1.0a
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Renewal-specific refining NPCs and material merchants.
//===== Additional Comments: =================================
//= 1.0 Moved some scripts to Renewal file, optimized "Austry" NPC. [Euphy]
+//= 1.0a Added 'disable_items' command. [Euphy]
//============================================================
// +11 and above Refiners
@@ -41,6 +42,7 @@ payon_in01,18,132,3 script Bestry#pay 826,{
//= function call. Otherwise, the chance in refine_db.txt is used.
//============================================================
function script refinenew {
+ disable_items;
mes "["+ getarg(0) +"]";
mes "I am the best Blacksmith ever!";
mes "I don't work with normal, boring items.";
diff --git a/npc/re/merchants/renters.txt b/npc/re/merchants/renters.txt
index 0ac62a476..5152fe102 100644
--- a/npc/re/merchants/renters.txt
+++ b/npc/re/merchants/renters.txt
@@ -1,11 +1,9 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Renters
//===== By: ==================================================
//= rAthena Dev Team
//===== Current Version: =====================================
//= 2.1
-//===== Compatible With: =====================================
-//= rAthena SVN
//===== Description: =========================================
//= Renewal-specific breeder NPCs.
//===== Additional Comments: =================================
diff --git a/npc/re/merchants/shops.txt b/npc/re/merchants/shops.txt
index a6f64174d..35b1baf95 100644
--- a/npc/re/merchants/shops.txt
+++ b/npc/re/merchants/shops.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Shops
//===== By: ==================================================
//= rAthena Dev Team
//===== Current Version: =====================================
-//= 1.3
+//= 1.5
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Renewal-specific town shop NPCs.
//===== Additional Comments: =================================
@@ -13,6 +13,9 @@
//= 1.1 Added Dicastes merchants. [Joseph]
//= 1.2 Moved more shops to Renewal file. [Euphy]
//= 1.3 Added Malangdo tool dealer. [Euphy]
+//= 1.4 Moved Izlude merchants. [Streusel]
+//= 1.5 Added Dewata merchants. [Lemongrass]
+//= 1.6 Added Mora and Porta Malaya merchants. [Euphy]
//============================================================
//=======================================================
@@ -22,6 +25,14 @@ comodo,106,213,5 shop Tropic Fruit Dealer 724,6258:-1
comodo,196,162,3 shop Harive#candy 479,11513:-1,6144:-1
//=======================================================
+// Dewata
+//=======================================================
+dewata,218,164,4 shop Weapon Dealer 536,1207:-1,1216:-1,1107:-1,1122:-1,1116:-1,1154:-1,1407:-1,1457:-1,1354:-1,1519:-1
+dewata,182,164,6 shop Tool Dealer 536,611:-1,1750:-1,501:-1,502:-1,503:-1,504:-1,645:-1,656:-1,601:-1,602:-1,1065:-1,2239:-1,713:-1
+dewata,145,267,6 shop Fruit Gardener 535,512:-1,513:-1,515:-1,516:-1,535:-1
+dewata,158,182,6 shop Armor Dealer 536,2211:-1,2401:-1,2403:-1,2501:-1,2503:-1,2101:-1,2103:-1,2305:-1,2321:-1,2332:-1,2328:-1,2627:-1
+
+//=======================================================
// Einbroch
//=======================================================
einbroch,122,250,4 shop Black Marketeer#ein 49,2139:-1,2800:-1,2801:-1,2802:-1,2803:-1,2804:-1,2805:-1,2806:-1,2807:-1,18000:-1,18001:-1,18002:-1,18003:-1,18004:-1,12392:-1,12393:-1,12394:-1,6145:-1,6146:-1,6147:-1,6186:-1,2808:-1
@@ -35,10 +46,12 @@ dicastes01,207,200,6 shop Points Merchant#dic 66,6360:-1,6361:-1,6362:-1,6363:-1
//=======================================================
// Izlude
//=======================================================
-izlude,97,146,0 shop Butcher#iz 54,517:-1
+izlude,160,186,0 shop Butcher#iz 54,517:-1
izlude,124,165,4 shop Fruit Gardener#iz 53,512:-1,513:-1,515:-1,516:-1
-izlude,95,145,6 shop Vendor from Milk Ranch#i 90,519:-1
-izlude,174,164,4 shop Pet Groomer#iz 124,537:-1,643:-1,10013:-1,10014:-1,554:-1,6113:-1,6114:-1,6115:-1
+izlude,128,158,6 shop Vendor from Milk Ranch#i 90,519:-1
+izlude_in,72,98,3 shop Pet Groomer#iz 124,537:-1,643:-1,10013:-1,10014:-1,554:-1,6113:-1,6114:-1,6115:-1
+izlude_in,57,109,0 shop Tool Dealer#iz 47,611:-1,501:-1,502:-1,503:-1,504:-1,506:-1,645:-1,656:-1,601:-1,602:-1,1065:-1,1750:-1
+izlude_in,72,110,3 shop Trading Merchant#iz 900,13200:-1,13201:-1,13202:-1,13150:-1,13102:-1,13151:-1,13154:-1,13155:-1,13163:-1,13165:-1,13168:-1
//=======================================================
// Juno
@@ -58,6 +71,12 @@ s_atelier,15,65,5 shop Part-Timer#sc_lgt 89,6123:-1,6120:-1
malangdo,232,163,5 shop Tool Dealer Myo 560,611:-1,1750:-1,645:-1,656:-1,601:-1,602:-1,1065:-1,713:-1
//=======================================================
+// Mora
+//=======================================================
+mora,100,118,4 shop Tool Dealer#mora 517,11522:-1,11523:-1,11524:-1,602:-1,601:-1,611:-1,1773:-1,1774:-1,713:-1
+mora,138,110,4 shop Mora Chef 518,11519:-1
+
+//=======================================================
// Mid Camp
//=======================================================
mid_camp,129,284,4 shop Trap Specialist#mid 66,7940:-1,12341:-1
@@ -69,6 +88,14 @@ mid_camp,184,263,4 shop Black Marketeer#mid 49,2139:-1,2800:-1,2801:-1,2802:-1,2
payon,123,109,4 shop Trap Specialist#pay 66,7940:-1,12341:-1
//=======================================================
+// Port Malaya
+//=======================================================
+ma_in01,73,22,3 shop Weapon Dealer#ma 536,1207:-1,1216:-1,1107:-1,1122:-1,1116:-1,1154:-1,1407:-1,1457:-1,1354:-1,1519:-1
+ma_in01,22,23,3 shop Tool Dealer#ma 536,611:-1,1750:-1,501:-1,502:-1,503:-1,504:-1,645:-1,656:-1,601:-1,602:-1,1065:-1,2239:-1
+malaya,150,261,3 shop Fruit Gardener#ma 535,512:-1,513:-1,515:-1,516:-1,535:-1
+ma_in01,67,13,5 shop Armor Dealer#ma 536,2211:-1,2401:-1,2403:-1,2501:-1,2503:-1,2101:-1,2103:-1,2305:-1,2321:-1,2332:-1,2328:-1,2627:-1
+
+//=======================================================
// Prontera
//=======================================================
//prontera,104,88,5 shop Stuff Gimme 880,616:-1