Im still learning for C#.
But how do i know if i get an Unknown packet error what i need to add?
Thanks in advance!
JobvdH
But how do i know if i get an Unknown packet error what i need to add?
Thanks in advance!
JobvdH
Hey thanks for your reply,Quote:
Well for example... If you trade someone and you get the Unknown main ID or whatever it is on your server then that is the packet you need to add...
Search on the WIKI I think most of the packets for 5165 (guessing you use that) have been logged.
If you don't know what your doing I would suggest some C# tuts before you try and go any further.
Thanks for this post,Quote:
1010 -> General Data
How do you know the packet type?
Every packet the CO client sends should start with a specific header.
int16 - size
int16 - type
after this there are multiple possibilities.
The type is used to recognize the structure and to correctly process the data.
Hope this helps.
Thanks for ur reply, it helped me allot!Quote:
You're looking at a general data subtype.
There are a large number of things it could mean.... Simply figure out what is activating it and look at the actual structure of the packet.
Simple way to do this source independent would be something like...
string Out = "";
for(int I = 0; I < Data.Length; I++)
Out+= Convert.ToString(Data[I], 16) + " ";
Console.WriteLine(Out);
And that will dump the contents of the packet to console. Ideally I'd do it to a text file but that would require me to dig around in sources to find examples lol.
I'd suggest looking at this thread for info on figuring out packets... it's a great resource.
[Only registered and activated users can see links. Click Here To Register...]
Packets are really not complicated to figure out in most cases. You have a few main things to look for in 90 pct of packets...
Length (all packets)
Type (all packets)
Subtype (mostly attack, general data, itemuse/ping)
UID (self, target or item)
Location info (map, x, y)
Timestamp (attack, gendat, itemuse/ping, walk)
Strings (EASY to find... Console.WriteLine(Encoding.ASCII.GetString(Data)) will convert the entire thing and give you an idea if there is reliant unencrypted string info in the packet.)
Outside of those main things which you can EASILY track down there is very little you need to worry about finding in most packets.
Only other things that could be 'hard to find' things are those which are less obvious... Most of the times though you can just figure out what triggers it to find what its used for (IE: same packet every time you loot an item... it's prob either the loot packet or the item info packet coming from server) and then you just need to worry about offsets once you get the base structure (trial and error/using a cmd to change offsets is best way imo). Takes very little time to find almost all of the required stuff for most packets such as item info/spawn entity.