Help with 0x3019 and 0x3015

10/09/2015 07:45 theking200051#1
hi guys ,
any help parsing the 0x3019 Group spawn and single spawn 0x3015 .

the only purpose , i wanna get a list of the nearby chars names and teleport if a GM is detected :D
10/09/2015 08:48 mxii#2
its not that "easy" to just parse these packets..
you need to know all the "models" to identify if its a MOB, ITEM, GATE, PET, PLAYER, ...
only if you know which type of spawn it is, you can parse it correctly.

So you have to parse the Media.pk2 first and extract all needed data.

Then you need these packets to:
0x3017 - group spawn begin: get the count of spawns
0x3019 - group spawn data: collect all of these packets
0x3018 - group spawn end: parse collected data
10/10/2015 08:43 theking200051#3
first thanks for try helping ,

so i need to get the models id from Pk2 and then switch those models ,case it player id first byte is what ever and so on .case item first byte what ever and so on ,is that the logic to parse it? .

can u exactly tell me the file name that contain those models in Media.pk2

third i got an easy way idea that i will just convert the packet data from bytes to string then search the string for "GM" name if he found it just teleport ,is this easy way will work fine ?.
10/10/2015 17:12 mxii#4
that would be the easiest way!
you could get some false positives.. guild names or grant names.. but if its okay, that would take you some minutes against many hours ;D
10/12/2015 02:09 sarkoplata#5
gms generally have [GM] tag, so yeah, since '[' and ']' can't be used by normal players it will work.
But no tag = won't work.
10/12/2015 07:04 theking200051#6
Quote:
Originally Posted by sarkoplata View Post
gms generally have [GM] tag, so yeah, since '[' and ']' can't be used by normal players it will work.
But no tag = won't work.
i tried it ,and it work very good . :D
10/12/2015 10:23 sarkoplata#7
Itwill work but as mentioned above there might me guild names/grant names or pet names and stuff and they will give false positives.
10/15/2015 05:26 theking200051#8
Ty .guys i do like u said and it work 100 %.
here the code BTW

Code:
 if (pack.Opcode==0x3015||pack.Opcode==0x3019)
                        {
                            int size = pack.RemainingRead();
                            byte[] PacketBytes=new byte[size] ;
                            for (int i = 0; i < size; i++)
                            {
                                PacketBytes[i] = pack.ReadUInt8();
                            }
                            string PacketString = System.Text.Encoding.Default.GetString(PacketBytes);
                            bool r1 = PacketString.Contains("[GM]");
                               if (r1)
                            {

                               // the teleport packet ;

                            }
10/18/2015 22:27 Royalblade*#9
Quote:
Originally Posted by theking200051 View Post
Ty .guys i do like u said and it work 100 %.
here the code BTW

Code:
 if (pack.Opcode==0x3015||pack.Opcode==0x3019)
                        {
                            int size = pack.RemainingRead();
                            byte[] PacketBytes=new byte[size] ;
                            for (int i = 0; i < size; i++)
                            {
                                PacketBytes[i] = pack.ReadUInt8();
                            }
                            string PacketString = System.Text.Encoding.Default.GetString(PacketBytes);
                            bool r1 = PacketString.Contains("[GM]");
                               if (r1)
                            {

                               // the teleport packet ;

                            }
haha you might as well just get the baseStream... google for getBaseStream or getStream method implementation @ BinaryReader. Should give you a few hits, its simple though and would make your shit SUBSTANTIALLY faster.

Additionally, if you need proper group & single spawn parsed as a service you can PM me. 50$ per month.
10/19/2015 19:03 zeteris#10
Quote:
Originally Posted by Royalblade* View Post
Additionally, if you need proper group & single spawn parsed as a service you can PM me. 50$ per month.
Can I order this service ? ^^
10/19/2015 19:17 Devsome#11
Quote:
Originally Posted by Royalblade* View Post
haha you might as well just get the baseStream... google for getBaseStream or getStream method implementation @ BinaryReader. Should give you a few hits, its simple though and would make your shit SUBSTANTIALLY faster.

Additionally, if you need proper group & single spawn parsed as a service you can PM me. 50$ per month.
Hope you arn't using any parsed packets I send you :3
10/20/2015 06:19 theking200051#12
Quote:
haha you might as well just get the baseStream... google for getBaseStream or getStream method implementation @ BinaryReader. Should give you a few hits, its simple though and would make your shit SUBSTANTIALLY faster.
hm , u r right this code is so bad , i just rushed for a working code .
i googled for the getbasestream and i don't get it , how to use that in my code ?
i dont use any binaryreader , and i deal with the stream for read or write by the SilkroadsecurityAPI .Packet.Read & packet.Write methods (i don't deal with the stream directly)

i just made a new code i think it much faster
Code:
if (pack.Opcode==0x3015||pack.Opcode==0x3019)
                        {
                           byte[] packetbytes=pack.GetBytes();
                            string PacketString = System.Text.Encoding.Default.GetString(packetbytes);
                            bool r1 = PacketString.Contains("[GM]");
                               if (r1)
                            {

                               // the teleport packet ;

                            }
}
Thank you for the Advice's guys .