Send (whisp)

Content and general development discussion, including maps, quests, and server code from the development team.
Post Reply
User avatar
KaTSuo
Peon
Peon
Posts: 53
Joined: Sun Sep 25, 2005 8:01 pm
Location: France
Contact:

Send (whisp)

Post by KaTSuo » Wed Jan 10, 2007 5:48 pm

Hi !

I'm trying to add a whisp feature to TMW...

Here is my snippet to send a whisp :

In chat.ccp

Code: Select all

else if (msg.substr(0, IS_SEND_LENGTH) == IS_SEND)
    {
        msg.erase(0, IS_SEND_LENGTH);
        MessageOut outMsg(mNetwork);
        outMsg.writeInt16(CMSG_PLAYER_SEND);
        outMsg.writeInt16(msg.length() + 4);
        outMsg.writeString(msg, msg.length); //Send nick?
        outMsg.writeString(msg, msg.length()); //Send text
    }
In protocol.h

Code: Select all

#define CMSG_PLAYER_SEND             0x0096 /**<Send>*/
#define SMSG_SEND_CHAT               0x0097 /**<Receive>*/
#define SMSG_SEND_CHAT_STAT          0x0098 /**<Status>*/
In chat.h

Code: Select all

#define IS_SEND             "/send "
#define IS_SEND_LENGTH      6
Packet_table.txt

Code: Select all

S 0096 <len>.w <nick>.24B <message>.?B
	send wisper

R 0097 <len>.w <nick>.24B <message>.?B
	receive wisper

R 0098 <type>.B
	type=00 success to send wisper
	type=01 target character is not loged in?
	type=02 ignored by target
Is anybody have an idea...? My problem is probably how to send the nick destination to the server (outMsg.writeString(msg, msg.length); //Send nick?). I'm not sure of that, especially since my server crashed when I tried to execute this command lol
I'm French, sorry for my bad english XD !
Image
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: Thu Aug 25, 2005 5:08 pm
Location: Germany

Post by Crush » Wed Jan 10, 2007 6:12 pm

You should consult the eAthena documentation for the private message protocol.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
KaTSuo
Peon
Peon
Posts: 53
Joined: Sun Sep 25, 2005 8:01 pm
Location: France
Contact:

Post by KaTSuo » Wed Jan 10, 2007 6:44 pm

Already did it.
Actually, my problem is that I don't know how to parse the nick destination for this command...

Should be like that

Code: Select all

/nick nickname_destination Hello ! How are U ?
And I want to send this to the server :

Code: Select all

outMsg.writeInt16(CMSG_PLAYER_SEND); //Packet number wich is 0x0096
        outMsg.writeInt16(msg.length() + 4); //Length of the command
        outMsg.writeString("nickname_destination", msg.length()); //Sending the nickname
        outMsg.writeString("Hello ! How are U ?", msg.length()); //Sending the text
I'm French, sorry for my bad english XD !
Image
User avatar
†Link†
Peon
Peon
Posts: 8
Joined: Sun Jul 15, 2007 3:00 am

Post by †Link† » Sun Jul 15, 2007 11:51 am

If you put a Private Messaging system in this game im gonna be really happy finnally a way to contact people
R.I.P ~ Werner Pacheco ~ Ima Miss You
User avatar
i
TMW Adviser
TMW Adviser
Posts: 1113
Joined: Mon Mar 07, 2005 6:29 pm
Location: Poland
Contact:

Post by i » Sun Jul 15, 2007 5:31 pm

Private Messaging system should wait for new server. i dont like the eAthena solution.
Retired chainsaw seller. CEO @ Advertising Agency N2P
Post Reply