|
@@ -14539,6 +14539,29 @@ BUILDIN_FUNC(npctalk)
|
|
|
return SCRIPT_CMD_SUCCESS;
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * Sends a message to the waitingroom of the invoking NPC.
|
|
|
+ * chatmes "<message>"{,"<NPC name>"};
|
|
|
+ * @author Jey
|
|
|
+ */
|
|
|
+BUILDIN_FUNC(chatmes)
|
|
|
+{
|
|
|
+ struct npc_data* nd = NULL;
|
|
|
+ const char* str = script_getstr(st,2);
|
|
|
+
|
|
|
+ if (script_hasdata(st, 3))
|
|
|
+ nd = npc_name2id(script_getstr(st, 3));
|
|
|
+ else
|
|
|
+ nd = (struct npc_data *)map_id2bl(st->oid);
|
|
|
+
|
|
|
+ if (nd != NULL && nd->chat_id) {
|
|
|
+ char message[256];
|
|
|
+ safesnprintf(message, sizeof(message), "%s", str);
|
|
|
+ clif_GlobalMessage(map_id2bl(nd->chat_id), message, CHAT_WOS);
|
|
|
+ }
|
|
|
+ return SCRIPT_CMD_SUCCESS;
|
|
|
+}
|
|
|
+
|
|
|
// change npc walkspeed [Valaris]
|
|
|
BUILDIN_FUNC(npcspeed)
|
|
|
{
|
|
@@ -22550,6 +22573,7 @@ struct script_function buildin_func[] = {
|
|
|
BUILDIN_DEF(movenpc,"sii?"), // [MouseJstr]
|
|
|
BUILDIN_DEF(message,"ss"), // [MouseJstr]
|
|
|
BUILDIN_DEF(npctalk,"s?"), // [Valaris]
|
|
|
+ BUILDIN_DEF(chatmes,"s?"), // [Jey]
|
|
|
BUILDIN_DEF(mobcount,"ss"),
|
|
|
BUILDIN_DEF(getlook,"i?"),
|
|
|
BUILDIN_DEF(getsavepoint,"i?"),
|