Skip to main content

MMO Inventory

Check MMOItems carried in custom MMOInventory slots, as a TypeWriter fact.

Freev0.7Integrations
RequiresTypeWriter0.9Quest (TypeWriter extension)MMOInventoryMMOItemsMythicLib

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:ID pair, for example ACCESSORY: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 — requireAllItems decides whether one match is enough or every listed item is required.
  • Usable as a condition — the fact returns 1 or 0, ready to use in any criteria.

Installation​

  1. Install MMOInventory, MMOItems and its required library MythicLib on the server.
  2. Make sure the official TypeWriter Quest extension is installed: MMO Inventory depends on it.
  3. Put the MMO Inventory JAR in plugins/Typewriter/extensions/.
  4. Restart the server.
  5. 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:

  1. In the TypeWriter web panel, open a static page and add a Check Item Fact entry.
  2. Set inventoryName to the name of the custom inventory in MMOInventory, for example accessories.
  3. Set itemsToCheck to ACCESSORY:RING_OF_FIRE. For several items, separate them with commas: ACCESSORY:RING_OF_FIRE, ACCESSORY:AMULET:2.
  4. Leave requireAllItems off if one match is enough, or turn it on to require every listed item.
  5. On the dialogue option (or any entry with criteria), add a criteria that uses this fact with the value 1.
  6. Click Publish and test with a player who has the item equipped in that inventory.
Format of itemsToCheck

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

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.