The code you have does not send a tell to anyone. If you want to send a line of text to be shown in the client you use the code you have.
For sending a tell to someone, do this:
Code:
public void sendmessage(Client client)
{
PlayerTextPacket textpacket = (PlayerTextPacket)Packet.Create(PacketType.PLAYERTEXT);
textpacket.Text = "/tell "+currenttrader+" "+message;
//Don't define properties Id or Send (i.e. textpacket.Send), those are inherited from Packet class
//Console.WriteLine("Sending message..."); //not especially useful, this just tells that the code has reached this point
client.SendToServer(textpacket);
//Console.WriteLine("Sent message!");
}
You don't seem to understand the difference between client packets and server packets. Client packets are for sending data to server (e.g. a tell to someone) whereas server packets are used to send data to the client connected to K Relay.
PLAYERTEXT is a client packet so you can use it to send a message to someone other than you.
TEXT is a server packet so you can use it to send information to the client.
_____________________________
The server tells what your trade partner is doing. You need to tell to the server what you're doing. Again this is related to the concept of server and client packets.
Here's a list of trade packets:
Client:
ACCEPTTRADE
CANCELTRADE
CHANGETRADE
REQUESTTRADE
Server:
TRADEACCEPTED
TRADECHANGED
TRADEDONE
TRADEREQUESTED
TRADESTART
You don't want to use any of the server packets. Those only deliver data to your client.
To select an item to be traded you use the CHANGETRADE packet, not TRADECHANGED.
_____________________________
I learned the packet structure of the game when Realm Relay was released. The release included a nice little cheat sheet of all the packets and what they contain. This was really helpful to me as it made looking for the right packet convenient.
I've updated some of it but most of the newer packets are missing and some property names are wrong (which is not really that big of a deal). Here it is: