Register for your free account! | Forgot your password?

You last visited: Today at 17:22

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

Advertisement



Conquer Resource Wiki

Discussion on Conquer Resource Wiki within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old 03/07/2010, 19:50   #61


 
CptSky's Avatar
 
elite*gold: 0
Join Date: Jan 2008
Posts: 1,444
Received Thanks: 1,176
Quote:
Originally Posted by Nullable View Post
sizeof doesn't work that way.. you should read something about it or better try doing it yourself, and remember that the packet i'm reading is actually a pointer to the actual packet allocated on heap, in simple words sizeof doesn't work like this with pointers
When I will return to the C/C++, I will check for this operator Anyway, thanks, it's good to know that.
CptSky is offline  
Old 03/20/2010, 01:52   #62


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Small Update:

Im going to be adding 5165 packets this weekend, and probably restructing the packet layouts to have a more definative way of doing things. If anyone has any suggestions as to how they would like to see the packets layed out please post here, ill happily take a look at what you have to say, it was after all made for the community (ie. you guys).
Korvacs is offline  
Old 03/20/2010, 09:58   #63


 
KraHen's Avatar
 
elite*gold: 0
Join Date: Jul 2006
Posts: 2,216
Received Thanks: 794
Quote:
Originally Posted by Korvacs View Post
Small Update:

Im going to be adding 5165 packets this weekend, and probably restructing the packet layouts to have a more definative way of doing things. If anyone has any suggestions as to how they would like to see the packets layed out please post here, ill happily take a look at what you have to say, it was after all made for the community (ie. you guys).
I`d personally like to see the offset numbers :P
KraHen is offline  
Old 03/21/2010, 03:06   #64


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Offsets are something that i considered originally, but i rejected it because i beleived that the community would struggle to understand the concept, ill have anouther think about them and see if i can make it simpler.
Korvacs is offline  
Old 03/21/2010, 10:03   #65


 
KraHen's Avatar
 
elite*gold: 0
Join Date: Jul 2006
Posts: 2,216
Received Thanks: 794
Quote:
Originally Posted by Korvacs View Post
Offsets are something that i considered originally, but i rejected it because i beleived that the community would struggle to understand the concept, ill have anouther think about them and see if i can make it simpler.
You could include an article about them as well and this would solve the problem
KraHen is offline  
Old 03/21/2010, 17:03   #66


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Quote:
Originally Posted by ElDeRnEcRo View Post
You could include an article about them as well and this would solve the problem
Yeah thats a good idea.

I have started replacing the packet structures with a new layout using a table, which includes the offset, im also going to write a page about bytes/ushorts/uints/ulongs, and the offsets to help people to understand things alittle more, im also going to re-write all of the values to help make them more standard accross the wiki and easier to understand.
Korvacs is offline  
Old 03/21/2010, 17:45   #67
 
Nullable's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 390
Received Thanks: 321
Quote:
Originally Posted by Korvacs View Post
Yeah thats a good idea.

I have started replacing the packet structures with a new layout using a table, which includes the offset, im also going to write a page about bytes/ushorts/uints/ulongs, and the offsets to help people to understand things alittle more, im also going to re-write all of the values to help make them more standard accross the wiki and easier to understand.
Love the new layout of the packets, it's amazing anyhow there is an error in this: exactly at the exp variable in the 4267 version, here is the correct one:
PHP Code:
            (ushort)Length;
            (
ushort)1006;
            (
uint)(Character.UID);
            (
uint)(Character.Model);
            (
ushort)(Character.Hair);
            (
ushort)(0);
            (
uint)(Money);
            (
ulong)(Experience); // Exactly here :P
            
(uint)(0);
            (
uint)(0);
            (
uint)(0);
            (
ushort)(Strength);
            (
ushort)(Agility);
            (
ushort)(Vitality);
            (
ushort)(Spirit);
            (
ushort)(AttributePoints);
            (
ushort)(Hitpoints);
            (
ushort)(Mana);
            (
ushort)(PkPoints);
            (
byte)(Character.Level);
            (
byte)(Character.Job);
            (
byte)(0);
            (
byte)(Character.RebornCount);
            (
byte)1;
            (
byte)(2);
            (
string with length)Character.Name
            
(string with length)Character.Spouse 
Nullable is offline  
Old 03/21/2010, 17:50   #68


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Experience in the 4267 client never gets high enough to require a ulong, so strictly speaking its a uint for that packet
Korvacs is offline  
Old 03/21/2010, 17:56   #69
 
Nullable's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 390
Received Thanks: 321
Quote:
Originally Posted by Korvacs View Post
Experience in the 4267 client never gets high enough to require a ulong, so strictly speaking its a uint for that packet
Packet never worked with me using a uint, it worked with a ulong though
Nullable is offline  
Old 03/21/2010, 18:00   #70


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Quote:
Originally Posted by Nullable View Post
Packet never worked with me using a uint, it worked with a ulong though
It doesnt atually make the slightest bit of difference, but you can do this if you like:

PHP Code:
 (ushort)Length;
            (
ushort)1006;
            (
uint)(Character.UID);
            (
uint)(Character.Model);
            (
ushort)(Character.Hair);
            (
ushort)(0);
            (
uint)(Money);
            (
uint)(Experience); // Change this
            
(uint)(0); //Add this
            
(uint)(0);
            (
uint)(0);
            (
uint)(0);
            (
ushort)(Strength);
            (
ushort)(Agility);
            (
ushort)(Vitality);
            (
ushort)(Spirit);
            (
ushort)(AttributePoints);
            (
ushort)(Hitpoints);
            (
ushort)(Mana);
            (
ushort)(PkPoints);
            (
byte)(Character.Level);
            (
byte)(Character.Job);
            (
byte)(0);
            (
byte)(Character.RebornCount);
            (
byte)1;
            (
byte)(2);
            (
string with length)Character.Name
            
(string with length)Character.Spouse 
Korvacs is offline  
Old 03/21/2010, 18:09   #71
 
Nullable's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 390
Received Thanks: 321
Quote:
Originally Posted by Korvacs View Post
It doesnt atually make the slightest bit of difference, but you can do this if you like:

PHP Code:
 (ushort)Length;
            (
ushort)1006;
            (
uint)(Character.UID);
            (
uint)(Character.Model);
            (
ushort)(Character.Hair);
            (
ushort)(0);
            (
uint)(Money);
            (
uint)(Experience); // Change this
            
(uint)(0); //Add this
            
(uint)(0);
            (
uint)(0);
            (
uint)(0);
            (
ushort)(Strength);
            (
ushort)(Agility);
            (
ushort)(Vitality);
            (
ushort)(Spirit);
            (
ushort)(AttributePoints);
            (
ushort)(Hitpoints);
            (
ushort)(Mana);
            (
ushort)(PkPoints);
            (
byte)(Character.Level);
            (
byte)(Character.Job);
            (
byte)(0);
            (
byte)(Character.RebornCount);
            (
byte)1;
            (
byte)(2);
            (
string with length)Character.Name
            
(string with length)Character.Spouse 
I know what you mean, 4 + 4 = 8 obviously, but wouldn't it be easier to build it up as a ulong instead of adding another blank uint, that's just my opinion.. anyhow it's fine as long as the packet posted on the wiki is fine
Nullable is offline  
Old 03/21/2010, 18:13   #72


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Ah well, i use a pointer for my packets so for me its:

PHP Code:
                *(ushort*)PTR = (ushort)Buffer.Length;
                *((
ushort*)(PTR 2)) = 1006;
                *((
uint*)(PTR 4)) = Char.characterID;
                *((
uint*)(PTR 8)) = (uint)(Char.avatar 10000) + Char.modelID;
                *((
ushort*)(PTR 12)) = Char.hairStyle;
                *((
uint*)(PTR 16)) = Char.InventoryGold;
                *((
uint*)(PTR 20)) = Char.experience;
                *((
ushort*)(PTR 40)) = Char.strengthPoints;
                *((
ushort*)(PTR 42)) = Char.agilityPoints;
                *((
ushort*)(PTR 44)) = Char.vitalityPoints;
                *((
ushort*)(PTR 46)) = Char.spiritPoints;
                *((
ushort*)(PTR 48)) = Char.statPoints;
                *((
ushort*)(PTR 50)) = Char.health;
                *((
ushort*)(PTR 52)) = Char.mana;
                *((
ushort*)(PTR 54)) = Char.pkPoints;
                *((
byte*)(PTR 56)) = Char.level;
                *((
byte*)(PTR 57)) = Char.profession;
                *((
byte*)(PTR 59)) = Char.reborn;
                *((
byte*)(PTR 60)) = 1;
                *((
byte*)(PTR 61)) = 2
Korvacs is offline  
Old 03/21/2010, 18:19   #73
 
Nullable's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 390
Received Thanks: 321
Quote:
Originally Posted by Korvacs View Post
Ah well, i use a pointer for my packets so for me its:

PHP Code:
                *(ushort*)PTR = (ushort)Buffer.Length;
                *((
ushort*)(PTR 2)) = 1006;
                *((
uint*)(PTR 4)) = Char.characterID;
                *((
uint*)(PTR 8)) = (uint)(Char.avatar 10000) + Char.modelID;
                *((
ushort*)(PTR 12)) = Char.hairStyle;
                *((
uint*)(PTR 16)) = Char.InventoryGold;
                *((
uint*)(PTR 20)) = Char.experience;
                *((
ushort*)(PTR 40)) = Char.strengthPoints;
                *((
ushort*)(PTR 42)) = Char.agilityPoints;
                *((
ushort*)(PTR 44)) = Char.vitalityPoints;
                *((
ushort*)(PTR 46)) = Char.spiritPoints;
                *((
ushort*)(PTR 48)) = Char.statPoints;
                *((
ushort*)(PTR 50)) = Char.health;
                *((
ushort*)(PTR 52)) = Char.mana;
                *((
ushort*)(PTR 54)) = Char.pkPoints;
                *((
byte*)(PTR 56)) = Char.level;
                *((
byte*)(PTR 57)) = Char.profession;
                *((
byte*)(PTR 59)) = Char.reborn;
                *((
byte*)(PTR 60)) = 1;
                *((
byte*)(PTR 61)) = 2
esshh too many de-reference operators, i wrap them up in a class
PHP Code:
public static int WriteUInt64(byte[] Packetint Offsetulong Arg)
        {
            
fixed (bytepckt Packet)
            {
                *(
pckt Offset) = (byte)(Arg);
                *(
pckt Offset 1) = (byte)(Arg >> 8);
                *(
pckt Offset 2) = (byte)(Arg >> 16);
                *(
pckt Offset 3) = (byte)(Arg >> 24);
                *(
pckt Offset 4) = (byte)(Arg >> 32);
                *(
pckt Offset 5) = (byte)(Arg >> 40);
                *(
pckt Offset 6) = (byte)(Arg >> 48);
                *(
pckt Offset 7) = (byte)(Arg >> 56);

                return (
Offset 8);
            }
        } 
Nullable is offline  
Old 03/22/2010, 14:56   #74


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Nice, im going to do that at some point i think.

If anyone else sees anything that looks wrong, or they have anything to add please post here, i have done one or two 5165 packets, but as you can see im only just half way through converting the existing packets.
Korvacs is offline  
Old 03/22/2010, 21:48   #75
 
ImFlamedCOD's Avatar
 
elite*gold: 0
Join Date: Jun 2009
Posts: 378
Received Thanks: 141
When i get a chance Korvacs when i get home ill check my wiki for packets that you don't have. But if i'm not mistaken you got all the ones i have.
ImFlamedCOD is offline  
Reply


Similar Threads Similar Threads
[Resource] My Wiki
05/07/2011 - CO2 Private Server - 4 Replies
Hey. Hope you get use out of this. If you want me to add anything, just say so and what you want me to add below. Link: https://conquerresources.wikispaces.com/ Edit: Here are all of the source downloads btw in a list: http://spirited-fang.blogspot.com/p/source-downlo ads.html Sincerely,
Resource Wiki
11/12/2010 - CO2 Private Server - 3 Replies
Hey everyone, I know how helpful it is to have a Packet Wiki, so I thought that I would add this to help you all. It's a resource wiki that will help you customize your source. Hope you all like it! http://conquerproject.wikispaces.com/space/badge/ 468x60 Link if you can't figure out that the image is the link: Conquer Project Resources Sincerely, Fang



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


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.