phrase_end_npc_msg - ryzom/ryzomcore GitHub Wiki
title: Phrase End NPC Message description: published: true date: 2023-03-16T23:09:12.074Z tags: editor: markdown dateCreated: 2023-03-16T22:26:22.074Z
The phraseEndNpcMsg AI script function is used to send a message with parameters through a bot chat bubble. The parameters are taken from the parameter stack created by phrasePushValue and phrasePushString functions.
phraseEndNpcMsg(botIndex: s, sayType: s, phraseIdentifier: s) // phraseEndNpcMsg_fss_-
botIndex (string): The position of the bot in the group. See
getBotIndexByNamefunction. -
sayType (string): The type of the say dialog. Possible values are:
"say","shout","civilization","territory","universe","arround","system", and"region". - phraseIdentifier (string): The identifier phrase as seen in phrase_wk.uxt.
The function uses the parameter stack created by phrasePushValue and phrasePushString functions.
()phrasePushString("literal", "text non traduit");
()groupOf5Bot.phraseEndNpcMsg(4, "say", "PHRASE_TOTO");In this example code, a string is pushed onto the parameter stack using phrasePushString, and then the phraseEndNpcMsg function is called to send a message through a bot says.
In the phrase_wk.txt, the PHRASE_TOTO must be defined as follows to take the bot and the literal as parameters.
PHRASE_TOTO(bot b, literal l)
{
[I am $b$, and the following text is an untranslated literal: $l$]
}The first parameter is always the bot that says the text and its value is automatically set.