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
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 ?.
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
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 **** SUBSTANTIALLY faster.
Additionally, if you need proper group & single spawn parsed as a service you can PM me. 50$ per month.
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 **** 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
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 **** 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 ;
}
}
Help with 0x3019, 0x3015 Packets - Items Part 02/09/2013 - SRO Coding Corner - 4 Replies I need help with items spawn packets
i have these items code
0F000000 96D3E500 30 5A 5B45E943 76325844 59739744 9E4B 00 00
0F000000 A1B6EE00 6C 6B AA022C44 00003443 62671143 6684 01 FFFFFFFF 0006 88B6EE00
i wanna know what 00 00 mean in the first one
and 01 FFFFFFFF 0006 88B6EE00 in the second one