Jewels Bank

Account-bound storage system for jewels and stackable items

The Jewels Bank provides account-wide storage for jewels and other stackable items, with capacity limits based on account level. Players can deposit and withdraw items across all characters on their account, with optional auto-deposit functionality.

File Location

GameServer/Data/Plugins/JewelsBank/JewelsBank.xml

Dependencies

Depends On
Purpose

DataServer

Stores account bank data in database

AccountLevel System

Determines storage capacity multipliers

Configuration Structure

<JewelsBank Enable="1" MaxItemsPerPage="9" ConfirmCooldownMs="1000">
    <AccountLimits>
        <!-- Storage capacity multipliers by account level -->
    </AccountLimits>
    <Items>
        <!-- Allowed items and their base storage limits -->
    </Items>
</JewelsBank>

Sections

Root Element

Attribute
Type
Default
Description

Enable

bool

0

Enable/disable the entire plugin

MaxItemsPerPage

int

9

Items displayed per page in UI (cosmetic)

ConfirmCooldownMs

int

1000

Milliseconds between deposit/withdraw actions to prevent spam

circle-info

ConfirmCooldownMs prevents accidental double-clicks and reduces database write load. 1000ms (1 second) is recommended for normal play.

AccountLimits

Defines storage capacity multipliers based on account level. The actual storage limit for each item is MaxCount × Multiplier.

Attribute
Type
Default
Description

Level

int

Required

Account level (0-4)

Multiplier

float

1.0

Storage capacity multiplier applied to all items

Example: With MaxCount="500" for Bless and Multiplier="2.0" for AL2:

  • AL2 players can store 500 × 2.0 = 1,000 Jewels of Bless

Items

Defines which items can be stored and their base maximum counts.

Attribute
Type
Default
Description

Type

int

Required

Item type category (e.g., 14 = Jewels, 12 = Wings/Bundles)

Index

int

Required

Item index within type

Level

string

*

Item level filter: * = all levels, or specific level (0-15)

MaxCount

int

100

Base storage limit before account level multiplier

Name

string

-

Display name for logging (not shown to players)

Item Code Calculation: ItemCode = Type × 512 + Index

Example: Jewel of Bless = 14 × 512 + 13 = 7181

Level Matching Behavior

circle-info

The Level attribute determines level-specific storage:

  • Level="*" - Stores all item levels together (aggregated count)

  • Level="0" - Separate storage for level 0 items only

  • When depositing with Level="*", items preserve their actual level internally but display as a combined total

Example Configuration:

  • Level="*": All Box of Kundun levels (+1 to +5) share one storage pool

  • Level="0", Level="1", etc.: Each level has separate storage

Important Behavior

circle-info

Account-Wide Storage: The bank is shared across all characters on an account. If Character A deposits 100 Bless, Character B can withdraw them.

circle-info

Level Preservation: When depositing items with Level="*" configuration, the system internally tracks each item's actual level. Withdrawing retrieves items at their original level, even though they display as a combined count.

circle-exclamation
circle-exclamation

Item Code Reference

Common jewel item codes for configuration:

Item Name
Type
Index
ItemCode
Notes

Jewel of Bless

14

13

7181

Core jewel

Jewel of Soul

14

14

7182

Core jewel

Jewel of Life

14

16

7184

Core jewel

Jewel of Creation

14

22

7190

High-tier jewel

Jewel of Chaos

12

15

6159

Type 12, not 14!

Jewel of Guardian

14

31

7199

Socket jewel

Jewel of Harmony

14

41

7209

Harmony jewel

Gemstone

14

43

7211

Socket item

Lower Refine Stone

14

44

7212

Refining

Higher Refine Stone

14

45

7213

Refining

Box of Kundun

14

11

7179

Level-specific (0-15)

Bless Bundle

12

30

6174

Bundle item

Soul Bundle

12

31

6175

Bundle item

Examples

Result: Standard account (AL0) can store 500 of each core jewel, AL1 gets 750, AL2 gets 1000.

Client Protocol

The Jewels Bank uses custom F3 subcode packets for client communication:

Packet
Direction
Subcode
Purpose

Open Request

C→S

0x70

Player opens bank

Bank Data

S→C

0x70

Server sends bank contents

Deposit Request

C→S

0x71

Player deposits items

Withdraw Request

C→S

0x72

Player withdraws items

Result

S→C

0x73

Transaction result notification

Auto-Deposit Toggle

C↔S

0x78

Toggle auto-deposit setting

Common Issues

circle-exclamation
circle-exclamation
circle-exclamation
triangle-exclamation

Database Tables

The DataServer requires these tables:

  • JewelsBank - Stores item counts per account (row-per-item storage)

  • JewelsBankSettings - Stores auto-deposit preference per account

  • JewelsBankLog - Transaction history for auditing

circle-info

The main table is named JewelsBank (not JewelsBankData). Each row stores a specific ItemCode + ItemLevel combination for an account with its count.

Last updated