Informations
Jump to content

Lorem Ipsum...

Click to Dismiss this Notification
Ładowanie danych...

Recommended Posts

Hello there!

In this guide, I’ll walk you through the process of setting up a shop using an NPC. You can choose between two types of shops:

  1. Single Shop: This option allows you to open a shop interface by interacting with an NPC, which is ideal for creating a basic shop setup.
  2. Multi Shop: This approach involves linking multiple shops to a single NPC through a quest.

Prerequisites

  • Access to a Metin2 server along with the database.
  • An NPC set up and available for your use.
  • A configured quest framework.

I. Creating or Modifying a Shop

Step 1: Open the Shop Table

  1. Begin by launching Navicat, then navigate to the player database and open the shop table.

spacer.png

Step 2: Understanding the Shop Table Structure

  1. The shop table should appear as follows:

spacer.png

You’ll find the following columns in the table:

  • vnum: The unique identifier you’ll assign to your shop.
  • name: This is for your own reference and does not appear anywhere, so label it whatever helps you.
  • npc_vnum: This is the vnum for the NPC linked to your shop, which can be found in the mob_names.txt file on your server.

Great! You can now add a new entry by clicking the "+" button at the bottom of Navicat. Don’t forget to save your changes once you’re done!

Step 3: Assign Items to Your Shop

  1. With your shop created, it’s time to add the items you wish to sell. Open the shop_item table located in the player database.

spacer.png

spacer.png

The columns you’ll find in this table include:

  • shop_vnum: This corresponds to the vnum of your shop.
  • item_vnum: Corresponds to the unique vnum of the item you want to add, which can also be found in item_names.txt.
  • count: Indicates the number of items you wish to offer for sale (make sure these items can stack).

Fantastic! Add as many entries as you have items. Once you're finished, you can restart your Metin2 server to see your changes in action.


II. Setting Up a Multi Shop

Step 1: Create Your Shops

  1. Start by creating the shops and assigning items as per the instructions in Part I, if you haven’t done so already.

Step 2: Crafting a Quest for Multi Shops

  1. To link multiple shops to an NPC, you’ll need to create a quest. Here’s a simple example to illustrate how this works:
 
This is the hidden content, please

Let’s break down what each part means:

  • QUESTNAME: The name you choose for your quest; make it meaningful to you.
  • NPCIDx: The unique identification number of the NPC you want to assign to your shops.
  • NAMEx: The name of the shop that will appear in the menu when the NPC is clicked.
  • SHOPIDxx: The vnum of the shop you’re linking.

Step 3: Example of Multi Shop Assignment

  1. For instance, if you want to assign an NPC several weapon shops, your quest might look like this:
 
This is the hidden content, please

Step 4: Implement the New Quest

  1. Once you have crafted your new quest, make sure to implement it in the game and restart your Metin2 server.

spacer.png

Note: Implementing the quest in-game is crucial for it to function as intended.

Congratulations! You have now acquired the skills to effectively create and manage shops on your server!

Link to comment
Share on other sites


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

spacer.png

Disable AdBlock
The popup will be closed in 5 seconds...