add_bot_chat - ryzom/ryzomcore GitHub Wiki


title: Add Bot Chat description: published: true date: 2023-03-13T03:11:12.189Z tags: editor: markdown dateCreated: 2023-03-13T03:11:08.989Z

addBotChat

The addBotChat native AI script function adds an entry to the botchat menu for every bot in the group, with the specified text ID.

Syntax

()addBotChat(BotChat: s) // addBotChat_s_

Arguments

  • BotChat (string): The text ID to add to the botchat menu.

Example

()setSimplePhrase("QUESTION", "How are you?");
()setSimplePhrase("REPONSE", "I'm fine, thank you!");
()addBotChat("menu:QUESTION:REPONSE");

This example sets two simple phrases using setSimplePhrase, then adds a botchat menu entry with the text ID "menu:QUESTION:REPONSE". When the botchat menu is opened, the bot will display "How are you?" and, if selected, respond with "I'm fine, thank you!".

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