Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] How about having the server make a player run a command that is Eluna-scripted?

[DiscordArchive] How about having the server make a player run a command that is Eluna-scripted?

[DiscordArchive] How about having the server make a player run a command that is Eluna-scripted?

rektbyfaith
Administrator
0
08-19-2025, 08:10 PM
#1
Archived author: metallinos • Posted: 2025-08-19T20:10:11.431000+00:00
Original source

How about having the server make a player run a command that is Eluna-scripted?
rektbyfaith
08-19-2025, 08:10 PM #1

Archived author: metallinos • Posted: 2025-08-19T20:10:11.431000+00:00
Original source

How about having the server make a player run a command that is Eluna-scripted?

rektbyfaith
Administrator
0
08-19-2025, 09:42 PM
#2
Archived author: devout_filidh • Posted: 2025-08-19T21:42:21.304000+00:00
Original source

I solved it with the help of AI:

//sends data from c++ to addon
void SendAddonMessage(Player* sender, Player* receiver, const std:Confusedtring& prefix, const std:Confusedtring& message)
{
if (!sender || !receiver || prefix.empty())
return;

std:Confusedtring fullmsg = prefix + "\t" + message;

WorldPacket packet(SMSG_MESSAGECHAT, 100);
packet << uint8(CHAT_MSG_WHISPER); // ChatType
packet << int32(LANG_ADDON); // Language
packet << sender->GetGUID(); // Sender GUID
packet << uint32(0); // Constant time
packet << receiver->GetGUID(); // Receiver GUID
packet << uint32(fullmsg.length() + 1); // Text length including null
packet << fullmsg; // Text bytes
packet << uint8(0); // Chat Tag

receiver->GetSession()->SendPacket(&packet);
}
rektbyfaith
08-19-2025, 09:42 PM #2

Archived author: devout_filidh • Posted: 2025-08-19T21:42:21.304000+00:00
Original source

I solved it with the help of AI:

//sends data from c++ to addon
void SendAddonMessage(Player* sender, Player* receiver, const std:Confusedtring& prefix, const std:Confusedtring& message)
{
if (!sender || !receiver || prefix.empty())
return;

std:Confusedtring fullmsg = prefix + "\t" + message;

WorldPacket packet(SMSG_MESSAGECHAT, 100);
packet << uint8(CHAT_MSG_WHISPER); // ChatType
packet << int32(LANG_ADDON); // Language
packet << sender->GetGUID(); // Sender GUID
packet << uint32(0); // Constant time
packet << receiver->GetGUID(); // Receiver GUID
packet << uint32(fullmsg.length() + 1); // Text length including null
packet << fullmsg; // Text bytes
packet << uint8(0); // Chat Tag

receiver->GetSession()->SendPacket(&packet);
}

rektbyfaith
Administrator
0
08-19-2025, 09:44 PM
#3
Archived author: devout_filidh • Posted: 2025-08-19T21:44:06.167000+00:00
Original source

my mistake was using ADDON_MSG (or whatever it's called) instead of CHAT_MSG_WHISPER on line 1
rektbyfaith
08-19-2025, 09:44 PM #3

Archived author: devout_filidh • Posted: 2025-08-19T21:44:06.167000+00:00
Original source

my mistake was using ADDON_MSG (or whatever it's called) instead of CHAT_MSG_WHISPER on line 1

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)