Brazil's biggest MU Online portal — since 2003
Tutorial Advanced Tutoriais

How to Implement Advanced In-Game Shop on MU Online Server

Learn how to set up a full in-game shop on your MU Online S6 server, covering NPCs, SQL tables, currency integration and economy balancing.

VI ViciadosMU Team · Updated on 4 jul 2026 · ⏱ 12 min read

What is the In-Game Shop and Why It Matters

On private MU Online Season 6 servers, the in-game shop is a custom NPC that allows players to exchange internal currencies — Zen, Credits, Ruud, WCoin or any custom token — for items, temporary buffs, consumables and services. It is not a native feature of the MU S6 client, but can be implemented by editing SQL tables, configuring NPCs and integrating with the GameServer.

A well-configured shop improves player retention, balances the server economy and reduces dependence on random drops in the early levels. Poorly configured, it destroys progression and empties the farming maps.

Nota: This tutorial is strictly educational. All procedures described apply to learning and local development environments. We do not address paid services, real player charges or commercial server operation.

Technical Prerequisites

Before starting the shop configuration, make sure you have:

  • A working MU Online S6 server (GameServer, ConnectServer, DataServer active)
  • SQL Server access with the MuOnline database configured
  • A text editor (Notepad++ recommended) and access to the server folders
  • Basic SQL knowledge and familiarity with tables T_Item, T_ShopItem, T_Money
  • A Season 6 Episode 3 compatible client configured locally

MU Online S6 has 6 playable classes with distinct evolution trees:

Dark Knight     → Blade Knight    → Blade Master
Dark Wizard     → Soul Master     → Grand Master
Fairy Elf       → Muse Elf        → High Elf
Magic Gladiator → Duel Master     (no 1st/2nd quest, no Wing L1)
Dark Lord       → Lord Emperor    (exclusive stat: CMD)
Summoner        → Bloody Summoner → Dimension Master

Each class has equipment restrictions. The in-game shop must respect these restrictions to avoid client-side conflicts.

SQL Structure of the Shop

The in-game shop operates primarily on the T_ShopItem table (or its equivalent in your server package). The basic structure is:

-- Example custom shop table structure
CREATE TABLE [dbo].[CustomShop] (
    [ShopID]        INT           NOT NULL,
    [ItemCategory]  INT           NOT NULL,  -- 0=Weapons, 1=Armors, 2=Jewels, 3=Consumables
    [ItemIndex]     SMALLINT      NOT NULL,
    [ItemLevel]     TINYINT       DEFAULT 0,
    [ItemOption]    TINYINT       DEFAULT 0,  -- Luck, Skill, etc.
    [ItemExc]       TINYINT       DEFAULT 0,
    [PriceZen]      BIGINT        DEFAULT 0,
    [PriceCredit]   INT           DEFAULT 0,
    [RequireClass]  TINYINT       DEFAULT 0,  -- Class bitmask
    [RequireLevel]  SMALLINT      DEFAULT 0,
    [StockLimit]    INT           DEFAULT -1, -- -1 = unlimited
    [Active]        BIT           DEFAULT 1,
    CONSTRAINT [PK_CustomShop] PRIMARY KEY ([ShopID])
);

To populate the shop with starter items aimed at new players:

-- Add starter items for Dark Knight (RequireClass bitmask = 1)
INSERT INTO [dbo].[CustomShop]
    (ShopID, ItemCategory, ItemIndex, ItemLevel, PriceZen, PriceCredit, RequireClass, RequireLevel)
VALUES
    (1, 0, 0, 4, 500000, 0, 1, 150),   -- Bronze Sword +4, DK, level 150
    (2, 1, 5, 3, 300000, 0, 1, 100),   -- Scarlet Armor +3, DK, level 100
    (3, 2, 14, 0, 50000, 0, 0, 1),     -- Jewel of Bless, any class
    (4, 2, 15, 0, 50000, 0, 0, 1),     -- Jewel of Soul, any class
    (5, 3, 0, 0, 10000, 0, 0, 1);      -- Large Health Potion, any class
Atenção: Never insert Level 3 Wings directly into the shop. Wings L3 are part of the maximum progression cycle: they are crafted with Wing L2 + 3x Loch's Feather + Jewel of Creation. Loch's Feather only drops from Balgass, who appears only when the Crywolf event FAILS. Removing this item from natural progression breaks the server's late-game entirely.

NPC Configuration

In MU Online S6, NPCs are defined in server configuration files, typically in Data\MonsterSetBase.txt (or equivalent). The shop NPC needs a specific entry:

// Format: MapID, NPC_ID, PosX, PosY, Dir, Respawn, Quest
// Lorencia = Map 0 — position near the center (130, 135)
0   237   130   135   3   0   0

NPC index 237 is commonly the Wandering Merchant or a custom NPC mapped to the shop routine. Check your server package to find which index is free and configure the corresponding client text file to display the correct name.

For servers using WebEngine or similar systems, NPC configuration can be done via the web admin panel without manual file editing. In this case, the NPC creation form already exposes the fields ShopID, MapID, PosX and PosY.

Currency System Integration

Most S6 packages support multiple simultaneous currencies. The advanced shop should accept at least:

Zen — MU's base currency. Generated by monster drops on all maps, from Lorencia to Acheron. Highly available in the early game, but inflates as the server ages.

Credits / WCoin — secondary currency, usually distributed by online time, automatic events like Blood Castle and Devil Square, or administrative quest rewards. Never associate credits with real payments in this educational context.

