From 8efb5b9d71dee7698881a9f9983fe820017d8f96 Mon Sep 17 00:00:00 2001 From: Atemo Date: Thu, 30 Nov 2023 18:22:17 +0100 Subject: [PATCH] Updated Illusion dungeon exchange NPCs (#8014) --- .../barters/enchan_illusion_dungeons.yml | 402 ++++++++ npc/re/merchants/enchan_illusion_dungeons.txt | 930 +----------------- 2 files changed, 438 insertions(+), 894 deletions(-) diff --git a/npc/re/merchants/barters/enchan_illusion_dungeons.yml b/npc/re/merchants/barters/enchan_illusion_dungeons.yml index 339bac0049..9f43ae6828 100644 --- a/npc/re/merchants/barters/enchan_illusion_dungeons.yml +++ b/npc/re/merchants/barters/enchan_illusion_dungeons.yml @@ -412,3 +412,405 @@ Body: - Index: 3 Item: IllusionStone Amount: 120 + - Name: barter_ill_moonlight + Items: + - Index: 0 + Item: Staff_Of_Bordeaux_IL + RequiredItems: + - Index: 0 + Item: Staff_Of_Bordeaux + - Index: 1 + Item: IllusionStone + Amount: 30 + - Index: 2 + Item: HazyDream + Amount: 100 + - Index: 1 + Item: Moonlight_Sword_IL + RequiredItems: + - Index: 0 + Item: Moonlight_Sword + - Index: 1 + Item: IllusionStone + Amount: 60 + - Index: 2 + Item: HazyDream + Amount: 100 + - Index: 2 + Item: Long_Mace_IL + RequiredItems: + - Index: 0 + Item: Long_Mace + - Index: 1 + Item: IllusionStone + Amount: 10 + - Index: 2 + Item: HazyDream + Amount: 20 + - Index: 3 + Item: Spectral_Spear_IL + RequiredItems: + - Index: 0 + Item: Spectral_Spear + - Index: 1 + Item: IllusionStone + Amount: 20 + - Index: 2 + Item: HazyDream + Amount: 100 + - Index: 4 + Item: Nurse_Cap_IL + RequiredItems: + - Index: 0 + Item: Nurse_Cap + - Index: 1 + Item: IllusionStone + Amount: 10 + - Index: 2 + Item: Bloody_LoveLetter + Amount: 100 + - Index: 5 + Item: Apple_Of_Archer_IL + RequiredItems: + - Index: 0 + Item: Apple_Of_Archer + - Index: 1 + Item: IllusionStone + Amount: 10 + - Index: 2 + Item: BrokenArrow + Amount: 100 + - Index: 6 + Item: Puente_Robe_IL + RequiredItems: + - Index: 0 + Item: Puente_Robe + - Index: 1 + Item: IllusionStone + Amount: 10 + - Index: 2 + Item: HazyDream + Amount: 100 + - Index: 7 + Item: Muffler_IL + RequiredItems: + - Index: 0 + Item: Muffler_ + - Index: 1 + Item: IllusionStone + Amount: 10 + - Index: 2 + Item: HazyMooncake + Amount: 100 + - Index: 8 + Item: Shoes_IL + RequiredItems: + - Index: 0 + Item: Shoes_ + - Index: 1 + Item: IllusionStone + Amount: 10 + - Index: 2 + Item: HazyMooncake + Amount: 100 + - Name: barter_ill_frozen + Items: + - Index: 0 + Item: Huuma_Flutter_Snow_IL + RequiredItems: + - Index: 0 + Item: Huuma_Fluttering_Snow + - Index: 1 + Item: IllusionStone + Amount: 100 + - Index: 2 + Item: KTULLANUXsEye + Amount: 20 + - Index: 1 + Item: Combo_Battle_Glove_IL + RequiredItems: + - Index: 0 + Item: Combo_Battle_Glove + - Index: 1 + Item: IllusionStone + Amount: 100 + - Index: 2 + Item: Snowball + Amount: 100 + - Index: 2 + Item: Herald_Of_GOD_IL + RequiredItems: + - Index: 0 + Item: Herald_Of_GOD_ + - Index: 1 + Item: IllusionStone + Amount: 100 + - Index: 2 + Item: SpritJewel + Amount: 300 + - Index: 3 + Item: Clack_Of_Servival_IL + RequiredItems: + - Index: 0 + Item: Clack_Of_Servival + - Index: 1 + Item: IllusionStone + Amount: 100 + - Index: 2 + Item: Frozen_PieceOfRock + Amount: 200 + - Index: 4 + Item: Cap_IL + RequiredItems: + - Index: 0 + Item: Cap_ + - Index: 1 + Item: IllusionStone + Amount: 50 + - Index: 2 + Item: Frozen_PieceOfRock + Amount: 100 + - Name: barter_ill_vampire + Items: + - Index: 0 + Item: Infiltrator_IL + RequiredItems: + - Index: 0 + Item: Infiltrator_ + - Index: 1 + Item: IllusionStone + Amount: 80 + - Index: 2 + Item: Torn_Diary + Amount: 20 + - Index: 1 + Item: Ghoul_Leg_IL + RequiredItems: + - Index: 0 + Item: Ghoul_Leg + - Index: 1 + Item: IllusionStone + Amount: 10 + - Index: 2 + Item: NightmareOfLump + Amount: 100 + - Index: 2 + Item: Wizardy_Staff_IL + RequiredItems: + - Index: 0 + Item: Wizardy_Staff + - Index: 1 + Item: IllusionStone + Amount: 40 + - Index: 2 + Item: SuspiciousMagicCircle + Amount: 100 + - Index: 3 + Item: Balistar_IL + RequiredItems: + - Index: 0 + Item: Balistar_ + - Index: 1 + Item: IllusionStone + Amount: 50 + - Index: 2 + Item: Shining_Spore + Amount: 100 + - Index: 4 + Item: Book_Of_The_Apo_IL + RequiredItems: + - Index: 0 + Item: Book_Of_The_Apocalypse + - Index: 1 + Item: IllusionStone + Amount: 50 + - Index: 2 + Item: Dried_Clover + Amount: 10 + - Index: 5 + Item: Cape_Of_Ancient_Lord_IL + RequiredItems: + - Index: 0 + Item: Cape_Of_Ancient_Lord_ + - Index: 1 + Item: IllusionStone + Amount: 30 + - Index: 2 + Item: Short_Bat_Fur + Amount: 200 + - Index: 6 + Item: Skul_Ring_IL + RequiredItems: + - Index: 0 + Item: Skul_Ring_ + - Index: 1 + Item: IllusionStone + Amount: 50 + - Index: 2 + Item: Dried_Leaf_Of_Ygg + Amount: 400 + - Index: 7 + Item: Ring_IL + RequiredItems: + - Index: 0 + Item: Ring_ + - Index: 1 + Item: IllusionStone + Amount: 50 + - Index: 2 + Item: SuspiciousMagicCircle + Amount: 400 + - Name: barter_ill_turtle + Items: + - Index: 0 + Item: Immaterial_Sword_IL + RequiredItems: + - Index: 0 + Item: Immaterial_Sword + - Index: 1 + Item: IllusionStone + Amount: 100 + - Index: 2 + Item: ShipsLog + Amount: 50 + - Index: 1 + Item: War_Axe_IL + RequiredItems: + - Index: 0 + Item: War_Axe + - Index: 1 + Item: IllusionStone + Amount: 100 + - Index: 2 + Item: PieceOfBlackSpirit + Amount: 200 + - Index: 2 + Item: Pole_Axe_IL + RequiredItems: + - Index: 0 + Item: Pole_Axe + - Index: 1 + Item: IllusionStone + Amount: 100 + - Index: 2 + Item: PieceOfBlackSpirit + Amount: 200 + - Index: 3 + Item: Huuma_Bird_Wing_IL + RequiredItems: + - Index: 0 + Item: Huuma_Bird_Wing + - Index: 1 + Item: IllusionStone + Amount: 100 + - Index: 2 + Item: OldShell + Amount: 200 + - Index: 4 + Item: Iron_Driver_IL + RequiredItems: + - Index: 0 + Item: Iron_Driver + - Index: 1 + Item: IllusionStone + Amount: 100 + - Index: 2 + Item: OldShell + Amount: 200 + - Index: 5 + Item: Fancy_Flower_IL + RequiredItems: + - Index: 0 + Item: Fancy_Flower + - Index: 1 + Item: IllusionStone + Amount: 50 + - Index: 2 + Item: OldDoll + Amount: 50 + - Name: barter_ill_luanda + Items: + - Index: 0 + Item: Tablet_IL + RequiredItems: + - Index: 0 + Item: Tablet + - Index: 1 + Item: IllusionStone + Amount: 50 + - Index: 2 + Item: Weak_Worm + Amount: 100 + - Index: 1 + Item: Hunter_Bow_IL + RequiredItems: + - Index: 0 + Item: Hunter_Bow_ + - Index: 1 + Item: IllusionStone + Amount: 80 + - Index: 2 + Item: Shooting_Stone + Amount: 50 + - Index: 3 + Item: Pot_Stone + Amount: 50 + - Index: 4 + Item: Hair_Leaf + Amount: 50 + - Index: 2 + Item: Goibne_Helmet_IL + RequiredItems: + - Index: 0 + Item: Goibne's_Helmet + - Index: 1 + Item: IllusionStone + Amount: 120 + - Index: 2 + Item: Wootan_D_S_Piece + Amount: 30 + - Index: 3 + Item: Token_Of_Wootan + Amount: 150 + - Index: 3 + Item: Goibne_Armor_IL + RequiredItems: + - Index: 0 + Item: Goibne's_Armor + - Index: 1 + Item: IllusionStone + Amount: 80 + - Index: 2 + Item: Hard_Mud + Amount: 100 + - Index: 3 + Item: Token_Of_Bigstone + Amount: 150 + - Index: 4 + Item: Goibne_Boots_IL + RequiredItems: + - Index: 0 + Item: Goibne's_Combat_Boots + - Index: 1 + Item: IllusionStone + Amount: 80 + - Index: 2 + Item: Wootan_F_Fur + Amount: 100 + - Index: 3 + Item: Token_Of_Wootan + Amount: 150 + - Index: 5 + Item: Goibne_Shoulder_IL + RequiredItems: + - Index: 0 + Item: Goibne's_Shoulder_Arms + - Index: 1 + Item: IllusionStone + Amount: 120 + - Index: 2 + Item: Fragment_Of_Rock + Amount: 30 + - Index: 3 + Item: Token_Of_Bigstone + Amount: 150 diff --git a/npc/re/merchants/enchan_illusion_dungeons.txt b/npc/re/merchants/enchan_illusion_dungeons.txt index 055247a97d..6b9d7cb745 100644 --- a/npc/re/merchants/enchan_illusion_dungeons.txt +++ b/npc/re/merchants/enchan_illusion_dungeons.txt @@ -23,7 +23,7 @@ pay_d03_i,160,45,3 script Gemcutter#ilp20 4_TOWER_17,3,3,{ mes "[ Gemcutter ]"; mes "Do you have business with me?"; next; - switch (select("What are you doing here?:Upgrade Weapon.:Upgrade Armor.")) { + switch( select( "What are you doing here?", "Upgrade equipments" ) ) { case 1: mes "[ Gemcutter ]"; mes "I came to the ruined village,"; @@ -40,30 +40,8 @@ pay_d03_i,160,45,3 script Gemcutter#ilp20 4_TOWER_17,3,3,{ mes "If you're interested, we can discuss the details of our bargain."; close; case 2: - disable_items; - if (checkweight(25271,1) == 0 || (MaxWeight - Weight) < 1000) { - mes "- You're carrying too many items to proceed. -"; - close; - } - setarray .@reward_id[0], - 26109, // Illusion Staff of Bordeaux - 28725, // Illusion Moonlight Dagger - 16063, // Illusion Long Mace - 26007; // Illusion Spectral Spear - .@size = getarraysize(.@reward_id); - - .@refine_req = 9; - - for ( .@i = 0; .@i < .@size; ++.@i ) - .@reward_name$[.@i] = replacestr( getitemname(.@reward_id[.@i]), ":", "" ); - mes "[ Gemcutter ]"; - mes "The following is the list of equipment I can handle."; - for ( .@i = 0; .@i < .@size; ++.@i ) - mes mesitemlink( .@reward_id[.@i], false ); - next; - mes "[ Gemcutter ]"; - mes "Make sure ^0000FFyour equipment is refined to at least +" + .@refine_req + "^000000 before bringing it to me."; + mes "Make sure ^0000FFyour equipment is refined to at least +9^000000 before bringing it to me."; mes "That's the minimum requirement for my upgrade service to have any visible effects on your equipment."; next; mes "[ Gemcutter ]"; @@ -77,178 +55,11 @@ pay_d03_i,160,45,3 script Gemcutter#ilp20 4_TOWER_17,3,3,{ mes "[ Gemcutter ]"; mes "And I need ^0000FFIllusion Stones and some other materials^000000 to upgrade your equipment."; mes "Pick an item you want and I'll tell you what I need."; - next; - switch( select( .@reward_name$[0], .@reward_name$[1], .@reward_name$[2], .@reward_name$[3] ) ) { - case 1: - .@reward = .@reward_id[0]; // Illusion Staff of Bordeaux - .@eq_req = 1648; // Staff of Bordeaux - .@part = EQI_HAND_R; - - setarray .@items_req[0], - 25271,30, // Illusion Stones - 25256,100; // Hazy Dreams - break; - case 2: - .@reward = .@reward_id[1]; // Illusion Moonlight Dagger - .@eq_req = 1234; // Moonlight Dagger - .@part = EQI_HAND_R; - - setarray .@items_req[0], - 25271,60, // Illusion Stones - 25256,100; // Hazy Dreams - break; - case 3: - .@reward = .@reward_id[2]; // Illusion Long Mace - .@eq_req = 1525; // Long Mace - .@part = EQI_HAND_R; - - setarray .@items_req[0], - 25271,10, // Illusion Stones - 25256,20; // Hazy Dreams - break; - case 4: - .@reward = .@reward_id[3]; // Illusion Spectral Spear - .@eq_req = 1477; // Spectral Spear - .@part = EQI_HAND_R; - - setarray .@items_req[0], - 25271,20, // Illusion Stones - 25256,100; // Hazy Dreams - break; - } - break; - case 3: - disable_items; - if (checkweight(25271,1) == 0 || (MaxWeight - Weight) < 1000) { - mes "- You're carrying too many items to proceed. -"; - close; - } - setarray .@reward_id[0], - 19209, // Illusion Nurse Cap - 19210, // Illusion Apple of Archer - 15195, // Illusion Puente Robe - 20838, // Illusion Muffler [1] - 22133; // Illusion Shoes [1] - .@size = getarraysize(.@reward_id); - - .@refine_req = 9; - - for ( .@i = 0; .@i < .@size; ++.@i ) - .@reward_name$[.@i] = replacestr( getitemname(.@reward_id[.@i]), ":", "" ); - - mes "[ Gemcutter ]"; - mes "The following is the list of equipment I can handle."; - for ( .@i = 0; .@i < .@size; ++.@i ) - mes mesitemlink( .@reward_id[.@i], false ); - next; - mes "[ Gemcutter ]"; - mes "Make sure ^0000FFyour equipment is refined to at least +" + .@refine_req + "^000000 before bringing it to me."; - mes "That's the minimum requirement for my upgrade service to have any visible effects on your equipment."; - next; - mes "[ Gemcutter ]"; - mes "Make sure you're ^0000FFequipped with the item that you want to improve.^000000"; - mes "Otherwise, I can't evaluate its condition."; - next; - mes "[ Gemcutter ]"; - mes "As you may have guessed, your equipment will transform into something new after this."; - mes "In other words, ^0000FFIt'll lose its current refining levels, cards and enchantments.^000000"; - next; - mes "[ Gemcutter ]"; - mes "And I need ^0000FFIllusion Stones and some other materials^000000 to upgrade your equipment."; - mes "Pick an item you want and I'll tell you what I need."; - next; - switch( select( .@reward_name$[0], .@reward_name$[1], .@reward_name$[2], .@reward_name$[3], .@reward_name$[4] ) ) { - case 1: - .@reward = .@reward_id[0]; // Illusion Nurse Cap - .@eq_req = 2277; // Nurse Cap - .@part = EQI_HEAD_TOP; - - setarray .@items_req[0], - 25271,10, // Illusion Stones - 25257,100; // Bloody_Love_Letter - break; - case 2: - .@reward = .@reward_id[1]; // Illusion Apple of Archer - .@eq_req = 2285; // Apple of Archer - .@part = EQI_HEAD_TOP; - - setarray .@items_req[0], - 25271,10, // Illusion Stones - 25258,100; // Broken_Arrow - break; - case 3: - .@reward = .@reward_id[2]; // Illusion Puente Robe - .@eq_req = 15012; // Puente Robe - .@part = EQI_ARMOR; - - setarray .@items_req[0], - 25271,10, // Illusion Stones - 25256,100; // Hazy Dreams - break; - case 4: - .@reward = .@reward_id[3]; // Illusion Muffler [1] - .@eq_req = 2504; // Muffler - .@part = EQI_GARMENT; - - setarray .@items_req[0], - 25271,10, // Illusion Stones - 23228,100; // Hazy_Mooncake - break; - case 5: - .@reward = .@reward_id[4]; // Illusion Shoes [1] - .@eq_req = 2404; // Shoes - .@part = EQI_SHOES; - - setarray .@items_req[0], - 25271,10, // Illusion Stones - 23228,100; // Hazy_Mooncake - break; - } - break; + close2; + callshop( "barter_ill_moonlight" ); + end; } - mes "[Gemcutter]"; - mes "For that equipment, I need the following materials."; - mes "^4d4fff +" + .@refine_req + " " + getitemname(.@eq_req) + ""; - mes "" + .@items_req[1] + " " + getitemname(.@items_req[0]) + ""; - mes "" + .@items_req[3] + " " + getitemname(.@items_req[2]) + "^000000"; - mes "Do you want to continue?"; - next; - if (select( "Continue.", "I'll bring those materials." ) == 2) { - mes "[Gemcutter]"; - mes "Come back when you're ready."; - close; - } - if (countitem(.@items_req[0]) < .@items_req[1] || countitem(.@items_req[2]) < .@items_req[3]) { - mes "[Gemcutter]"; - mes "You don't have all the materials."; - close; - } - .@equip_id = getequipid(.@part); - if (.@equip_id == -1) { - mes "[Gemcutter]"; - if (.@part == EQI_HAND_R) - mes "Where's your weapon?"; - else - mes "Why don't you go wear that equipment first?"; - close; - } - if (.@equip_id != .@eq_req) { - mes "[Gemcutter]"; - mes "Please equip a ^4d4fff+9 " + getitemname(.@eq_req) + ".^000000"; - close; - } - if (getequiprefinerycnt(.@part) < .@refine_req) { - mes "[Gemcutter]"; - mes "I can only upgrade equipment that is ^4d4fffrefined to at least +" + .@refine_req + ".^000000"; - close; - } - mes "[Gemcutter]"; - mes "There you go."; - delequip .@part; - delitem .@items_req[0], .@items_req[1]; - delitem .@items_req[2], .@items_req[3]; - getitem .@reward,1; - close; + end; OnTouch: if (illusion_moonlight > 7) @@ -261,222 +72,23 @@ OnTouch: //= Illusion of Vampire //============================================================ gef_dun01,139,228,3 script Great Merchant#illgef 4_M_HUMERCHANT,{ - if (checkweight(501,1) == 0 || (MaxWeight - Weight) < 1000) { - mes "[Great Merchant]"; - mes "You don't seem to be able to carry any more stuff. Why don't you lighten your bag?"; - close; - } - disable_items; mes "[Great Merchant]"; mes "Adventurer, do you have ^0000cdIllusion Stones^000000? If you have a ^0000cdweapon, a piece armor^000000, or ^0000cdan accessory at Refining Level 9 or higher^000000, "; mes "then I can exchange it for something better at the cost of some Illusion Stones and other materials."; next; mes "[Great Merchant]"; - mes "Check the ^0000cdcatalog^000000 for the available equipment and necessary materials."; - next; - mes "[Great Merchant]"; mes "So, what do you want?"; next; - switch( select( "Weapon exchange (5 kinds)", "Armor exchange (1 kind)", "Accessory exchange (2 kinds)", "Check the catalog.", "What are Illusion Stones?", "Can I refine the equipment I get in exchange for my Illusion Stones?" ) ) { + switch( select( "Exchange illusion equipment", "What are Illusion Stones?", "Can I strengthen the exchanged item?", "Cancel" ) ) { case 1: - setarray .@item_req[0], // item equipped aren't required to build the menu color - 28022, 25271,80, 25261,20, // Illusion_Infiltrator - 28023, 25271,10, 25264,100, // Illusion_Sharpened_Legbone_of_Ghoul - 2039, 25271,40, 25261,100, // Illusion_Wizardry_Staff - 18149, 25271,50, 25265,100, // Illusion_Ballista - 28612, 25271,50, 25262,10; // Illusion_Apocalypse - .@size = getarraysize(.@item_req); - for ( .@i = 0; .@i < .@size; .@i += 5 ) { - if (countitem(.@item_req[.@i+1]) < .@item_req[.@i+2] || countitem(.@item_req[.@i+3]) < .@item_req[.@i+4]) - .@menu$ += "^aaaaaa" + getitemname(.@item_req[.@i]) + ".^000000:"; - else - .@menu$ += getitemname(.@item_req[.@i]) + ".:"; - } - switch( select(.@menu$) ) { - case 1: - mes "[Great Merchant]"; - mes "Illusion Infiltrator, huh? That's a good weapon. Dreadful name, though. Let's see what you've got."; - callsub( S_WeaponArmor, 28022, // Illusion_Infiltrator - EQI_HAND_R, - 1266, // Infiltrator_ - 25271,80, // Illusion Stones - 25261,20 // Torn_Diary - ); - case 2: - mes "[Great Merchant]"; - mes "Illusion Sharpened Legbone of Ghoul. It perfectly fits in this place. Let's see what you've got."; - callsub( S_WeaponArmor, 28023, // Illusion_Sharpened_Legbone_of_Ghoul - EQI_HAND_R, - 1260, // Ghoul_Leg - 25271,10, // Illusion Stones - 25264,100 // NightmareOfLump - ); - case 3: - mes "[Great Merchant]"; - mes "Illusion Wizardry Staff, huh? *Chuckle* Having that is every mage's dream. Let's see what you've got."; - callsub( S_WeaponArmor, 2039, // Illusion_Wizardry_Staff - EQI_HAND_R, - 1473, // Wizardy_Staff - 25271,40, // Illusion Stones - 25261,100 // SuspiciousMagicCircle - ); - case 4: - mes "[Great Merchant]"; - mes "Illusion Ballista... I would've loved to have this when, sigh, never mind. Let's see what you've got."; - callsub( S_WeaponArmor, 18149, // Illusion_Ballista - EQI_HAND_R, - 1727, // Balistar_ - 25271,50, // Illusion Stones - 25265,100 // Shining_Spore - ); - case 5: - mes "[Great Merchant]"; - mes "Illusion Book of the Apocalypse, huh? It's been a long time since I heard the story behind this book. Anyway, let's see what you've got."; - callsub( S_WeaponArmor, 28612, // Illusion_Apocalypse - EQI_HAND_R, - 1557, // Book_Of_The_Apocalypse - 25271,50, // Illusion Stones - 25262,10 // Dried_Clover - ); - } - case 2: - if (countitem(25271) < 30 || countitem(25263) < 200) - .@menu$ = "^aaaaaa" + getitemname(20840) + ".^000000"; - else - .@menu$ = getitemname(20840); - select(.@menu$); + specialeffect EF_HFLIMOON3; + emotion ET_BEST; mes "[Great Merchant]"; - mes "Illusion Ancient Cape. Someone in this place? *Ahem* Let's see what you've got."; - callsub( S_WeaponArmor, 20840, // Illusion_Ancient_Cape - EQI_GARMENT, - 2525, // Cape_Of_Ancient_Lord_ - 25271,30, // Illusion Stones - 25263,200 // Short_Bat_Fur - ); - case 3: - setarray .@item_req[0], // item equipped aren't required to build the menu color - 28508, 25271,50, 25266,400, // Illusion_Skull_Ring - 28509, 25271,50, 25267,400; // Illusion_Ring - .@size = getarraysize(.@item_req); - for ( .@i = 0; .@i < .@size; .@i += 5 ) { - if (countitem(.@item_req[.@i+1]) < .@item_req[.@i+2] || countitem(.@item_req[.@i+3]) < .@item_req[.@i+4]) - .@menu$ += "^aaaaaa" + getitemname(.@item_req[.@i]) + ".^000000:"; - else - .@menu$ += getitemname(.@item_req[.@i]) + ".:"; - } - switch( select(.@menu$) ) { - case 1: - mes "[Great Merchant]"; - mes "Illusion Skull Ring. *Chuckle* I remember when I was young, my friends and I wore this ring and played pranks, hah hah, never mind. That was a long time ago. Anyway, let's see what you've got."; - callsub( S_Accessory, 28508, // Illusion_Skull_Ring - 2715, // Skul_Ring_ - 25271,50, // Illusion Stones - 25266,400 // Dried_Yggdrasil_Leaf - ); - case 2: - mes "[Great Merchant]"; - mes "Illusion Ring... It may not look much, but it has an important meaning to me. Anyway, let's see what you've got."; - callsub( S_Accessory, 28509, // Illusion_Ring - 2621, // Ring_ - 25271,50, // Illusion Stones - 25267,400 // SuspiciousMagicCircle - ); - } - case 4: - while( true ) { - mes "[Great Merchant]"; - mes "Do you want to see my catalog? Sure thing."; - next; - switch( select( "Weapons (5 kinds)", "Armor (1 kind)", "Accessory (2 kinds)", "Cancel." ) ) { - case 1: - switch( select( "Illusion Infiltrator", "Illusion Sharpened Legbone of Ghoul", "Illusion Wizardry Staff", "Illusion Ballista", "Illusion Book of the Apocalypse" ) ) { - case 1: - mes mesitemlink( 28022, false ); - mes "***********************************"; - mes "Necessary Items"; - mes "^0000cd+9 or higher^000000 Infiltrator ^C71585[1]^000000 x1"; - mes "Socket Artisan"; - mes ": Seiyablem in Pronteraprt_in,33,70,000,0,"; - mes "80 Illusion Stones"; - mes "20 Torn Papers"; - break; - case 2: - mes mesitemlink( 28023, false ); - mes "********************************"; - mes "Necessary Items"; - mes "^0000cd+9 or higher^000000 Sharpened Legbone of Ghoul x1"; - mes "10 Illusion Stones"; - mes "100 Clusters of Nightmares"; - break; - case 3: - mes mesitemlink( 2039, false ); - mes "********************************"; - mes "Necessary Items"; - mes "^0000cd+9 or higher^000000 Wizardry Staff x1"; - mes "40 Illusion Stones"; - mes "100 Suspicious Pentacles"; - break; - case 4: - mes mesitemlink( 18149, false ); - mes "*************************"; - mes "Necessary Items"; - mes "^0000cd+9 or higher^000000 Ballista ^C71585[1]^000000 x1"; - mes "Socket Artisan"; - mes ": Seiyablem in Pronteraprt_in,33,70,000,0,"; - mes "50 Illusion Stones"; - mes "100 Shining Spores"; - break; - case 5: - mes mesitemlink( 28612, false ); - mes "***********************"; - mes "Necessary Items"; - mes "^0000cd+9 or higher^000000 Book of the Apocalypse x1"; - mes "50 Illusion Stones"; - mes "10 Well-dried Clovers"; - break; - } - break; - case 2: - select("Illusion Ancient Cape"); - mes mesitemlink( 20840, false ); - mes "*******************************"; - mes "Necessary Items"; - mes "^0000cd+9 or higher^000000 Ancient Cape ^C71585[1]^000000 x1"; - mes "Socket Artisan"; - mes ": Leablem in Pronteraprontera,244,169,000,0,"; - mes "30 Illusion Stones"; - mes "200 Short Bat Hairs"; - break; - case 3: - switch( select( "Illusion Skull Ring", "Illusion Ring" ) ) { - case 1: - mes mesitemlink( 28508, false ); - mes "*************************"; - mes "Necessary Items"; - mes "Skull Ring ^C71585[1]^000000 x1"; - mes "Socket Artisan"; - mes ": Leablem in Pronteraprontera,244,169,000,0,"; - mes "50 Illusion Stones"; - mes "400 Dried Yggdrasil Leaves"; - break; - case 2: - mes mesitemlink( 28509, false ); - mes "********************"; - mes "Necessary Items"; - mes "Ring ^C71585[1]^000000 x1"; - mes "50 Illusion Stones"; - mes "400 Suspicious Pentacles"; - break; - } - break; - case 4: - mes "[Great Merchant]"; - mes "Did you find something you like? Let me know if I can help you."; - close; - } - next; - } - case 5: + mes "Use it well and come see me later if you find more Illusion Stones! *Chuckle*"; + close2; + callshop( "barter_ill_vampire" ); + end; + case 2: mes "[Great Merchant]"; mes "What are ^0000cdIllusion Stones^000000, you ask? Well... I don't think anyone knows exactly what they are."; next; @@ -495,7 +107,7 @@ gef_dun01,139,228,3 script Great Merchant#illgef 4_M_HUMERCHANT,{ mes "[Great Merchant]"; mes "This benefits both of us. Let me know if you're interested in my proposition."; close; - case 6: + case 3: mes "[Great Merchant]"; mes "So, you want to reinforce the equipment you get. You're thorough. I like that!"; next; @@ -508,116 +120,11 @@ gef_dun01,139,228,3 script Great Merchant#illgef 4_M_HUMERCHANT,{ mes "[Great Merchant]"; mes "If you want to refine your equipment, then go to the Illusion Enchanterprontera,90,115,000,0, near the Town Office."; close; - } - -S_WeaponArmor: - .@reward = getarg(0); - .@part = getarg(1); - .@eq_req = getarg(2); - - setarray .@items_req[0], - getarg(3),getarg(4), - getarg(5),getarg(6); - - next; - donpcevent "Great Merchant#illgef::OnProgress"; - sleep2 1000; - .@slots = getitemslots(.@eq_req); - .@eq_req_name$ = getitemname(.@eq_req) + ( .@slots ? "[" + .@slots + "]" : "" ); - .@equip_id = getequipid(.@part); - if (.@equip_id == -1) { + case 4: mes "[Great Merchant]"; - if (.@part == EQI_HAND_R) - mes "Oh, you must have been in a hurry: you forgot to bring a weapon."; - else - mes "Oh, you must have been in a hurry: you forgot to bring an armor."; - mes "Please come back equipped with a ^0000cd+9 " + .@eq_req_name$ + "^000000. I'll wait here."; + mes "Did you find anything you liked? If you need anything, please let me know at any time."; close; } - if (.@equip_id != .@eq_req) { - mes "[Great Merchant]"; - mes "Let's see... Mm? What did you bring? Come back equipped with a ^0000cd+9 " + .@eq_req_name$ + "^000000."; - close; - } - if (getequiprefinerycnt(.@part) < 9) { - mes "[Great Merchant]"; - if (.@part == EQI_HAND_R) - mes "Um, this one isn't refined enough. I told you the armor has to be ^0000cdrefined to as least +9^000000."; - else - mes "Um, this one isn't refined enough. I told you the weapon has to be ^0000cdrefined to as least +9^000000."; - close; - } - mes "[Great Merchant]"; - mes "Ah, you're equipped with the correct item. Now, let me check the other materials."; - next; - if (countitem(.@items_req[0]) < .@items_req[1] || countitem(.@items_req[2]) < .@items_req[3]) { - mes "[Great Merchant]"; - mes "Mm, you're so impatient. I told you, I need ^4d4fff" + .@items_req[1] + " " + getitemname(.@items_req[0]) + " and " + .@items_req[3] + " " + getitemname(.@items_req[2]) + "^000000. Check your inventory and bring all of them."; - close; - } - mes "[Great Merchant]"; - mes "Alright, you've got everything."; - next; - mes "[Great Merchant]"; - mes "Are you ready to make the exchange?"; - next; - if (select( "Wait! Let me think.", "Yes, I am." ) == 1) { - mes "[Great Merchant]"; - mes "Sure, no problem. Come back when you're ready."; - close; - } - mes "[Great Merchant]"; - mes "Alright! Let's see..."; - next; - mes "[Great Merchant]"; - mes "Here, take this. I hope you'll enjoy. If you find more Illusion Stones, feel free to bring them to me! *Chuckle*"; - delequip .@part; - delitem .@items_req[0], .@items_req[1]; - delitem .@items_req[2], .@items_req[3]; - getitem .@reward,1; - close; - -S_Accessory: // the structure is slightly different from above - .@reward = getarg(0); - .@eq_req = getarg(1); - - setarray .@items_req[0], - getarg(2),getarg(3), - getarg(4),getarg(5); - - next; - donpcevent "Great Merchant#illgef::OnProgress"; - sleep2 1000; - .@count = countitem(.@eq_req) - (getequipid(EQI_ACC_L) == .@eq_req) - (getequipid(EQI_ACC_R) == .@eq_req); - if (.@count < 1 || countitem(.@items_req[0]) < .@items_req[1] || countitem(.@items_req[2]) < .@items_req[3]) { - mes "[Great Merchant]"; - mes "Mm, you're so impatient. I told you, I need ^4d4fff1 socketed " + getitemname(.@eq_req) + ", " + .@items_req[1] + " " + getitemname(.@items_req[0]) + " and " + .@items_req[3] + " " + getitemname(.@items_req[2]) + "^000000. Check your inventory and bring all of them."; - close; - } - mes "[Great Merchant]"; - mes "Alright, you've got everything."; - next; - mes "[Great Merchant]"; - mes "Are you ready to make the exchange?"; - next; - if (select( "Wait! Let me think.", "Yes, I am." ) == 1) { - mes "[Great Merchant]"; - mes "Sure, no problem. Come back when you're ready."; - close; - } - mes "[Great Merchant]"; - mes "Alright! Let's see..."; - next; - mes "[Great Merchant]"; - mes "Here, take this. I hope you'll enjoy. If you find more Illusion Stones, feel free to bring them to me! *Chuckle*"; - delitem .@eq_req,1; - delitem .@items_req[0], .@items_req[1]; - delitem .@items_req[2], .@items_req[3]; - getitem .@reward,1; - close; - -OnProgress: - progressbar_npc "000000",1; end; } @@ -631,7 +138,7 @@ ice_dun02,153,18,3 script Illusion Stone Research 4_M_ALCHE_B,{ mes "[Illusion Stone Researcher]"; mes "Ah, Illusion Stones are truly mysterious..."; next; - switch( select( "What are you doing here?", "Upgrade weapon.", "Upgrade armor." ) ) { + switch( select( "What are you doing here?", "Upgrade equipments", "Cancel" ) ) { case 1: mes "[Illusion Stone Researcher]"; mes "I'm here to find some Illusion Stones that I need for my research."; @@ -645,17 +152,6 @@ ice_dun02,153,18,3 script Illusion Stone Research 4_M_ALCHE_B,{ mes "What do you say?"; close; case 2: - setarray .@reward_id[0], - 13337, // Huuma_Flutter_Snow_IL - 1846; // Combo_Battle_Glove_IL - setarray .@reward_name$[0], - getitemname(.@reward_id[0]), - getitemname(.@reward_id[1]); - mes "[Illusion Stone Researcher]"; - mes "The following is the list of equipment I can handle."; - mes mesitemlink( .@reward_id[0], false ); - mes mesitemlink( .@reward_id[1], false ); - next; mes "[Illusion Stone Researcher]"; mes "Make sure ^4d4dffyour equipment is refined to at least +9^000000 before bringing it to me."; mes "Make sure you're ^4d4dffequipped with the item that you want to improve^000000."; @@ -667,127 +163,15 @@ ice_dun02,153,18,3 script Illusion Stone Research 4_M_ALCHE_B,{ mes "[Illusion Stone Researcher]"; mes "And I need ^4d4dffIllusion Stones and some other materials^000000 to upgrade your equipment."; mes "Pick an item you want. I'll tell you what I need."; - next; - .@s = select( .@reward_name$[0], .@reward_name$[1], "Cancel." ) - 1; - switch(.@s) { - case 0: // Huuma_Flutter_Snow_IL - .@eq_req = 13314; // Huuma_Fluttering_Snow - .@part = EQI_HAND_R; - - setarray .@items_req[0], - 25271,100, // IllusionStone - 25300,20; // KTULLANUXsEye - break; - case 1: // Combo_Battle_Glove_IL - .@eq_req = 1822; // Combo_Battle_Glove - .@part = EQI_HAND_R; - - setarray .@items_req[0], - 25271,100, // IllusionStone - 25299,100; // Snowball - break; - case 2: - end; - } - break; + close2; + callshop( "barter_ill_frozen" ); + end; case 3: - setarray .@reward_id[0], - 28922, // Herald_Of_GOD_IL - 20847, // Clack_Of_Servival_IL - 19223; // Cap_IL - setarray .@reward_name$[0], - getitemname(.@reward_id[0]), - getitemname(.@reward_id[1]), - getitemname(.@reward_id[2]); mes "[Illusion Stone Researcher]"; - mes "The following is the list of equipment I can handle."; - mes mesitemlink( .@reward_id[0], false ); - mes mesitemlink( .@reward_id[1], false ); - mes mesitemlink( .@reward_id[2], false ); - next; - mes "[Illusion Stone Researcher]"; - mes "Make sure ^4d4dffyour equipment is refined to at least +9^000000 before bringing it to me."; - mes "Make sure you're ^4d4dffequipped with the item that you want to improve^000000."; - next; - mes "[Illusion Stone Researcher]"; - mes "As you may have guessed, your equipment will transform into something new after this."; - mes "In other words, ^4d4dffit'll lose its current Refining and Upgrade levels.^000000"; - mes "Are you ready?"; - next; - .@s = select( .@reward_name$[0], .@reward_name$[1], .@reward_name$[2], "Cancel." ) - 1; - switch(.@s) { - case 0: // Herald_Of_GOD_IL - .@eq_req = 2128; // Herald_Of_GOD_ - .@part = EQI_HAND_L; - - setarray .@items_req[0], - 25271,100, // IllusionStone - 25298,300; // SpritJewel - break; - case 1: // Clack_Of_Servival_IL - .@eq_req = 2509; // Clack_Of_Servival - .@part = EQI_GARMENT; - - setarray .@items_req[0], - 25271,100, // IllusionStone - 25297,200; // Frozen_PieceOfRock - break; - case 2: // Cap_IL - .@eq_req = 2227; // Cap_ - .@part = EQI_HEAD_TOP; - - setarray .@items_req[0], - 25271,50, // IllusionStone - 25297,100; // Frozen_PieceOfRock - break; - case 3: - end; - } - break; - } - mes "[Illusion Stone Researcher]"; - mes "For that equipment, I need the following materials."; - mes "^4d4fff +9 " + getitemname(.@eq_req) + ""; - mes "" + .@items_req[1] + " " + getitemname(.@items_req[0]) + ""; - mes "" + .@items_req[3] + " " + getitemname(.@items_req[2]) + "^000000"; - mes "Do you want to continue?"; - next; - if (select( "Continue.", "I'll bring those materials." ) == 2) { - mes "[Illusion Stone Researcher]"; - mes "Come back when you're ready."; + mes "It's just hard to get.."; close; } - if (countitem(.@items_req[0]) < .@items_req[1] || countitem(.@items_req[2]) < .@items_req[3]) { - mes "[Illusion Stone Researcher]"; - mes "You don't have all the materials."; - close; - } - .@equip_id = getequipid(.@part); - if (.@equip_id == -1) { - mes "[Illusion Stone Researcher]"; - if (.@part == EQI_HAND_R) - mes "Where's your weapon?"; - else - mes "Why don't you go wear that equipment first?"; - close; - } - if (.@equip_id != .@eq_req) { - mes "[Illusion Stone Researcher]"; - mes "Please equip a ^4d4fff+9 " + getitemname(.@eq_req) + ".^000000"; - close; - } - if (getequiprefinerycnt(.@part) < 9) { - mes "[Illusion Stone Researcher]"; - mes "I can only upgrade equipment that is ^4d4fffrefined to at least +9.^000000"; - close; - } - mes "[Illusion Stone Researcher]"; - mes "There you go."; - delequip .@part; - delitem .@items_req[0], .@items_req[1]; - delitem .@items_req[2], .@items_req[3]; - getitem .@reward_id[.@s],1; - close; + end; } @@ -1349,8 +733,6 @@ OnTouch: // Exchange npc alberta,226,28,3 script Equipment Researcher 4_TOWER_15,{ - disable_items; - .@illusion_stone_name$ = getitemname(25271); mes "[Equipment Researcher]"; @@ -1358,7 +740,7 @@ alberta,226,28,3 script Equipment Researcher 4_TOWER_15,{ mes "If you have the materials I need for my research, wouldn't you hand them over?"; mes "If you give me some equipment and some materials, I'll exchange them for my reinforced equipment."; next; - switch( select( "What are you doing here?", "Exchange Weapon", "Exchange Armor" ) ) { + switch( select( "What are you doing here?", "Exchange equipment" ) ) { case 1: mes "[Equipment Researcher]"; mes "I'm working on how to use an " + .@illusion_stone_name$ + " to strengthen equipment."; @@ -1371,137 +753,19 @@ alberta,226,28,3 script Equipment Researcher 4_TOWER_15,{ close; case 2: mes "[Equipment Researcher]"; - mes "What are the weapons I can exchange? Wait a minute. I'll name them."; + mes "What are the equipment I can exchange? Wait a minute. I'll let you know."; next; mes "[Equipment Researcher]"; - mes "" + mesitemlink(13469, false) + ","; - mes "" + mesitemlink(1326, false) + ","; - mes "" + mesitemlink(32005, false) + ","; - mes "" + mesitemlink(13338, false) + ","; - mes "" + mesitemlink(16065, false) + "."; - mes "Each has two slots."; - next; - mes "[Equipment Researcher]"; - mes "As a material, you can bring ^0000CDexisting weapons that have been refined over +9.^000000"; + mes "As a material, you can bring ^0000CDexisting equipment that have been refined to +9 or higher.^000000"; mes "And I need some ^0000CD" + .@illusion_stone_name$ + " and other materials.^000000"; - mes "If you pick the weapon you want, I'll tell you in detail."; next; mes "[Equipment Researcher]"; - mes "Of course, we're giving you new weapons, so don't forget that all the existing ^0000CDsmelting and enchantments^000000 will disappear."; - mes "I need to see the performance of the weapons to be exchanged, so you must ^0000CDwear them^000000."; + mes "Of course, we're giving you new equipment, so don't forget that all the existing ^0000CDsmelting and enchantments^000000 will disappear."; mes "So, what kind of weapon do you want?"; - next; - switch( select( "Illusion Immaterial Sword", "Illusion War Axe", "Illusion Pole Axe", "Illusion Wing Shuriken", "Illusion Iron Driver" ) ) { - case 1: - .@reward = 13469; // Illusion Immaterial Sword - .@eq_req = 1141; // Immaterial Sword - .@part = EQI_HAND_R; - - setarray .@items_req[0], - 25271,100, // Illusion Stones - 25314,50; // Ships Log - break; - case 2: - .@reward = 1326; // Illusion War Axe - .@eq_req = 1306; // War Axe - .@part = EQI_HAND_R; - - setarray .@items_req[0], - 25271,100, // Illusion Stones - 25311,200; // Black Piece of Soul - break; - case 3: - .@reward = 32005; // Illusion Pole Axe - .@eq_req = 1417; // Pole Axe - .@part = EQI_HAND_R; - - setarray .@items_req[0], - 25271,100, // Illusion Stones - 25311,200; // Black Piece of Soul - break; - case 4: - .@reward = 13338; // Illusion Wing Shuriken - .@eq_req = 13300; // Huuma Wing Shuriken - .@part = EQI_HAND_R; - - setarray .@items_req[0], - 25271,100, // Illusion Stones - 25313,200; // Old Turtle Shells - break; - case 5: - .@reward = 16065; // Illusion Iron Driver - .@eq_req = 1529; // Iron Driver - .@part = EQI_HAND_R; - - setarray .@items_req[0], - 25271,100, // Illusion Stones - 25313,200; // Old Turtle Shells - break; - } - mes "[Equipment Researcher]"; - mes "" + mesitemlink(.@reward, false) + "?"; - mes "I need " + callfunc("F_GetArticle",getitemname(.@eq_req)) + " ^0000CD+9 " + getitemname(.@eq_req) + " ^000000,"; - mes "^0000CD" + getitemname(.@items_req[0]) + " " + .@items_req[1] + "ea^000000 and ^0000CD" + getitemname(.@items_req[2]) + " " + .@items_req[3] + "ea^000000 as materials."; - break; - case 3: - .@reward = 19247; // Illusion Fancy Flower - .@eq_req = 2207; // Fancy Flower - .@part = EQI_HEAD_TOP; - - setarray .@items_req[0], - 25271,50, // Illusion Stones - 25312,50; // Pretty Old Doll - - mes "[Equipment Researcher]"; - mes "You can only exchange one type of armor, " + mesitemlink(.@reward, false) + ". It has 1 slot."; - mes "I need " + callfunc("F_GetArticle",getitemname(.@eq_req)) + " ^0000CD" + getitemname(.@eq_req) + "^000000,"; - mes "^0000CD" + getitemname(.@items_req[0]) + " " + .@items_req[1] + " ea^000000 and ^0000CD" + getitemname(.@items_req[2]) + " " + .@items_req[3] + " ea^000000 as materials."; - next; - mes "[Equipment Researcher]"; - mes "Of course, we're giving you new weapons, so don't forget that all the existing ^0000CDsmelting and enchantments^000000 will disappear."; - mes "I need to see the performance of the weapons to be exchanged, so you must ^0000CDwear them^000000."; - break; + close2; + callshop( "barter_ill_turtle" ); + end; } - mes "Would you like to exchange it right now?"; - next; - if (select( "Exchange " + getitemname(.@reward), "Cancel" ) == 2) { - mes "[Equipment Researcher]"; - mes "Yeah, come back if you change your mind."; - close; - } - if (countitem(.@items_req[0]) < .@items_req[1] || countitem(.@items_req[2]) < .@items_req[3]) { - mes "[Equipment Researcher]"; - mes "Well... you're running out of ingredients."; - mes "Bring me ^0000CD" + getitemname(.@items_req[0]) + " " + .@items_req[1] + "ea^000000 and ^0000CD" + getitemname(.@items_req[2]) + " " + .@items_req[3] + " ea^000000. Then I'll exchange it for you.."; - close; - } - // custom texts and checks - .@equip_id = getequipid(.@part); - if (.@equip_id == -1) { - mes "[Equipment Researcher]"; - if (.@part == EQI_HAND_R) - mes "Where's your weapon?"; - else - mes "Why don't you go wear that equipment first?"; - close; - } - if (.@equip_id != .@eq_req) { - mes "[Equipment Researcher]"; - mes "Please equip " + callfunc("F_GetArticle",getitemname(.@eq_req)) + " ^4d4fff+9 " + getitemname(.@eq_req) + ".^000000"; - close; - } - if (getequiprefinerycnt(.@part) < 9) { - mes "[Equipment Researcher]"; - mes "I can only upgrade equipment that is ^4d4fffrefined to at least +9.^000000"; - close; - } - mes "[Equipment Researcher]"; - mes "There you go."; - delequip .@part; - delitem .@items_req[0], .@items_req[1]; - delitem .@items_req[2], .@items_req[3]; - getitem .@reward,1; - close; } @@ -1511,141 +775,19 @@ alberta,226,28,3 script Equipment Researcher 4_TOWER_15,{ // Exchange npc com_d02_i,234,266,6 script Village Soap#Lu 4_M_ORIENT01,{ - if (checkweight(1201,3) == 0) { - mes "- You cannot proceed because you have too many items. -"; - close; - } - disable_items; - setarray .@equipment_id[0], - 18174, - 28626, - 19366, - 15348, - 22192, - 20923; - setarray .@equipment_name$[0], - getitemname(.@equipment_id[0]), - getitemname(.@equipment_id[1]), - getitemname(.@equipment_id[2]), - getitemname(.@equipment_id[3]), - getitemname(.@equipment_id[4]), - getitemname(.@equipment_id[5]); - mes "[Village Soap]"; mes "I've also rolled up my sleeves for the adventurers who work hard for the village. Can I make your equipment stronger? Is there anything on the list you want?"; next; - .@s = select( "[Material Check] View catalog.", "[Production Request] " + .@equipment_name$[0], "[Production Request] " + .@equipment_name$[1], "[Production Request] " + .@equipment_name$[2], - "[Production Request] " + .@equipment_name$[3], "[Production Request] " + .@equipment_name$[4], "[Production Request] " + .@equipment_name$[5] ) - 2; - if (.@s == -1) { + if (select( "Look at the illusion equipment", "Cancel" ) == 2) { mes "[Village Soap]"; - mes "Are you curious about the ingredients? Take a look."; - while(1) { - next; - .@s = select( "Stop watching", "[Material Check] " + .@equipment_name$[0], "[Material Check] " + .@equipment_name$[1], "[Material Check] " + .@equipment_name$[2], - "[Material Check] " + .@equipment_name$[3], "[Material Check] " + .@equipment_name$[4], "[Material Check] " + .@equipment_name$[5] ) - 2; - if (.@s == -1) { - mes "[Village Soap]"; - mes "If you equip the required equipment and bring the ingredients, I'll make it for you in no time."; - close; - } - .@size = callsub( S_Data, .@equipment_id[.@s], .@equip_id_refined, .@req_id, .@req_amount, .@part ); - - mes "" + mesitemlink(.@equipment_id[.@s]) + ""; - mes "**********************************"; - if (.@equipment_id[.@s] == 18174) - mes "1 " + mesitemlink(.@equip_id_refined) + ""; - else - mes "1 " + mesitemlink(.@equip_id_refined) + ""; - for ( .@i = 0; .@i < .@size; ++.@i ) - mes "" + .@req_amount[.@i] + " " + mesitemlink(.@req_id[.@i]) + ""; - } - end; - } - .@size = callsub( S_Data, .@equipment_id[.@s], .@equip_id_refined, .@req_id, .@req_amount, .@part ); - - if (getequiprefinerycnt(.@part) < 9) { - mes "[Village Soap]"; - mes "I don't care what this equipment is, but it needs to be refined to at least +9."; + mes "Please come later. Just bring the ingredients and I'll make it for you."; close; } - if (getequipid(.@part) != .@equip_id_refined) { - mes "[Village Soap]"; - mes "Eheh- This dude misunderstood me. Do you have to equip the equipment that becomes the material?"; - close; - } - // todo text (currently custom) - - for ( .@i = 0; .@i < .@size; ++.@i ) { - if (countitem(.@req_id[.@i]) < .@req_amount[.@i]) { - mes "[Village Soap]"; - mes "You don't have enough items."; - close; - } - } - delequip .@part; - for ( .@i = 0; .@i < .@size; ++.@i ) - delitem .@req_id[.@i], .@req_amount[.@i]; - getitem .@equipment_id[.@s],1; + mes "[Village Soap]"; + mes "Who made it? It might be useful for you to take it with you."; + close2; + callshop( "barter_ill_luanda" ); end; - -S_Data: - switch( getarg(0) ) { - case 18174: - set getarg(1), 1726; // .@equip_id_refined, - setarray .@req[0], - 25636,50, - 25640,50, - 25637,50, - 25271,80; - set getarg(4), EQI_HAND_R; - break; - case 28626: - set getarg(1), 1552; - setarray .@req[0], - 25642,100, - 25271,50; - set getarg(4), EQI_HAND_R; - break; - case 19366: - set getarg(1), 5128; - setarray .@req[0], - 25634,30, - 25633,150, - 25271,120; - set getarg(4), EQI_HEAD_TOP; - break; - case 15348: - set getarg(1), 2354; - setarray .@req[0], - 25641,100, - 25638,150, - 25271,80; - set getarg(4), EQI_ARMOR; - break; - case 22192: - set getarg(1), 2419; - setarray .@req[0], - 25635,100, - 25633,150, - 25271,80; - set getarg(4), EQI_SHOES; - break; - case 20923: - set getarg(1), 2520; - setarray .@req[0], - 25639,30, - 25638,150, - 25271,120; - set getarg(4), EQI_GARMENT; - break; - } - .@size = getarraysize(.@req); - - for ( .@i = 0; .@i < .@size; .@i += 2 ) { - set getelementofarray(getarg(2), .@i/2), .@req[.@i]; - set getelementofarray(getarg(3), .@i/2), .@req[.@i+1]; - } - return (.@size/2); }