Items that run a common event when used: a phone that opens a Jobs menu, a key fob, a lucky coin.
Item Use Events
An item can run a common event when the player uses it. A phone in the bag that opens a Jobs menu, a key fob that opens the garage, a lucky coin that flips heads or tails: the event is the whole effect, and the item stays in the bag. A food or potion can run one too, after it is eaten or drunk.
The game server runs the event for the player who used the item, so everything the event does (Show Choices, Show Custom UI, Change Items, Start Quest, Start Minigame) happens to that player.
Where to author it#
Database → Items, open the item, Advanced tab → On Use Event.
Make a phone that opens a Jobs menu#
- Make the common event first (Events → Common Events): for a Jobs hub, a Show Choices
with one branch per job, each starting its quest or giving its directions.
- Make the phone item (Database → Items). Give it a type with no use of its own, such as
Component, so it is kept when used.
- On the Advanced tab, under On Use Event, pick the event in Using this item runs.
- Save and publish. In game the phone has a Use button in the bag, and the hotbar key works
too.
The fields#
| Field | What it does |
|---|---|
| Using this item runs | The common event. None = the item runs no event |
What is used up#
What happens to the item depends on its type:
| Item type | What using it does |
|---|---|
| Food, Potion, Pet Food | Eaten or drunk as usual (one is used up), then the event runs |
| Anything else that has no use of its own (Component, Quest Item, Accessory, …) | The event runs and the item is kept |
| Items with Use Ability, Return / Teleport or Enter Instance set | They do their own thing; the event does not run |
To make an item that is spent when its event runs, use a Potion with no restore values, or end the event with Change Items to take the item away.
Gotchas#
- Using it again while its event is still running does nothing, so mashing Use cannot stack the
event.
- A Quest Item shows Read instead of Use. It still runs the event, and if a quest names
it as its start item, that quest starts first.
- A wearable item (an Accessory) still gets a Use button, but right-click wears it. Use a
Component for a phone that is never worn.
- A Food with no restore values gets a small hunger restore filled in automatically. For a drug
or pill whose whole effect is a status, use a Potion.
- A Potion whose only effect is a status ("High") or a timed passive is used up. It no longer
stays in the bag after it is used.
- If the event is deleted, the item stops working ("cannot be used") until you pick a new one.
- Behind the Item Use Events flag (on by default). Off = items run no event; food and potions
still work.