MMO Inventory
Overview
MMO Inventory connects MMOInventory to TypeWriter. MMOInventory adds custom equipment slots (accessories, capes, artifacts, and so on) that live outside the vanilla inventory. TypeWriter cannot see them on its own: this extension fills that gap.
It provides a single readable fact. The fact answers one question: does this player currently hold the MMOItems you list in one of your custom MMOInventory inventories? You can then use the fact as a criteria in dialogues, quests, audiences or any other entry that accepts criteria, for example to unlock a dialogue option only for players wearing a given artifact.
Only MMOItems are recognised. An item is matched by its MMOItems type and ID, not by its name or material.
Features
- Custom slot awareness — reads the items stored in a named custom inventory of MMOInventory, not in the vanilla inventory.
- Type and ID matching — identifies MMOItems by their
TYPE:IDpair, for exampleACCESSORY:RING_OF_FIRE. - Item amounts — each item can require a minimum amount, written as
TYPE:ID:amount. - Several items at once — list as many items as you want, separated by commas.
- Any or all —
requireAllItemsdecides whether one match is enough or every listed item is required. - Usable as a condition — the fact returns
1or0, ready to use in any criteria.
Installation
- Install MMOInventory, MMOItems and its required library MythicLib on the server.
- Make sure the official TypeWriter
Questextension is installed: MMO Inventory depends on it. - Put the MMO Inventory JAR in
plugins/Typewriter/extensions/. - Restart the server.
- Define your custom inventories in the MMOInventory configuration. The name you give to an inventory there is the one you will use in the panel.
Getting started
Unlock a dialogue option only for players who wear a specific ring in the accessories inventory:
- In the TypeWriter web panel, open a static page and add a Check Item Fact entry.
- Set
inventoryNameto the name of the custom inventory in MMOInventory, for exampleaccessories. - Set
itemsToChecktoACCESSORY:RING_OF_FIRE. For several items, separate them with commas:ACCESSORY:RING_OF_FIRE, ACCESSORY:AMULET:2. - Leave
requireAllItemsoff if one match is enough, or turn it on to require every listed item. - On the dialogue option (or any entry with criteria), add a criteria that uses this fact with the value
1. - Click Publish and test with a player who has the item equipped in that inventory.
Each token is TYPE:ID (amount 1) or TYPE:ID:amount. Type and ID are case-insensitive. A token that does not match this format is silently ignored; if no valid token remains, the fact returns 0.
How it works
The extension reads the plugin MMOInventory at runtime. Only items that carry MMOItems data are counted, and stacks of the same item are added together before being compared with the requested amount.
Entries
1 entries, generated from the extension source.
Facts1
- Mmoinventory Check Item FactCheck if player has specific MMOItem(s) in a MMOInventory
Troubleshooting
The fact is always 0. The extension returns 0 as soon as something is missing: inventoryName or itemsToCheck empty, the MMOInventory plugin not loaded, or the inventory empty. Check each one in that order.
The log says "Inventory 'x' not found". The name in inventoryName does not match a custom inventory defined in MMOInventory. Copy the name exactly as it appears in the MMOInventory configuration.
"Error accessing MMOInventory" appears in the console. The extension talks to MMOInventory through its API at runtime. This error means the installed MMOInventory version does not expose the expected methods. Update MMOInventory and report the full stack trace if it persists.
A vanilla or non-MMOItems item is never counted. Only items that have an MMOItems type and ID are taken into account. Create the item with MMOItems, or use another extension to check other item kinds.
The check passes with only one of my items. requireAllItems is off, so any single match is enough. Turn it on to require every item of the list.
An amount is ignored. Check the format: the amount must be the third part of the token (TYPE:ID:3) and must be a whole number. A token such as TYPE:ID:three is dropped.