|
You last visited: Today at 08:00
Advertisement
5722 Spawn packet.
Discussion on 5722 Spawn packet. within the CO2 Private Server forum part of the Conquer Online 2 category.
04/30/2013, 21:04
|
#1
|
elite*gold: 0
Join Date: Jul 2008
Posts: 874
Received Thanks: 238
|
5722 Spawn packet.
Hey everyone.
Any one could help and give me the right spawn packets?
or just give me a good guide that could help me in figure out it my own
 
[Question] to be sure of what i had done
is the current arg.lenght = 312 ?
Ty in advance.
sry for bad english.
|
|
|
04/30/2013, 22:03
|
#2
|
elite*gold: 0
Join Date: Feb 2009
Posts: 262
Received Thanks: 161
|
Str_Count = 238,//+4 byte`s
Str_NameLenght = 239,
Uint16_PacketLenght = 241
|
|
|
04/30/2013, 22:32
|
#3
|
elite*gold: 0
Join Date: Jul 2008
Posts: 874
Received Thanks: 238
|
Quote:
Originally Posted by teroareboss1
Str_Count = 238,//+4 byte`s
Str_NameLenght = 239,
Uint16_PacketLenght = 241
|
Ty for ur sharing . 
is that right?
PHP Code:
public string Name
{
get
{
return _Name;
}
set
{
this._Name = value;
int index = 239;
if (this.ClanName != "")
{
this.SpawnPacket = new byte[((((8 + index) + 2) + this.Name.Length) + this.ClanName.Length) + 2];
Writer.WriteUInt16((ushort)((((index + 2) + this.Name.Length) + this.ClanName.Length) + 2), 0, this.SpawnPacket);
Writer.WriteUInt16(0x271e, 2, this.SpawnPacket);
this.SpawnPacket[index] = 4;
this.SpawnPacket[index + 1] = (byte)this._Name.Length;
Writer.WriteString(this._Name, index + 2, this.SpawnPacket);
this.SpawnPacket[((index + 1) + this.SpawnPacket[index + 1]) + 2] = (byte)this.ClanName.Length;
Writer.WriteString(this.ClanName, ((index + 1) + this.SpawnPacket[index + 1]) + 2, this.SpawnPacket);
}
else
{
this.SpawnPacket = new byte[((8 + index) + 2) + this.Name.Length];
Writer.WriteUInt16((ushort)((index + 2) + this.Name.Length), 0, this.SpawnPacket);
Writer.WriteUInt16(0x271e, 2, this.SpawnPacket);
this.SpawnPacket[index] = 4;
this.SpawnPacket[index + 1] = (byte)this._Name.Length;
Writer.WriteString(this._Name, index + 2, this.SpawnPacket);
}
}
}//
public string ClanName
{
get
{
return this.clan;
}
set
{
this.clan = value;
if (value != null)
{
int index = 238;//234
if (value != "")
{
byte[] buffer = new byte[((((8 + index) + 2) + this.Name.Length) + value.Length) + 2];
for (int i = 2; i < (this.SpawnPacket.Length - 7); i++)
{
buffer[i] = this.SpawnPacket[i];
}
this.SpawnPacket = new byte[((((8 + index) + 2) + this.Name.Length) + value.Length) + 2];
Writer.WriteUInt16((ushort)((((index + 2) + this.Name.Length) + value.Length) + 2), 0, this.SpawnPacket);
for (int j = 2; j < buffer.Length; j++)
{
this.SpawnPacket[j] = buffer[j];
}
Writer.WriteUInt16(0x271e, 2, this.SpawnPacket);
this.SpawnPacket[index] = 4;
this.SpawnPacket[index + 1] = (byte)this._Name.Length;
Writer.WriteString(this._Name, index + 2, this.SpawnPacket);
this.SpawnPacket[((index + 1) + this.SpawnPacket[index + 1]) + 2] = (byte)value.Length;
Writer.WriteString(value, ((index + 1) + this.SpawnPacket[index + 1]) + 2, this.SpawnPacket);
}
else
{
byte[] buffer2 = new byte[(((8 + index) + 2) + this.Name.Length) + 2];
for (int k = 2; k < (this.SpawnPacket.Length - 8); k++)
{
if (k < buffer2.Length)
{
buffer2[k] = this.SpawnPacket[k];
}
}
this.SpawnPacket = new byte[(((8 + index) + 2) + this.Name.Length) + 2];
Writer.WriteUInt16((ushort)(((index + 2) + this.Name.Length) + 2), 0, this.SpawnPacket);
for (int m = 2; m < buffer2.Length; m++)
{
this.SpawnPacket[m] = buffer2[m];
}
Writer.WriteUInt16(0x271e, 2, this.SpawnPacket);
this.SpawnPacket[index] = 4;
this.SpawnPacket[index + 1] = (byte)this._Name.Length;
Writer.WriteString(this._Name, index + 2, this.SpawnPacket);
this.SpawnPacket[((index + 1) + this.SpawnPacket[index + 1]) + 2] = (byte)value.Length;
Writer.WriteString(value, ((index + 1) + this.SpawnPacket[index + 1]) + 2, this.SpawnPacket);
}
}
}
}
is that all of what had changed ?
|
|
|
05/01/2013, 00:05
|
#4
|
elite*gold: 0
Join Date: Jun 2005
Posts: 692
Received Thanks: 353
|
Quote:
Originally Posted by abdoumatrix
Ty for ur sharing . 
is that right?
is that all of what had changed ?
|
That's some of the most horrific code (and I'm using that term loosely) I've ever seen.
Just so this isn't an outright demeaning post, here's a protip:
You don't need to parenthesize every addition because addition is associative, meaning "(a + b) + c" or "a + (b + c)" is the same as "a + b + c".
|
|
|
05/01/2013, 03:06
|
#5
|
elite*gold: 0
Join Date: Nov 2009
Posts: 342
Received Thanks: 17
|
just add 4 bytes !!
|
|
|
05/01/2013, 10:14
|
#6
|
elite*gold: 0
Join Date: Jul 2008
Posts: 874
Received Thanks: 238
|
Quote:
Originally Posted by nTL3fTy
That's some of the most horrific code (and I'm using that term loosely) I've ever seen.
Just so this isn't an outright demeaning post, here's a protip:
You don't need to parenthesize every addition because addition is associative, meaning "(a + b) + c" or "a + (b + c)" is the same as "a + b + c".
|
 
