Purpose
Players type /warehouse to open the warehouse anywhere. It can be limited to VIPs, charge Zen each time it is opened, or be allowed only in safe zones.
How to enable
- Add the command to
Data\Commands\LuaCommands.xml, inside<CommandSystem>:
The command name is arbitrary; the<Command ID="2001" name="warehouse" Description="Mobile warehouse" Authority="0"/>IDmust match theCommandkey inConfig.lua. - Remove the
--in front ofLoadModule("Warehouse\\Warehouse")inMain.lua. - Edit
Includes\Warehouse\Config.lua. - Click Reload LuaAPI.
No SQL needed. The module attaches OnCommandManager.
Configuration (Config.lua, WarehouseConfig table)
| Key | Value | Default | Meaning |
|---|---|---|---|
Enable | true / false | true | Turns the module on / off. |
Command | number | 2001 | Command ID in LuaCommands.xml. |
MinVip | number | -1 | Minimum VIP level allowed to use it; -1 = everyone. |
Price | Zen | 0 | Zen charged each time it is opened (0 = free). Only deducted when the warehouse can actually be opened. |
SafeZoneOnly | true / false | false | true: can only be opened in a safe zone (town). |
Text | table | (built in) | NoVip, NoMoney (contains %d = amount of Zen), NotSafe, CantOpen (another window is open). |