NWNX:EE  8193.37.14
nwnx_chat.nss
Go to the documentation of this file.
1 
6 const string NWNX_Chat = "NWNX_Chat";
7 
25 const int NWNX_CHAT_CHANNEL_DM_DM = 30;
27 
35 int NWNX_Chat_SendMessage(int channel, string message, object sender = OBJECT_SELF, object target = OBJECT_INVALID);
36 
40 void NWNX_Chat_RegisterChatScript(string script);
41 
45 
50 
54 string NWNX_Chat_GetMessage();
55 
59 object NWNX_Chat_GetSender();
60 
64 object NWNX_Chat_GetTarget();
65 
71 void NWNX_Chat_SetChatHearingDistance(float distance, object listener = OBJECT_INVALID, int channel = NWNX_CHAT_CHANNEL_PLAYER_TALK);
72 
76 float NWNX_Chat_GetChatHearingDistance(object listener = OBJECT_INVALID, int channel = NWNX_CHAT_CHANNEL_PLAYER_TALK);
77 
79 
80 int NWNX_Chat_SendMessage(int channel, string message, object sender = OBJECT_SELF, object target = OBJECT_INVALID)
81 {
82  NWNXPushObject(target);
83  NWNXPushObject(sender);
84  NWNXPushString(message);
85  NWNXPushInt(channel);
86  NWNXCall(NWNX_Chat, "SendMessage");
87  return NWNXPopInt();
88 }
89 
90 void NWNX_Chat_RegisterChatScript(string script)
91 {
92  NWNXPushString(script);
93  NWNXCall(NWNX_Chat, "RegisterChatScript");
94 }
95 
97 {
98  NWNXCall(NWNX_Chat, "SkipMessage");
99 }
100 
102 {
103  NWNXCall(NWNX_Chat, "GetChannel");
104  return NWNXPopInt();
105 }
106 
108 {
109  NWNXCall(NWNX_Chat, "GetMessage");
110  return NWNXPopString();
111 }
112 
114 {
115  NWNXCall(NWNX_Chat, "GetSender");
116  return NWNXPopObject();
117 }
118 
120 {
121  NWNXCall(NWNX_Chat, "GetTarget");
122  return NWNXPopObject();
123 }
124 
125 void NWNX_Chat_SetChatHearingDistance(float distance, object listener = OBJECT_INVALID, int channel = NWNX_CHAT_CHANNEL_PLAYER_TALK)
126 {
127  NWNXPushInt(channel);
128  NWNXPushObject(listener);
129  NWNXPushFloat(distance);
130  NWNXCall(NWNX_Chat, "SetChatHearingDistance");
131 }
132 
133 float NWNX_Chat_GetChatHearingDistance(object listener = OBJECT_INVALID, int channel = NWNX_CHAT_CHANNEL_PLAYER_TALK)
134 {
135  NWNXPushInt(channel);
136  NWNXPushObject(listener);
137  NWNXCall(NWNX_Chat, "GetChatHearingDistance");
138  return NWNXPopFloat();
139 }
const int NWNX_CHAT_CHANNEL_DM_SHOUT
Definition: nwnx_chat.nss:21
const int NWNX_CHAT_CHANNEL_SERVER_MSG
Definition: nwnx_chat.nss:17
const int NWNX_CHAT_CHANNEL_DM_DM
Definition: nwnx_chat.nss:25
int NWNX_Chat_GetChannel()
Gets the chat channel.
Definition: nwnx_chat.nss:101
void NWNX_Chat_RegisterChatScript(string script)
Registers the script which receives all chat messages.
Definition: nwnx_chat.nss:90
const int NWNX_CHAT_CHANNEL_DM_TELL
Definition: nwnx_chat.nss:23
const int NWNX_CHAT_CHANNEL_PLAYER_TALK
Definition: nwnx_chat.nss:13
string NWNX_Chat_GetMessage()
Gets the message.
Definition: nwnx_chat.nss:107
const int NWNX_CHAT_CHANNEL_PLAYER_DM
Definition: nwnx_chat.nss:19
float NWNX_Chat_GetChatHearingDistance(object listener=OBJECT_INVALID, int channel=NWNX_CHAT_CHANNEL_PLAYER_TALK)
Gets the distance with which the player hears talks or whisper.
Definition: nwnx_chat.nss:133
const int NWNX_CHAT_CHANNEL_PLAYER_PARTY
Definition: nwnx_chat.nss:18
void NWNX_Chat_SetChatHearingDistance(float distance, object listener=OBJECT_INVALID, int channel=NWNX_CHAT_CHANNEL_PLAYER_TALK)
Sets the distance with which the player hears talks or whispers.
Definition: nwnx_chat.nss:125
int NWNX_Chat_SendMessage(int channel, string message, object sender=OBJECT_SELF, object target=OBJECT_INVALID)
Sends a chat message.
Definition: nwnx_chat.nss:80
const int NWNX_CHAT_CHANNEL_PLAYER_SHOUT
Definition: nwnx_chat.nss:14
const int NWNX_CHAT_CHANNEL_PLAYER_WHISPER
Definition: nwnx_chat.nss:15
void NWNX_Chat_SkipMessage()
Skips a chat message.
Definition: nwnx_chat.nss:96
object NWNX_Chat_GetTarget()
Gets the target of the message.
Definition: nwnx_chat.nss:119
const int NWNX_CHAT_CHANNEL_DM_TALK
Definition: nwnx_chat.nss:20
const int NWNX_CHAT_CHANNEL_DM_WHISPER
Definition: nwnx_chat.nss:22
object NWNX_Chat_GetSender()
Gets the sender of the message.
Definition: nwnx_chat.nss:113
const int NWNX_CHAT_CHANNEL_PLAYER_TELL
Definition: nwnx_chat.nss:16
const int NWNX_CHAT_CHANNEL_DM_PARTY
Definition: nwnx_chat.nss:24