Click Actions

Click Actions

View as Markdown ·

On this page

circle-info

The actions are saved in the NPC's own file in the npcs folder.

#Action Lists

Every NPC has three lists of actions:

Clicks (Left-Click Actions)

Clicks (Right-Click Actions)

List Runs on
Left Click Actions A left click, or a hit.
Right Click Actions A right click.
Any Click Actions Every click, after the left or right click actions.

The editor adds actions through the action builder, which asks for each field of the type you pick. Clicks with the off hand are ignored.

#What Stops a Click

  • The NPC is disabled, or the player cannot see it.
  • The player is still in the click cooldown.
  • A global cooldown or use limit is reached.
  • The player is in a dialogue that is still typing: the click skips to the full text instead.
  • Block While Running is on and the player's last actions are still running.
  • Another plugin cancels the click through the API.

Clicks (Click Cooldown)

Clicks (Block While Running)

A [PERMISSION], [CONDITION], [ITEM_COST] or [EXP_COST] action stops the rest of its own list for players who fail it. The other list still runs.

When a list stops partway, the items, experience and [CURRENCY_TAKE] money it already took are given back. Items and experience can't be returned to a player who left during a [DELAY], so they are only logged.

#Commands

/pnpc edit <id> action <click> <add|remove|clear|list> [action] does the same as the editor. <click> is left, right, any or proximity, the last one for proximity actions.

Command Does
/pnpc edit guide action right add MESSAGE Hello %player% Adds [MESSAGE] Hello %player% to the end of the list.
/pnpc edit guide action right remove 2 Removes the second action.
/pnpc edit guide action right list Lists the actions with their numbers.
/pnpc edit guide action right clear Empties the list.
My Cart
Spider

Your cart is empty

Looks like the spiders padded through here. Pick a plugin and it will show up here. Continue shopping