phrase_end_system_msg - ryzom/ryzomcore GitHub Wiki


title: Phrase End System Msg description: published: true date: 2023-03-12T20:26:08.328Z tags: editor: markdown dateCreated: 2023-03-12T20:25:00.314Z

phraseEndSystemMsg

The phraseEndSystemMsg AI script function is used to send a message with parameters through a system broadcast message. The parameters are taken from the parameter stack created by phrasePushValue and phrasePushString functions.

Because the message can be sent as "around", the broadcast message must be sent by a bot that has a valid position. {.is-info}

Syntax

phraseEndSystemMsg(botIndex: s, sayType: s, phraseIdentifier: s) // phraseEndSystemMsg_fss_

Arguments

  • botIndex (string): The position of the bot in the group. See getBotIndexByName function.
  • 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.

Parameters stack

The function uses the parameter stack created by phrasePushValue and phrasePushString functions.

Example

()phrasePushString("literal", "Test des levels designer");
()groupOf5Bot.phraseEndSystemMsg(4, "say", "PHRASE_TOTO");

In this example code, a string is pushed onto the parameter stack using phrasePushString, and then the phraseEndSystemMsg function is called to send a system broadcast message.

Notes

In the phrase_wk.txt, the PHRASE_TOTO must be defined as follows to take the literal as a parameter.

PHRASE_TOTO(literal l)
{
	[$l$]
}

The first parameter is not automatically set to the bot that sends the system message as in phraseEndNpcMsg.

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