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.
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.
Files you need
One step at a time
- STEP 1
Keep the actual codes private until the promotion begins. Back up configuration and verify the required database schema before adding a campaign.
- 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.
- 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.
- 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.
- 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.
Progress is saved only in this browser. Completion is your learning record, not proof of a live server change.
Configuration example
Keep the existing root/sections and unrelated rows. This example is not a complete original or a full replacement file.
; 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,0Apply 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.
