Management ɛʟ Ǥʟɑçѳи 🧊 8150 Posted February 4, 2021 Management Share Posted February 4, 2021 Hello, This tutorial will show you how to create a shop with an NPC. There are two types of shops: One shop: When you click on a NPC, a shop window opens. The first part will be enough for you to create a simple shop. Multi shop: Which consists of assigning several shops to an NPC using a quest. Prerequisites Own a Metin2 server with access to the database. Have an NPC available. Set up a quest. I. Create a shop or modify a shop Révélation 1. On Navicat, go to the player database and open the shop table. 2. The shop table looks like this: We have the following columns: vnum: A vnum that you will give to your shop. It must be unique. name: The name does not appear anywhere but you can put what you want, it will serve as a guide. npc_vnum: The NPC vnum. You can find your NPC in the mob_names.txt of your server. Success! You can now add a line (with the + button at the bottom of Navicat) to add a new shop. Once completed, remember to save your changes. 3. Now that the shop is created, let's assign the desired items in it. Open the shop_item table (which is still in player database) We have the following columns: shop_vnum: Corresponds to the vnum of your shop. item_vnum: Corresponds to the vnum of the item you want to add. The item vnum can be found in the item_names.txt of your server. count: Corresponds to the quantity of the item you want to sell (make sure the item is stackable) Success! Add as many lines as there are items you want to add. Once done, you can restart your Metin2 server. II. Multi Shop Révélation 1. Start by creating your shops and assigning them items by following Part I (if you haven't already done so). 2. To assign several shops to an NPC, you will have to create a quest. Here is a simple quest to explain how it works: quest QUESTNAME begin state start begin when NPCID1.chat."NAME1" begin npc.open_shop(SHOPID1) setskin(NOWINDOW) end when NPCID1.chat."NAME2" begin npc.open_shop(SHOPID2) setskin(NOWINDOW) end when NPCID1.chat."NAME3" begin npc.open_shop(SHOPID3) setskin(NOWINDOW) end end end Here is what my annotations correspond to: QUESTNAME: The name of your quest. Put what you want. NPCIDx: The vnum of the NPC you want to assign a shop to. NAMEx: The name of the shop (which will appear in the shops menu when the NPC is clicked). SHOPIDxx: The vnum of the shop you want to assign. 3. Suppose I want to assign an NPC several arms shops. This would give: quest multi_shop begin state start begin when 9001.chat."Armors" begin npc.open_shop(100) setskin(NOWINDOW) end when 9001.chat."Shields" begin npc.open_shop(101) setskin(NOWINDOW) end when 9002.chat."Weapons" begin npc.open_shop(200) setskin(NOWINDOW) end end end 4. Implement the new quest and restart your Metin2 server. Example: Warning! When you create a quest, it's important to implement it in-game for it work. Success! Now you know how to manage your server shops! Sincerly, ASIKOO 11 2 9 1 20 I don't respond to any private messages, except for messages regarding ad system issues... For everything else, please join the Discord server and open a ticket... Link to comment Share on other sites More sharing options...
speedyHAZE 0 Posted February 5, 2021 Share Posted February 5, 2021 Holy Moly old shit... its 2008? Please use ShopEX, not Quest... 3 1 Link to comment Share on other sites More sharing options...
Forum Moderator Gurgarath 3076 Posted February 5, 2021 Forum Moderator Share Posted February 5, 2021 5 hours ago, speedyHAZE said: Holy Moly old shit... its 2008? Please use ShopEX, not Quest... This tutorial is one of a serie of tutorial that has the goal to help newcomers. Those are fairly old but still up to date. Shop ex was not a thing in 2012 and a tutorial with ShopEX will be released anyway. 6 Gurgarath coming soon Link to comment Share on other sites More sharing options...
Premium WeedHex 648 Posted February 25, 2021 Premium Share Posted February 25, 2021 On 2/5/2021 at 10:12 AM, speedyHAZE said: Holy Moly old shit... its 2008? Please use ShopEX, not Quest... You have to come from the bottom to get to the top, are you sure ShopEX is better than this? Link to comment Share on other sites More sharing options...
LightingStrikemt2 0 Posted December 8, 2021 Share Posted December 8, 2021 So if i want to add shop to an NPC with only 1 basic shop it will be like that ? quest QUESTNAME begin state start begin when NPCID1.chat."NAME1" begin npc.open_shop(SHOPID1) setskin(NOWINDOW) end end end Link to comment Share on other sites More sharing options...
Hik 114 Posted January 7, 2022 Share Posted January 7, 2022 Is it possible to do this also with ShopEx? Link to comment Share on other sites More sharing options...
ugm2 44 Posted October 28, 2022 Share Posted October 28, 2022 I hope this is not considered spam : - If I create a store according to the instructions, how/what do I have to do to position the shop/NPC permanently on e.g. Map1 ? Unfortunately I could not find any information here in the forum. Link to comment Share on other sites More sharing options...
Active Member ReFresh 2599 Posted October 31, 2022 Active Member Share Posted October 31, 2022 On 10/28/2022 at 6:07 AM, ugm2 said: If I create a store according to the instructions, how/what do I have to do to position the shop/NPC permanently on e.g. Map1 ? .../share/locale/english/map/metin2_map_c1 --> npc.txt 1 1 I'll be always helpful! Link to comment Share on other sites More sharing options...
erubaba 5 Posted March 31, 2024 Share Posted March 31, 2024 where do i change prices? 1 Link to comment Share on other sites More sharing options...
ValkeryE 92 Posted March 31, 2024 Share Posted March 31, 2024 1 hour ago, erubaba said: gdzie mogę zmienić ceny? player->item_proto 1 Link to comment Share on other sites More sharing options...
StarSoul 13 Posted March 12 Share Posted March 12 (edited) A small but major thing missed in Part I of this guide is that make sure the "on_click" value for the NPC you're wanting to use in "mob_proto.txt" on the server is changed to a value of 1. Otherwise the shop doesn't open when you click the NPC. I ran into this after doing everything else correctly and shop still wouldn't open. If you're having this issue too, that may be the reason. For more clarification, to add the NPC to a map, navigate to that map's folder in the server. For example, lets say you're wanting to put an NPC in Red Nation Map1. You would navigate to: usr/metin2/server/share/locale/english (or preferred language)/map/metin2_map_a1. You want to edit the "npc.txt" file. The first values "000 000" are the map coordinates where the NPC sits on the map. The last value is the NPC vnum. The "z" value is the direction the NPC is facing. I'll list out the direction values: 1. South direction 2. South-East direction 3. East direction 4. North-East direction 5. North direction 6. North-West direction 7. West direction 8. Southwest direction 0. Random direction (among the 8 previous ones) It is easiest to copy and past from an NPC that is already listed in the file then replace the coordinates, direction, and NPC vnum to your desired values. Save it to the server. Done. Edited March 12 by StarSoul Link to comment Share on other sites More sharing options...
Ace 3765 Posted March 14 Share Posted March 14 On 3/12/2025 at 10:26 PM, StarSoul said: A small but major thing missed in Part I of this guide is that make sure the "on_click" value for the NPC you're wanting to use in "mob_proto.txt" on the server is changed to a value of 1. Otherwise the shop doesn't open when you click the NPC. I ran into this after doing everything else correctly and shop still wouldn't open. If you're having this issue too, that may be the reason. For more clarification, to add the NPC to a map, navigate to that map's folder in the server. For example, lets say you're wanting to put an NPC in Red Nation Map1. You would navigate to: usr/metin2/server/share/locale/english (or preferred language)/map/metin2_map_a1. You want to edit the "npc.txt" file. The first values "000 000" are the map coordinates where the NPC sits on the map. The last value is the NPC vnum. The "z" value is the direction the NPC is facing. I'll list out the direction values: 1. South direction 2. South-East direction 3. East direction 4. North-East direction 5. North direction 6. North-West direction 7. West direction 8. Southwest direction 0. Random direction (among the 8 previous ones) It is easiest to copy and past from an NPC that is already listed in the file then replace the coordinates, direction, and NPC vnum to your desired values. Save it to the server. Done. Manage NPC / Monster spawn on your maps - Basic Tutorials / Beginners - Metin2Dev | M2Dev 1 Spoiler Ymir Entertainment was founded in 1999 in Seoul, Korea and is currently headed by Byoung Gwan Kim as CEO. The company started developing its first 2D online game Metin the same year it was founded. The game was commercially launched in Korea a year later and received a prize from the Korean Ministry of Information and Communication in December of the same year. Following the success of their flagship game Ymir Entertainment immediately started work on the game’s sequel Metin 2, which went into Closed Beta in Korea in May 2004. The game was officially launched in Korea and China in March 2005 before being launched in Asia, Europe and North America in the years that followed. In January 2011 all of the company’s shares were bought by Webzen Inc., a Korean game giant known for their popular MMORPG, MU Online. The company was also awarded Gameforge’s Global Best Partner of the Year in 2011. Source: https://mmos.com/publishers/ymir-entertainment Thank you ymir and F*** you Gameforge, 2011 you ruined it. Link to comment Share on other sites More sharing options...
Recommended Posts