Same deal as before, this time for inworld chat.
-Adam
Packet.cs
---------------------------------------------------
public static Packet ChatOut(ProtocolManager protocol, LLUUID
myAgentID, LLUUID mySessionID, string message,
byte type, int channel, byte command, LLUUID commandID,
float radius, LLVector3 position)
{
Hashtable blocks = new Hashtable();
Hashtable agentData = new Hashtable();
Hashtable chatData = new Hashtable();
Hashtable conversationData = new Hashtable();
// Agent Data Block
agentData["AgentID"] = myAgentID;
agentData["SessionID"] = mySessionID;
blocks[agentData] = "AgentData";
// Chat Data Block
chatData["Message"] = message;
chatData["Type"] = type;
chatData["Channel"] = channel;
blocks[chatData] = "ChatData";
// Conversation Data Block
conversationData["Command"] = command;
conversationData["CommandID"] = commandID;
conversationData["Radius"] = radius;
conversationData["Position"] = position;
blocks[conversationData] = "ConversationData";
Packet packet =
PacketBuilder.BuildPacket("ChatFromViewer",protocol,blocks);
return packet;
}
Avatar.cs
-------------------------------------------------------
public void Chat(string message)
{
LLUUID CommandID = new LLUUID();
LLVector3 Position = new LLVector3(0.0F,0.0F,0.0F);
Packet packet =
PacketBuilder.ChatOut(Client.Protocol,Client.Avatar.ID,Client.Network.SessionID,
message, 0, 0, 0, CommandID,20,Position);
Client.Network.SendPacket(packet);
}
_______________________________________________
libsecondlife-dev mailing list
[email protected]
https://mail.gna.org/listinfo/libsecondlife-dev