Aller au contenu
Afficher dans l'application

Une meilleure façon de naviguer. En savoir plus.

Asterobot

Une application plein écran sur votre écran d'accueil avec notifications push, badges et plus encore.

Pour installer cette application sur iOS et iPadOS
  1. Appuyez sur Icône de partage dans Safari
  2. Faites défiler le menu et appuyez sur Ajouter à l'écran d'accueil.
  3. Appuyez sur Ajouter dans le coin supérieur droit.
Pour installer cette application sur Android
  1. Appuyez sur le menu à trois points (⋮) dans le coin supérieur droit du navigateur.
  2. Appuyez sur Ajouter à l'écran d'accueil ou Installer l'application.
  3. Confirmez en appuyant sur Installer.

NpcGenericActionRequest

  • summary: Ask an NPC on the current map to run one of its actions.
  • area: Game.Npc

Ask an NPC on the current map to run one of its actions.

Kind request · Area Game.Npc

WHEN TO SEND IT

Send it when the player picks one of the actions an NPC offers - talk, open its shop, and so on. You need three things, and all three must agree:

the NPC's id the contextual id of the NPC ON THIS MAP, not a data id. It is the id the map sent you for that actor, and it is routinely NEGATIVE. Do not invent it and do not carry it across maps. the action id which of that NPC's actions you want. Small integer. the map id the map you are on RIGHT NOW.

Sending it before the map is loaded, with an NPC that is not on that map, or with an action that NPC does not offer, is refused.

WHAT COMES BACK

Nothing addressed to this request, when it works - the action itself answers. A dialogue action (talking to the NPC, using a portal NPC) answers with NpcDialogCreationEvent and then the NPC's first line, NpcDialogQuestionEvent; opening a shop answers with the shop's messages. On refusal the server sends a failure event that carries no payload, so it tells you THAT it failed and never why.

SO DO NOT WAIT ON A REPLY TO THIS MESSAGE. Wait on the action you asked for, and treat the empty failure as your only negative.

WHY THE MAP ID IS IN HERE

It is the server's guard against a stale click: the NPC id alone is ambiguous once you have changed map, and this pins the request to the map the player was actually looking at.

When you may send it

  • Requires context_ready observed
  • Requires character_loaded inferred

Related messages

  • You will receive one of NpcDialogCreationEvent observed — the success of a dialogue action (talking to the NPC, using a portal NPC): the dialog opens and its first line follows; 1 of 1 capture (action 3 on the Incarnam portal NPC). Other actions answer with their own workflow's messages instead
  • You will receive one of ExchangeNpcShopStartedEvent observed — the success of a merchant's buy/sell action: the shop opens with its stock; 1 of 1 capture (action 1 on NPC -20000, answered 29 ms later)
  • You will receive one of NpcGenericActionFailureEvent inferred — the refusal: an empty event, so it tells you THAT the action failed and never why

Fields

#FieldTypeMeaningYou set it
1npc_action_idint32Which of that NPC's actions to run. Small integer.required
2npc_map_idint64The map the player is on. Guards against a stale click.required
3npc_idint32The NPC's contextual id on the current map. Usually negative.required

Compte

Navigation

Recherche

Recherche

Configurer les notifications push du navigateur

Chrome (Android)
  1. Appuyez sur l'icône de cadenas à côté de la barre d'adresse.
  2. Tap Autorisations → Notifications.
  3. Ajustez vos préférences.
Chrome (Desktop)
  1. Cliquez sur l'icône représentant un cadenas dans la barre d'adresse..
  2. Select Paramètres du site.
  3. Find Notifications et ajustez vos préférences.