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

  1. Add the command to Data\Commands\LuaCommands.xml, inside <CommandSystem>:
    <Command ID="2001" name="warehouse" Description="Mobile warehouse" Authority="0"/>
    The command name is arbitrary; the ID must match the Command key in Config.lua.
  2. Remove the -- in front of LoadModule("Warehouse\\Warehouse") in Main.lua.
  3. Edit Includes\Warehouse\Config.lua.
  4. Click Reload LuaAPI.

No SQL needed. The module attaches OnCommandManager.

Configuration (Config.lua, WarehouseConfig table)

KeyValueDefaultMeaning
Enabletrue / falsetrueTurns the module on / off.
Commandnumber2001Command ID in LuaCommands.xml.
MinVipnumber-1Minimum VIP level allowed to use it; -1 = everyone.
PriceZen0Zen charged each time it is opened (0 = free). Only deducted when the warehouse can actually be opened.
SafeZoneOnlytrue / falsefalsetrue: can only be opened in a safe zone (town).
Texttable(built in)NoVip, NoMoney (contains %d = amount of Zen), NotSafe, CantOpen (another window is open).