Skip to content
MOMU EMULATOR THE SERVER OWNER’S LIBRARYNeed a hand? Get support ↗
MOMUEMULATOR
简体中文
PRACTICAL TUTORIAL / 304 min read · Beginner

Create a gift or promotion code

Gift codes are validated by GameServer, while DataServer centrally enforces the account/code redemption record. Inventory items are delivered to Cash Shop Storage in the supplied implementation.

Recorded procedureEdition 2.0 · English / 简体中文
01 / WHAT YOU WILL LEARN

The outcome to aim for

Gift codes are validated by GameServer, while DataServer centrally enforces the account/code redemption record. Inventory items are delivered to Cash Shop Storage in the supplied implementation.

Before you start

Read the complete procedure and its version notes. Record the affected server role and keep an untouched backup outside scanned data folders.

ScopeTeaching examples and recorded structures. Application and gameplay must be verified on your deployed version.

Files you need

VISUAL WALKTHROUGH

One step at a time

  1. STEP 1

    Keep the actual codes private until the promotion begins. Back up configuration and verify the required database schema before adding a campaign.

  2. STEP 2

    Set GiftCode Enabled and update CodeCount to include the new CodeN section. Choose a unique code using A-Z, digits, dash or underscore.

  3. STEP 3

    Set Enabled, StartUnix/EndUnix, MaxGlobalUses, MinLevel, MinReset and AllowedClass for that code. A zero bound or -1 class has a specific meaning documented in the file.

  4. STEP 4

    Set RewardCount and each RewardN. ITEM uses the full comma-separated item layout. WCOINC, WCOINP, GOBLIN, RUUD, COINATM and ZEN accept amounts; BUFF uses effect and duration/value fields.

  5. STEP 5

    Apply using the module’s verified load path or a controlled restart. Test valid code, wrong code, expired code, class/level rejection, second redemption and redemption from another character on the same account.

Configuration example

TUTORIAL EXAMPLE · MERGE FRAGMENT

Keep the existing root/sections and unrelated rows. This example is not a complete original or a full replacement file.

TEACHING FRAGMENT
; Training example only: merge into the existing file and update CodeCount.
[Code2]
Enabled=1
Code=WELCOME-DEMO
Description=Training example
StartUnix=0
EndUnix=0
MaxGlobalUses=100
MinLevel=1
MinReset=0
AllowedClass=-1
RewardCount=1
Reward1=ITEM,14,13,0,1,0,0,0,0,0,0,0,0

Apply the real change

Use the load method stated in the steps for this system. Startup-only settings require a planned restart. The reload finder below shows recorded groups; confirm whether the particular field is startup-only.

Find the file’s reload instructions →

Verify the result in game

If the expected result is missing, restore the backed-up files and repeat the same reload/restart before adding another change.

Dependencies & important details

Changing a code’s text or deleting a database redemption row can alter who may claim it again. Keep campaign history; do not clear redemption records as a routine configuration step.

Built around the supplied MOMU configuration snapshot. Reference entries flag alternate copies and unconfirmed fields. Match the guide to your deployed version; archived packages and live gameplay were not audited by publishing these pages.