Files
dsrc/sku.0/sys.server/compiled/game/script/library/conversation.scriptlib
T
2013-09-10 23:17:15 -07:00

52 lines
1.5 KiB
Plaintext

/**
* Title: conversation.scriptlib
* Description: A library providing support for conversations created by the conversation editor
* @author $Author: swyckoff $
*/
/***** 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);
}