Welcome message thru proxy

09/12/2015 09:55 Isoline*#1
so lately i have been trying to add a simple welcome message from a proxy that i built based on silkroad security api.
the goal is simple eveytime a user logging in succesfully a simple welcome notice will occur, (locally).
so i tried this:
Code:
                                if (_pck.Opcode == 0x7001)
                                {
                                    string Charname = _pck.ReadAscii();
                                    Console.Write("Character logged on => " + Charname + "\n");
                                    SendPM("Hello " + Charname + ".");
                                }
sendpm methods is basically a notice packet thats it.
but then the shard manager shows: msg is unhandled 0x bla bla bla
what am i missing?
09/12/2015 13:33 LastThief*#2
Mind showing the "SENDPM" function ?
09/12/2015 14:43 Isoline*#3
Quote:
Originally Posted by LastThief* View Post
Mind showing the "SENDPM" function ?
its just the packet itself made it in a function so i could avoid packet spamming later.
Code:
                        Packet packet = new Packet(0x3026);
                        packet.WriteUInt8(07);
                        packet.WriteAscii("Hello World!");
                        m_LocalSecurity.Send(packet);
its just doesnt work i cant locate the cuas of the problem
09/12/2015 19:34 LastThief*#4
That seems fine, what does the shard manager print exactly ?
09/13/2015 00:56 Isoline*#5
Quote:
Originally Posted by LastThief* View Post
That seems fine, what does the shard manager print exactly ?
"unhandled msg recieved 0x blablabla"
09/13/2015 03:24 LastThief*#6
"blablabla" does not explain anything.
09/13/2015 12:15 Isoline*#7
Quote:
Originally Posted by LastThief* View Post
"blablabla" does not explain anything.
it shows that the shardmanger cant handle this packet.
do i have to be connected to a client? perform a full login to make it work?
i mean i want to be local so only the user will see the notice, not everyone in the server, do i still have to connect the client? with a local security?
hopefully you got the idea of what i wanted to achieve.
09/14/2015 03:09 Xutan*#8
Quote:
Originally Posted by eitai123 View Post
"unhandled msg recieved 0x blablabla"
0xWHAT? just write it as it is.
09/14/2015 14:15 Eslam Galull#9
well

declare a private bool like 'private bool WMsg'
then put its value false 'this.WMsg = false;'
On agent listen for packet : 0x750e

when you catch it check if WMsg send the notice and put WMsg to true


for PM use this one :

Code:
                Packet packet = new Packet(0x3026);
                packet.WriteUInt8(2);
                packet.WriteAscii("Server messages");
                packet.WriteAscii("Welcom");
                this.gw_local_security.Send(packet);
for notice use this one :

Code:
                Packet packet = new Packet(0x3026);
                packet.WriteUInt8(7);
                packet.WriteAscii("welcom");
                this.gw_local_security.Send(packet);
09/14/2015 22:37 Isoline*#10
Quote:
Originally Posted by its.soul View Post
well

declare a private bool like 'private bool WMsg'
then put its value false 'this.WMsg = false;'
On agent listen for packet : 0x750e

when you catch it check if WMsg send the notice and put WMsg to true


for PM use this one :

Code:
                Packet packet = new Packet(0x3026);
                packet.WriteUInt8(2);
                packet.WriteAscii("Server messages");
                packet.WriteAscii("Welcom");
                this.gw_local_security.Send(packet);
for notice use this one :

Code:
                Packet packet = new Packet(0x3026);
                packet.WriteUInt8(7);
                packet.WriteAscii("welcom");
                this.gw_local_security.Send(packet);
thats kinda my problem in order to send a welcome mesage you have to listen to the packet you told me, but lets say i want it to listen to an specific
item like global chatting or reverse scrolls
also, is the packet opcode itself is enough? or should i read packet parameters aswell? like
ReadUint8(); function?
09/15/2015 23:05 sarkoplata#11
You could just check for 0x3013, that is sent everytime a character is spawned in world
09/16/2015 21:43 magicanoo#12
You need to send the notice AFTER the character spawns, else the player will not see it. Sending the packet right after selecting the character will definitely give an error, because the char hasn't entered the gameserver yet, but still in the shardmanager which doesn't have a definition for the GM packet.

You can send the pm/notice after the latest packet sent on spawn which is the request-weather packet, as the following:

Code:
if (_pck.Opcode == 0x750E)
{
SendPM("Hello there");
}
You can define string charname and set it from 0x7001 then add it to the send pm function if you wanted something like "Hello, playername".
09/20/2015 01:52 ​Exo#13
^ Or actually hook the packets sent from the module!

Code:
 (0x3305) -> FRIENDLIST Sent! == Character is spawned. You can send your notice once the server sends this packet.
09/20/2015 02:59 Royalblade*#14
If the SERVER says it cannot handle the message you might be sending it to the server instead of the user.. lol.
09/21/2015 21:31 Isoline*#15
Quote:
Originally Posted by sarkoplata View Post
You could just check for 0x3013, that is sent everytime a character is spawned in world
Quote:
Originally Posted by ​Exo View Post
^ Or actually hook the packets sent from the module!

Code:
 (0x3305) -> FRIENDLIST Sent! == Character is spawned. You can send your notice once the server sends this packet.
Quote:
Originally Posted by Royalblade* View Post
If the SERVER says it cannot handle the message you might be sending it to the server instead of the user.. lol.
Yeah guys i managed to do this, but how can i find out packet opcode and parameters for reverse scroll usage? for example or pets usage stuff like that...