Overview

The InventorySort plugin shows a Sort button (btnSort) in the inventory window. When clicked, the client sends a request to the server; the server rearranges the items itself and then sends back the whole inventory (the client does not move any item itself, and the positions are saved in the character data).

  • Each area of the bag is sorted separately (the main area of 8 rows and the expansion areas). Large items are placed first: by area descending, then height, then item code, then (+) level descending.
  • Items that are in an active state in the bag (items the server considers activated) and the soul converter are kept in place.
  • If it cannot be sorted (not enough room), nothing is moved and the server writes an error to the log.
  • Click-spam protection: the client allows at least 1 second between clicks, the server at least 2 seconds.
  • The server refuses when the character is not allowed to move items, has another server interface window open (trade, warehouse...) or has a personal shop open / busy.

Requirements

  • The InventorySort plugin is purchased and [Plugin] InventorySort = 1. Not purchased / off: the button is hidden and the client does not send requests.
  • Client: Main.dll and Data\Interface\GFx\InventoryFrame.ozg with the btnSort button; the button label comes from the client's text.bmd (ID 92).

[TO VERIFY: the GameServer code that handles the sort request does not check the InventorySort key again by itself; blocking relies on the button being hidden on the client]

Configuration

KeyValueDefaultMeaning
InventorySort (section [Plugin])0 or 11Plugin switch (must be purchased). No separate detail section.
[Plugin]
InventorySort	= 1

Applying changes

Click Reload plugin on the GameServer panel; the button is shown / hidden according to the configuration packet the server re-sends to players who are online.