npc_say - ryzom/ryzomcore GitHub Wiki


title: NPC Say description: published: true date: 2023-03-12T23:09:30.173Z tags: editor: markdown dateCreated: 2023-03-12T23:09:26.876Z

npcSay

The npcSay native AI script function allows a non-playable character (NPC) to say a text message.

()npcSay(s, s)

Syntax

()npcSay(Text: s, Mode: s)

Arguments

  • Text (string): The text of the message to say. It can be either a plain text string or a string ID with the prefix "ID:".
  • Mode (string): The mode to use for saying the message. It can be either "say" or "shout".

Example

()npcSay("Hello!", "say");

This example code makes the current NPC say the text message "Hello!" using the "say" mode.

()npcSay(c, s, s)

This enhanced variant was added to support Ryzom Ring specific features.

Syntax

()npcSay(Group: c, BotName: s, Text: s)

Arguments

  • Group (context): The NPC group of the bot that will perform the chat.
  • BotName (string): The name of the bot.
  • Text (string): The text of the message to say.

Example

(@group)group_name.context(); ()npcSay(@group, "bob", "DSS_1601 RtEntryText_6");

This example code makes the NPC named "bob" in the NPC group named "group_name" say the text message with the ID "DSS_1601 RtEntryText_6".

⚠️ **GitHub.com Fallback** ⚠️