Иконка ресурса

Клиент [aCis] Painel de Admin Search 2026-07-10

Нет прав для скачивания
Хроники
  1. Interlude
[Java/HTML] Item Search Panel (Admin Search) Improvement with Quick Creation

Hey everyone! I’m sharing a very useful improvement I made to the admin panel (`AdminSearch.java`), designed to make life easier for staff when searching for and creating in-game items.

Originally, the `//admin_search` command only listed items, but now it is fully interactive, allowing for 1-click item creation or the specification of exact quantities directly within the search panel, all with a 100% optimized layout.

⚙️ What the code does (Core Features)
This code replaces the default handler for the `admin_search` command. When a GM types an item keyword (e.g., `//admin_search adena`), the server performs the following actions:

Data Reading (Templates): It scans the `ItemTable` (which loads the server's XML files, such as `game\data\xml\icons.xml`) and filters for all items that match the search term.

Information Extraction: It automatically retrieves the `ItemId` and `Name`, checks if it is a quest item (`isQuestItem`), and fetches the corresponding icon path directly from the game textures (e.g., `icon.etc_adena_i00`).

Smart Pagination: It limits the display to 6 items per page to avoid exceeding the L2 HTML window limit, automatically creating PREV and NEXT buttons.

✨ Improvements and New Features (What's different?)
1. Quick Creation (1-Click): The item icon and name are now clickable links (using invisible buttons and `<a>` tags). Clicking either one triggers the `admin_create_item <ID> 1` bypass. In other words: found the item? Just click the icon, and it goes straight into your inventory!

2. Custom Quantity Creation: For stackable items (like Adena, materials, etc.), I added a form input on the same line as the item. There is a text field (`<edit>`) where you can enter the desired quantity.

There is a "Create" button next to it.

The technical trick: The code generates a unique variable for each item on the screen (e.g., `$qty_0`, `$qty_1`). This allows the server to know exactly which text box to pull the number from when triggering the bypass to create the items.

3. Optimized Layout (No horizontal scrollbar): The Lineage 2 HTML engine is quite finicky about spacing. The layout was redesigned using tables (`<table>`, `<tr>`, `<td>`) with a calculated maximum width of 280 pixels. The ID, the text field, and the "Create" button share this space perfectly on a single line, respecting margins so that the vertical scrollbar doesn't break the interface.

Search.webp
Назад
Сверху Снизу