Register for your free account! | Forgot your password?

You last visited: Today at 16:16

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Release] Enemy packet structure

Discussion on [Release] Enemy packet structure within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
12tails's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 782
Received Thanks: 458
[Release] Enemy packet structure

yo!

at the current patch the enemies aren't send by the friends packet, its a packet with ID 1041...
here is the struct/packet:

Code:
                        case 1041:
                        {
                            MemoryStream Stream = new MemoryStream();
                            BinaryWriter Writer = new BinaryWriter(Stream);

                            Writer.Write((ushort)0);
                            Writer.Write((ushort)1041);
                            Writer.Write((uint)CSocket.Client.UID);
                            Writer.Write((uint)CSocket.Client.Enemies.Count);
                            Writer.Write((uint)0);
                            Dictionary<uint, string> _Enemies = CSocket.Client.Enemies;
                            foreach (uint value in _Enemies.Keys)
                            {
                                Writer.Write((uint)value);
                                Writer.Write((uint)0);
                                Writer.Write((uint)(Server.Pool.ContainsKey(value) ? 1 : 0));
                                for (byte i = 0; i < 16; i++)
                                {
                                    if (i < _Enemies[value].Length)
                                        Writer.Write((byte)_Enemies[value][i]);
                                    else Writer.Write((byte)0);
                                }
                                Writer.Write((byte)0);
                                Writer.Write((byte)0);
                                Writer.Write((byte)0);
                                Writer.Write((byte)0);
                            }
                            long lenght = Stream.Length;
                            Stream.Position = 0;
                            Writer.Write((ushort)lenght);
                            Stream.Position = Stream.Length;
                            Writer.Write(ASCIIEncoding.ASCII.GetBytes(Server.MainKey));
                            Stream.Position = 0;
                            byte[] buf = new byte[Stream.Length];
                            Stream.Read(buf, 0, buf.Length);
                            Writer.Close();
                            Stream.Close();
                            CSocket.Send(buf);
                            break;
                        }
best regards :P
12tails is offline  
Thanks
2 Users
Old 05/06/2011, 20:30   #2
 
elite*gold: 0
Join Date: Mar 2009
Posts: 228
Received Thanks: 47
keep it up
dego4ever is offline  
Old 05/08/2011, 09:25   #3
 
Takashipvp's Avatar
 
elite*gold: 50
Join Date: Apr 2011
Posts: 49
Received Thanks: 9
nice work keep it up
Takashipvp is offline  
Reply


Similar Threads Similar Threads
[Request] Packet Structure for CharData Packet
05/16/2011 - Silkroad Online - 4 Replies
can someone tell me which structure the CharData packet has? i would really appreciate this, since im still noob in such things. its just too high for me/ too much information for my head. :handsdown: S->C(3013)...
[Release] Arena Info Packet Structure
02/21/2011 - CO2 PServer Guides & Releases - 12 Replies
Heya! I hope this become an usefull release for who use an source with arena... and i would really apreciate any help to end the other 4 packets .... (2208,2205,2206,2207); so... this is the structure... only... if u get it working you will see something like this in game: http://b.imagehost.org/0760/19240804.jpg
[Release] Packet encryption / structure
10/26/2010 - General Gaming Discussion - 13 Replies
============================================= ========= FANTASY TENNIS PACKET SYSTEM ======== ============== by AnotherCoder ============== ============================================= 1. ENCRYPTION 2. PACKET STRUCTURE
packet structure
03/09/2008 - Conquer Online 2 - 16 Replies
For what I'd like to do, I think packets are the place to start. After that, probably java then C and VB. This is a question for the people here who are self-taught... what resources would you recommend for... 1. understanding packet structure 2. learning some programming language without enrolling at the local university I'm mainly interested in packet structure and how to capture/decipher/edit/send them, and eventually I'd like to "automate" these functions by writing some programs. ...



All times are GMT +1. The time now is 16:16.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.