mirror of
https://bitbucket.org/seefoe/dsrc.git
synced 2026-07-31 01:15:55 -04:00
52 lines
1.5 KiB
Plaintext
52 lines
1.5 KiB
Plaintext
/**
|
|
* Title: conversation.scriptlib
|
|
* Description: A library providing support for conversations created by the conversation editor
|
|
*/
|
|
|
|
|
|
/***** INCLUDES ********************************************************/
|
|
include library.chat;
|
|
include library.group;
|
|
|
|
|
|
|
|
|
|
/***** FUNCTIONS *******************************************************/
|
|
/**
|
|
* @brief Echo the text in sid to the player's group; Does not send chat to the actor or target.
|
|
*
|
|
* @param player The player who's group will see the text
|
|
* @param actor The speaker
|
|
* @param target The target of the speech
|
|
* @param sid The string ID of the speech to echo
|
|
*/
|
|
void echoToGroup(obj_id player, obj_id actor, obj_id target, string_id sid)
|
|
{
|
|
if(!group.isGrouped(player))
|
|
{
|
|
return;
|
|
}
|
|
|
|
//echo to any group members, but not the player or npc again
|
|
chat.chat (actor, target, sid, chat.ChatFlag_targetAndSourceGroup|chat.ChatFlag_skipTarget|chat.ChatFlag_skipSource);
|
|
}
|
|
|
|
/**
|
|
* @brief Echo the text in pp to the player's group; Does not send chat to the actor or target.
|
|
*
|
|
* @param player The player who's group will see the text
|
|
* @param actor The speaker
|
|
* @param target The target of the speech
|
|
* @param pp The prose package of the speech to echo
|
|
*/
|
|
void echoToGroup(obj_id player, obj_id actor, obj_id target, prose_package pp)
|
|
{
|
|
if(!group.isGrouped(player))
|
|
{
|
|
return;
|
|
}
|
|
|
|
//echo to any group members, but not the player or npc again
|
|
chat.chat (actor, target, pp, chat.ChatFlag_targetAndSourceGroup|chat.ChatFlag_skipTarget|chat.ChatFlag_skipSource);
|
|
}
|