i dont take deep look it . it is the common one is trinty or impulse 's based source 's structure. many told me it is bad coded .so i using it till i can code it my own.
Quote:
Originally Posted by |xabi|
just add 4 bytes !!
|
add for Name , Clan ? and what else.
|
|
|
05/03/2013, 19:40
|
#7
|
elite*gold: 0
Join Date: Mar 2013
Posts: 29
Received Thanks: 3
|
add +4 bytes
name / monster
just this ! i don't know any spawn more need to change but i do only name / monster and
all fine
oh and the lenght this is right
Good Luck
|
|
|
05/04/2013, 00:39
|
#8
|
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 950
|
Quote:
Originally Posted by nTL3fTy
That's some of the most horrific code (and I'm using that term loosely) I've ever seen.
Just so this isn't an outright demeaning post, here's a protip:
You don't need to parenthesize every addition because addition is associative, meaning "(a + b) + c" or "a + (b + c)" is the same as "a + b + c".
|
Now imagine that being all over the source. That is Trinity.
|
|
|
 |
Similar Threads
|
During updating the new spawn packet 5623.
08/18/2012 - CO2 Private Server - 2 Replies
Heya guys
During updating the new spawn packet 5623.
1-first acc sees second acc however second acc can't see first acc.
2-when acc login the flower icon appears next his name.
3- name is fucked for chars
|
Group Spawn Packet
02/11/2012 - SRO Coding Corner - 22 Replies
Well every now and then a packet isn't parsed correctly, sometimes character spawn data just simply ends after the character name causing me to read over other data while it tries to read guild name and stuff like that. Also some buffs related to clerics and bards seem to have an extra byte while parsing the character spawn packet, I'm not sure which buffs exactly so that's a problem too. It'd be great if someone could point out what I can do to correctly parse these group spawn packets. I've...
|
spawn name Packet 5520
08/21/2011 - CO2 Private Server - 11 Replies
hellos Evert Body
this pic http://img832.imageshack.us/img832/7425/44423762.j pg
that when i try to upgrade my sourse from 5375 to 5520 i upgrade the spawn to see the monsters and other chars but i can't see the names of them
and the char is visble??
so i need spawn packet make it fully working
|
[Help] Spawn Packet
08/20/2011 - CO2 Private Server - 6 Replies
Right, this is my entity.cs, Im guessing the spawnpacket is in here but I'm trying to update it to work in 5517. I tried changing the individual numbers to the ones found in Shisui's post but im guessing I did it wrong because now I just dc when I log in. Can someone explain what I'm meant to do please?
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using Conquer_Online_Server.Network;
using Conquer_Online_Server.Network.GamePackets;
using...
|
All times are GMT +1. The time now is 08:01.
|
|