Ruud — present in some S6 versions and later seasons. If your package supports it, configure the T_Ruud table and reference the PriceRuud field in the shop.

-- Procedure to process a purchase with balance validation
CREATE PROCEDURE [dbo].[usp_ShopPurchase]
    @AccountID  NVARCHAR(10),
    @CharName   NVARCHAR(10),
    @ShopID     INT
AS
BEGIN
    DECLARE @Price    BIGINT
    DECLARE @ZenNow   BIGINT

    SELECT @Price = PriceZen FROM CustomShop WHERE ShopID = @ShopID AND Active = 1
    SELECT @ZenNow = Money FROM Character WHERE Name = @CharName

    IF @ZenNow >= @Price
    BEGIN
        UPDATE Character SET Money = Money - @Price WHERE Name = @CharName
        -- Item delivery via GameServer packet or pending table
        INSERT INTO PendingItems (CharName, ShopID, RequestTime)
        VALUES (@CharName, @ShopID, GETDATE())
    END
    ELSE
        RAISERROR('Insufficient Zen.', 16, 1)
END
Dica: Implement a pending table (PendingItems) instead of delivering items directly via SQL. The GameServer reads this table on character login and delivers items safely, avoiding duplication or item loss errors in case of disconnection during the transaction.

Price Balancing by Progression Phase

An unbalanced shop is more damaging than no shop at all. Use this S6 level range reference as a guide:

  • Level 1–150: Low-level items, no options, affordable Zen prices. Goal: ease the early game without eliminating farming in Lorencia, Noria and Devias.
  • Level 151–300: Consumables, Jewels of Bless and Soul, scrolls. Moderate prices. Farming in Dungeon (3 floors), Lost Tower (7 floors) and Atlans (3 floors) should still be more efficient for equipment items.
  • Level 301–400: Second tier sets, basic options. Credits as preferred currency. Farming in Tarkan, Icarus, Aida and Karutan should remain relevant.
  • Level 400+: Consumables and support items only. End-game items like excellent sets should come exclusively from drops in Raklion, Vulcanus, Acheron, Land of Trials and through Chaos Castle / Kanturu / Kalima mechanics (maps 1 through 7).

Logs and Auditing

Every shop transaction must be recorded. Implement a log table:

CREATE TABLE [dbo].[ShopLog] (
    [LogID]        BIGINT IDENTITY(1,1) PRIMARY KEY,
    [LogDate]      DATETIME DEFAULT GETDATE(),
    [AccountID]    NVARCHAR(10),
    [CharName]     NVARCHAR(10),
    [ShopID]       INT,
    [ItemCategory] INT,
    [ItemIndex]    SMALLINT,
    [PricePaid]    BIGINT,
    [Currency]     NVARCHAR(10)  -- 'ZEN', 'CREDIT', 'RUUD'
);

With the log active, the Game Master can identify abuses, duplications and anomalous behavior. Use the purchase procedure to insert into this table on every successful transaction.

Common Mistakes and How to Avoid Them

Item delivered with wrong attributes: Check the ItemLevel, ItemOption and ItemExc fields in the table. An item with ItemExc = 63 has all excellent options active — this can break balance completely.

NPC disappearing after restart: Make sure the entry in MonsterSetBase.txt uses respawn disabled (Respawn = 0) for fixed NPCs. Some packages reset dynamic NPCs when the GameServer restarts.

Duplicate purchase: Always use SQL transactions (BEGIN TRAN / COMMIT / ROLLBACK) in the purchase procedure. Without transactional control, two simultaneous requests can debit Zen twice or deliver the item twice.

Magic Gladiator without access to items: The MG skips the 1st and 2nd quests and starts as Duel Master. Configure RequireClass correctly — the MG normally uses a different bitmask than pure DK and DW. Check your package documentation for the correct values.

Stats confusion: Remember that S6 uses five stats: STR, AGI, VIT, ENE and CMD (the last one exclusive to the Dark Lord). Items requiring high ENE should not appear in DK-exclusive sections, and CMD-boosting gear should be clearly labeled for Dark Lord and Lord Emperor only.

Perguntas frequentes

Can I sell Level 3 Wings in the in-game shop?

Technically you can register the item in the table, but it is strongly discouraged. Wings L3 (Dragon Wing, Soul Wing, etc.) require the crafting process using Loch's Feather — which only drops from Balgass when the Crywolf event FAILS — plus the Jewel of Creation. Selling them directly dismantles the entire mid and end-game progression loop.

Can the Magic Gladiator buy items from any class in the shop?

The MG starts directly at the third class (Duel Master) and uses equipment from both DK and DW. The shop should filter by class via the requirement column — items with RequireClass = 2 (DK) or RequireClass = 8 (DW) can be made accessible to the MG depending on your server configuration.

How do I prevent players from abusing the shop to farm infinite Zen?

Set SellPrice very low or zero on shop items. Disable the option to resell shop-purchased items to the default NPC, using an origin flag on the item or verifying the transaction source via GameServer.exe logic.

The Dark Lord needs CMD points to use his mount. Does the shop sell mounts?

The Dark Lord uses the exclusive Command (CMD) stat to summon and strengthen the Dark Horse and Dark Raven. The shop can offer related scrolls or support items, but the mount itself is tied to the character via a specific quest — the shop cannot substitute the conquest process.

VI

ViciadosMU Team

Equipe editorial do ViciadosMU — portal de MU Online no ar desde 2003.

Keep reading

Related articles