Register for your free account! | Forgot your password?

You last visited: Today at 00:47

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

Advertisement



[Help] About Packet

Discussion on [Help] About Packet within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
Joon Hye Min's Avatar
 
elite*gold: 0
Join Date: Sep 2009
Posts: 5
Received Thanks: 0
Question [Help] About Packet

An-nyong....

Can someone teach me

about packet info like this...

Code:
 public byte[] CharacterInfo(Character Charr)
        {
            byte[] Packet = new byte[70 + Charr.Name.Length + Charr.Spouse.Length];
            long Model = Convert.ToInt64(Convert.ToString(Charr.Avatar) + Convert.ToString(Charr.Model));

            fixed (byte* p = Packet)
            {
                *((ushort*)p) = (ushort)Packet.Length;
                *((ushort*)(p + 2)) = 1006;
                *((uint*)(p + 4)) = (uint)Charr.UID;
                *((uint*)(p + 8)) = (uint)Model;
                *((ushort*)(p + 12)) = (ushort)Charr.Hair;
                *((uint*)(p + 14)) = (uint)Charr.Silvers;
                *((uint*)(p + 18)) = (uint)Charr.CPs;
                *((uint*)(p + 22)) = (uint)Charr.Exp;
                *((ushort*)(p + 42)) = (ushort)5130;
                *((ushort*)(p + 46)) = (ushort)Charr.Str;
                *((ushort*)(p + 48)) = (ushort)Charr.Agi;
                *((ushort*)(p + 50)) = (ushort)Charr.Vit;
                *((ushort*)(p + 52)) = (ushort)Charr.Spi;
                *((ushort*)(p + 54)) = (ushort)Charr.StatP;
                *((ushort*)(p + 56)) = (ushort)Charr.CurHP;
                *((ushort*)(p + 58)) = (ushort)Charr.CurMP;
                *((ushort*)(p + 60)) = (ushort)Charr.PKPoints;
                *(p + 62) = Charr.Level;
                *(p + 63) = Charr.Job;
                *((ushort*)(p + 65)) = (ushort)Charr.RBCount;
                *(p + 66) = 1;
                *(p + 67) = 2;
                *(p + 68) = (byte)Charr.Name.Length;

                Packet[69 + Charr.Name.Length] = (byte)Charr.Spouse.Length;

                for (sbyte i = 0; i < Charr.Name.Length; i++)
                {
                    *(p + 69 + i) = (byte)Charr.Name[i];
                }
                for (sbyte i = 0; i < Charr.Spouse.Length; i++)
                {
                    *(p + 70 + Charr.Name.Length + i) = (byte)Charr.Spouse[i];
                }

            }
            return Packet;
        }
what is that mean?

example this..

Code:
  *((ushort*)p) = (ushort)Packet.Length;
Thank you
Joon Hye Min is offline  
Old 09/10/2009, 06:26   #2
 
UnoAmigos's Avatar
 
elite*gold: 0
Join Date: Feb 2009
Posts: 192
Received Thanks: 107
I don't know whats that

you can ask MOD

anyway...from Korea in this forum?

Nice...
UnoAmigos is offline  
Thanks
1 User
Old 09/10/2009, 06:30   #3
 
elite*gold: 20
Join Date: Apr 2008
Posts: 2,281
Received Thanks: 913
That's how the structures of TQ Packets work.
The first 2 values are the packet length (how big it is), then the packet ID.

Code:
                *((ushort*)p) = (ushort)Packet.Length;
                *((ushort*)(p + 2)) = 1006;
Searching this forum and Google will help you alot to understand packets more.
kinshi88 is offline  
Thanks
1 User
Old 09/10/2009, 06:37   #4
 
Joon Hye Min's Avatar
 
elite*gold: 0
Join Date: Sep 2009
Posts: 5
Received Thanks: 0
Quote:
Originally Posted by kinshi88 View Post
That's how the structures of TQ Packets work.
The first 2 values are the packet length (how big it is), then the packet ID.

Code:
                *((ushort*)p) = (ushort)Packet.Length;
                *((ushort*)(p + 2)) = 1006;
Searching this forum and Google will help you alot to understand packets more.
Thank you Ahjussi... i will google it
Joon Hye Min is offline  
Old 09/10/2009, 11:14   #5
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
Quote:
Originally Posted by Joon Hye Min View Post
Thank you Ahjussi... i will google it
WTF?
~Yuki~ is offline  
Old 09/10/2009, 16:11   #6
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
Quote:
Originally Posted by ~Yuki~ View Post
WTF?
haha , thought the same Is not something that jsut can be told what it is. Is more complicated Go read C# Visual guidse and so on to learn
Google won't help much
Fish* is offline  
Old 09/10/2009, 17:31   #7
 
elite*gold: 20
Join Date: Apr 2008
Posts: 2,281
Received Thanks: 913
Quote:
Originally Posted by grillmad View Post
Google won't help much
How will Google not help?
Google has the entire internet in their databases.
How is that not useful?
kinshi88 is offline  
Old 09/10/2009, 19:06   #8
 
unknownone's Avatar
 
elite*gold: 20
Join Date: Jun 2005
Posts: 1,013
Received Thanks: 381
Quote:
Originally Posted by kinshi88 View Post
How will Google not help?
Google has the entire internet in their databases.
How is that not useful?
You haven't told him what to search for.
unknownone is offline  
Old 09/10/2009, 20:03   #9
 
elite*gold: 20
Join Date: Apr 2008
Posts: 2,281
Received Thanks: 913
Quote:
Originally Posted by unknownone View Post
You haven't told him what to search for.
I'm sorry.
I thought he might have some common sense.
kinshi88 is offline  
Old 09/10/2009, 20:25   #10
 
unknownone's Avatar
 
elite*gold: 20
Join Date: Jun 2005
Posts: 1,013
Received Thanks: 381
Quote:
Originally Posted by kinshi88 View Post
I'm sorry.
I thought he might have some common sense.
No, I'm serious. If he doesn't know the concept he is searching for, that ain't much good.

fyi, "Packets" isn't gonna find him what he wants.
unknownone is offline  
Old 09/10/2009, 22:57   #11
 
_Emme_'s Avatar
 
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,162





That will probably give it all more sence.
_Emme_ is offline  
Old 09/10/2009, 23:33   #12
 
elite*gold: 20
Join Date: Apr 2008
Posts: 2,281
Received Thanks: 913
Quote:
Originally Posted by unknownone View Post
No, I'm serious. If he doesn't know the concept he is searching for, that ain't much good.

fyi, "Packets" isn't gonna find him what he wants.
Uh hur hur Durrrr =P

But yes, I can agree with you =D
kinshi88 is offline  
Old 09/11/2009, 01:26   #13
 
Zion~'s Avatar
 
elite*gold: 20
Join Date: Aug 2009
Posts: 1,344
Received Thanks: 651
Quote:
Originally Posted by EmmeTheCoder View Post





That will probably give it all more sence.
Do you even know what your talking about?
Zion~ is offline  
Old 09/11/2009, 02:37   #14
 
elite*gold: 0
Join Date: Jun 2009
Posts: 787
Received Thanks: 314
Quote:
Originally Posted by EmmeTheCoder View Post





That will probably give it all more sence.
Do you even know the difference between a reference and a value type?
_tao4229_ is offline  
Old 09/11/2009, 03:54   #15
 
© Haydz's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 1,042
Received Thanks: 252
Quote:
Originally Posted by Zion~ View Post
Do you even know what your talking about?
That link emme provided is actually very resourceful and completely relevant.

Now ask the same question to yourself
© Haydz is offline  
Reply




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


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.