Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 20:41

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

Advertisement



Guild and Chat Packets

Discussion on Guild and Chat Packets within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
pintinho12's Avatar
 
elite*gold: 0
Join Date: Jul 2009
Posts: 943
Received Thanks: 408
Guild and Chat Packets

Hello,
I've been checking the packet logs, I am working on the packet 1107, the Guild Request one...

It looks like It's sending 2 Packets in a row, This and the Chat Packet one when a whisper is sent, It does have 2 TQClient ****, So i guess there are 2 packets..
Is it? Do i need to build something to Split it into 2 Packets?
I will try it now btw lol
I am sending the String Packet with the Guild Names, I'm doing this because ive seen on another sources...
I noticed that they send the SynID with ushort instead of uint, but the offsets between ranking and guild are 4 bytes away from each other...
I made them 16 (SynID) and 20(Rank) because Exodus didnt have them added
Tried 12 and 16, but the client crashes after the StringPacket..
Tried to look 5165 sources lol but couldnt find the Guild Load part... >_>
From 5180 to 5517 the Guild Packet changes alot?
pintinho12 is offline  
Old 08/02/2014, 04:20   #2
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,191
Regarding your first question, do you do any packet splitting or fragment handling?
Spirited is offline  
Thanks
1 User
Old 08/02/2014, 06:48   #3
 
pintinho12's Avatar
 
elite*gold: 0
Join Date: Jul 2009
Posts: 943
Received Thanks: 408
Wink

Quote:
Originally Posted by Spirited View Post
Regarding your first question, do you do any packet splitting or fragment handling?
I've fixed this, now im stuck with a "The program has been terminated due to a stackoverflow"
Something like that


Trying to figure out whats causing that..
Happens after i open the Guild Window
pintinho12 is offline  
Old 08/02/2014, 06:51   #4
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,191
You need some proper error handling so your server doesn't crash if an error is thrown. Is the program terminating within error handling? If so, you may want to check how many resources your server is using (Shift + Ctrl + Esc).
Spirited is offline  
Old 08/02/2014, 07:17   #5
 
pintinho12's Avatar
 
elite*gold: 0
Join Date: Jul 2009
Posts: 943
Received Thanks: 408
Quote:
Originally Posted by Spirited View Post
You need some proper error handling so your server doesn't crash if an error is thrown. Is the program terminating within error handling? If so, you may want to check how many resources your server is using (Shift + Ctrl + Esc).
Ive been reading, it may be any loop, but i couldn't find any...
How can i handle errors? I have try/catch to receive and send packets lol
I've been having crashes after disconnections hahah
It started after i start adding guild stuff '-'
Now it's happening again..
Sometimes it just disconnects after the screen spawn
//edit
sure, removed the guild ****, logged in normally hahah -__-
Am i looping somewhere?
Because all it does is send the guild infos to the client :|
Gotta check out the code
pintinho12 is offline  
Old 08/02/2014, 09:29   #6
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,191
If your client disconnects randomly on a packet, it may be the length. Check your packet length in offset zero against your send buffer length. If the client receives the wrong length, it usually just disconnects you or crashes. As far as error checking goes, try-catches are a good start. From that picture though, it didn't seem like errors were caught properly. Are you referencing an external library incorrectly or reading beyond the memory your program as allocated?
Spirited is offline  
Old 08/02/2014, 17:47   #7
 
pintinho12's Avatar
 
elite*gold: 0
Join Date: Jul 2009
Posts: 943
Received Thanks: 408
It was crashing the Client, i checked and it was sending packet full of 0 with Lenght 11, so i found out that it was my String Packet, i rebuild it and then i logged in... But when i use the SendGuild() it crashes (The server).. I used a Try{}Catch{} but it crashes anyway..

pintinho12 is offline  
Old 08/03/2014, 19:05   #8
 
pintinho12's Avatar
 
elite*gold: 0
Join Date: Jul 2009
Posts: 943
Received Thanks: 408
Thanks Fang, problem solved

