Send (whisp)

Content and general development discussion, including quest scripts and server code. TMW Classic is a project comprising the Legacy tmwAthena server & the designated improved engine server based on evolHercules.


Forum rules

This forum houses many years of development, tracing back to some of the earliest posts that exist on the board.

Its current use is for the continued development of the server and game it has always served: TMW Classic.

Post Reply
User avatar
KaTSuo
Novice
Novice
Posts: 53
Joined: 25 Sep 2005, 19:01
Location: France
Contact:

Send (whisp)

Post by KaTSuo »

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: 25 Aug 2005, 16:08
Location: Germany

Post by Crush »

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
Novice
Novice
Posts: 53
Joined: 25 Sep 2005, 19:01
Location: France
Contact:

Post by KaTSuo »

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: 15 Jul 2007, 02:00

Post by †Link† »

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: 1114
Joined: 07 Mar 2005, 17:29
Location: Poland
Contact:

Post by i »

Private Messaging system should wait for new server. i dont like the eAthena solution.
Post Reply