How do i send the Name? lol Been trying, but the String Packet isnt working :|
Should i need to create another thread? If yes, you can close this one, the guild and chat problem are fixed
pintinho12 is offline  
Old 08/03/2014, 19:13   #9
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,191
Nah, another thread isn't necessary. As long as it's on topic. Guild names are usually set using the string packet, so how are you sending it? What data are you sending in what offsets?
Spirited is offline  
Old 08/03/2014, 20:11   #10
 
pintinho12's Avatar
 
elite*gold: 0
Join Date: Jul 2009
Posts: 943
Received Thanks: 408
Is it wrong? I send it before the items, skills and character stuff...

Code:
public void SendName(SocketClient Client)
        {
            StringPacket stringPacket = new StringPacket(true);
            stringPacket.UID = this.UID;
            stringPacket.Type = (byte)StringPacket.GuildName;
            stringPacket.Texts.Add(Name + " " + LeaderName + " 0 " + MemberAmount);
            stringPacket.Send(Client);
            Console.WriteLine("ID: " + this.UID + " Name: " + Name + " Leader Name: " + LeaderName);
        }
And this is the StringPacket

Code:
public StringPacket(bool Create)
            : base(8 + 11)
        {
            if (Create)
            {
                Buffer = new byte[19];
                WORD(11, 0, Buffer);
                WORD(1015, 2, Buffer);
                Texts = new List<string>();
            }
        }
        public uint UID
        {
            get { return BitConverter.ToUInt32(Buffer, 4); }
            set { DWORD32(value, 4, Buffer); }
        }
        public byte Type
        {
            get { return Buffer[8]; }
            set { Buffer[8] = value; }
        }
        public byte TextsCount
        {
            get { return Buffer[9]; }
            set { Buffer[9] = value; }
        }
        public List<string> Texts;
        public byte[] ToArray()
        {
            ushort entirelength = 19;
            foreach (string list in Texts)
                entirelength += (ushort)list.Length;
            byte[] buffer = new byte[entirelength];
            WORD((ushort)(entirelength - 8), 0, buffer);
            WORD(1015, 2, buffer);
            DWORD32(UID, 4, buffer);
            buffer[8] = Type;
            Buffer = buffer;
            Byte(Texts, 9, Buffer);
            return Buffer;
        }
pintinho12 is offline  
Old 08/03/2014, 21:17   #11
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,191
I've never implemented Guilds before, but don't think the elements should be appended to just one string. Each element is probably its own string that you have to send all in one packet. Perhaps someone else can confirm that what I'm saying is correct.
Spirited is offline  
Old 08/03/2014, 22:34   #12
 
pintinho12's Avatar
 
elite*gold: 0
Join Date: Jul 2009
Posts: 943
Received Thanks: 408
I've sawn it at another Sources, it sends the Name, Leader, 0 and the Member Amount '-'

Well, fixed 50%...
It isnt showing the Leader Name... But ill be fixing it..
About the Jumping... i remember a thread that you created with a calculation when someone jumps on your screen..
Do you remember which one is that?
It works when i send the Jump packet to leave the screen, but when it appears again it just "spawn"...
and make the jump on the same coord he spawned..

Someone still edit the Packet Wiki? I wish to donate 5187 Packet Offsets xD



The Guild ID is ushort or uint?
I can't make it on the spawn packet... UID is 8, Syn ID i tried ushort 12-14-18-20.. 16 is the Position, if i use any Offset after 16, it doesnt show the Position, and uint 12-16-20 Doesnt show the Name..
pintinho12 is offline  
Reply


Similar Threads Similar Threads
Request offses in Guild packets 5375
08/19/2011 - CO2 Private Server - 0 Replies
i just complete guild arsenal and ranks of members i used talis12 based system of guild i need guild battel power shared offsets http://img832.imageshack.us/img832/8092/201108170 40940.jpg any ides
[5165] Chat Packets
11/28/2010 - CO2 Private Server - 6 Replies
Hello everybody! I'm using 5165 Tanel's Source but I noticed that the chat packet Isn't correct... Somethings are missing,, such as the avatar in whisper chat window and scanning gears of the target.. Any1 has the correct packet? Thanks Here Goes My Packet public static COPacket ChatMessage(uint MessageID, string From, string To, string Message, ushort Type, uint Mesh) { byte Packet = new byte; COPacket P = new COPacket(Packet);



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


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.