Spawn Entities, Current Patch

03/23/2011 09:15 .Kinshi#1
EDIT:
Nevermind, my packet was off a few bytes :P

Has spawning entities in the lastest patch changed?
Entities (ex: Players) don't spawn to each other on my source since the latest patch.
03/23/2011 10:40 -impulse-#2
Quote:
Originally Posted by .Kinshi View Post
EDIT:
Nevermind, my packet was off a few bytes :P

Has spawning entities in the lastest patch changed?
Entities (ex: Players) don't spawn to each other on my source since the latest patch.
I had this problem also, my packet was off two bytes. :S It took me a while to find out the problem because no offset was wrong >.>
03/23/2011 11:14 .Kinshi#3
Quote:
Originally Posted by -impulse- View Post
I had this problem also, my packet was off two bytes. :S It took me a while to find out the problem because no offset was wrong >.>
Haha exact same problem for me.
03/23/2011 12:28 iStefan#4
I have the same problem also.
What do you mean by "my packet was off two bytes" ...
03/23/2011 13:22 Syst3m_W1z4rd#5
Quote:
Originally Posted by iStefan View Post
I have the same problem also.
What do you mean by "my packet was off two bytes" ...
I guess the length.
03/23/2011 13:53 iStefan#6
Quote:
Originally Posted by Syst3m_W1z4rd View Post
I guess the length.
Not really, If there is more length, something won't be spawned(e.g. name , it's usually at the last offsets). But Now, Either the Location or Mesh is spawned..
03/23/2011 18:42 pro4never#7
Yes, when something is off by a few bytes it means that

-The length was wrong (in some packets causes them to not work at all, in others just causes them to work incorrectly)

-The values need to be shifted down after what was added (so say a new value was added at offset 102, you'd have to shift everything PAST that down by the length of w/e value was added. In this case a ushort it sounds like)

As mentioned, strings are generally the last thing in a packet meaning names and such will not show correctly till you shift things down.
03/23/2011 21:50 -impulse-#8
Quote:
Originally Posted by pro4never View Post
Yes, when something is off by a few bytes it means that

-The length was wrong (in some packets causes them to not work at all, in others just causes them to work incorrectly)

-The values need to be shifted down after what was added (so say a new value was added at offset 102, you'd have to shift everything PAST that down by the length of w/e value was added. In this case a ushort it sounds like)

As mentioned, strings are generally the last thing in a packet meaning names and such will not show correctly till you shift things down.
Here the problem wasn't about names not showing up...the problem was entities didn't show up at all.
03/23/2011 22:16 pro4never#9
True but often times invalid packet size or other values missing = client won't eve use the packet properly lol.
03/23/2011 22:28 Korvacs#10
Quote:
Originally Posted by -impulse- View Post
Here the problem wasn't about names not showing up...the problem was entities didn't show up at all.
Well yeah but if the client is expecting a 50 byte packet and you send a 40 byte packet its most likely not going to work, irrelevant of what data is in it.
03/23/2011 22:51 -impulse-#11
Quote:
Originally Posted by Korvacs View Post
Well yeah but if the client is expecting a 50 byte packet and you send a 40 byte packet its most likely not going to work, irrelevant of what data is in it.
Well the thing is, my packet structure was just fine, it had just two more bytes.
03/23/2011 23:03 Korvacs#12
Quote:
Originally Posted by -impulse- View Post
Well the thing is, my packet structure was just fine, it had just two more bytes.
Well, now that the TQstring has to immediately follow the end of the packet, the client will look for it in the wrong place if the packet isnt exactly the right length.

So yeah, exact length is important nowadays.
03/24/2011 00:11 .Kinshi#13
This is my spawn packet.
There's still a bunch of values I logged but have no idea what they are.

Code:
Length : 214 + Name.Length

Lookface[UInt32:4]
Identifier[UInt32:8]
StatusFlag[UInt64:22]
Helmet[UInt32:38]
Garment[UInt32:42]
Armor[UInt32:46]
Left[UInt32:50]
Right[UInt32:54] 
LeftAccesorry[UInt32:58]
RightAccesorry[UInt32:62]
Steed[UInt32:66]
HairStyle[UInt16:78]
X[UInt16:80]
Y[UInt16:82]
Direction[Byte:84]
Action[Byte:85]
Reborn[Byte:92]
Level[Byte:93]
StringCount[Byte:212]
NameLength[Byte:213]
Name[String:214]
03/24/2011 03:26 nTL3fTy#14
Quote:
Originally Posted by .Kinshi View Post
This is my spawn packet.
There's still a bunch of values I logged but have no idea what they are.

Code:
Length : 214 + Name.Length

Lookface[UInt32:4]
Identifier[UInt32:8]
StatusFlag[UInt64:22]
Helmet[UInt32:38]
Garment[UInt32:42]
Armor[UInt32:46]
Left[UInt32:50]
Right[UInt32:54] 
LeftAccesorry[UInt32:58]
RightAccesorry[UInt32:62]
Steed[UInt32:66]
HairStyle[UInt16:78]
X[UInt16:80]
Y[UInt16:82]
Direction[Byte:84]
Action[Byte:85]
Reborn[Byte:92]
Level[Byte:93]
StringCount[Byte:212]
NameLength[Byte:213]
Name[String:214]
Code:
Length : 214 + Name.Length

Lookface[UInt32:4]
Identifier[UInt32:8]
StatusFlag[UInt64:22]
Helmet[UInt32:38]
Garment[UInt32:42]
Armor[UInt32:46]
Left[UInt32:50]
Right[UInt32:54] 
LeftAccesorry[UInt32:58]
RightAccesorry[UInt32:62]
Steed[UInt32:66]
[b]MonsterHP[UInt16:74][/b]
[b]MonsterLevel[UInt16:76][/b]
HairStyle[UInt16:78]
X[UInt16:80]
Y[UInt16:82]
Direction[Byte:84]
Action[Byte:85]
Reborn[Byte:92]
Level[Byte:93]
[b]IsAway[Byte:96][/b]
[b]MonsterIsBoss[Byte:175][/b]
StringCount[Byte:212]
NameLength[Byte:213]
Name[String:214]
The rebirth history is near the end of the packet as well.
03/24/2011 08:24 -impulse-#15
If anyone has problems with showing the right HP to the boss monsters, use this code:


Code:
                if (Boss > 0)
                {
                    uint key = (uint)(MaxHitpoints / 10000);
                    if(key != 0)
                        WriteUInt16((ushort)(value / key), 74, SpawnPacket);
                    else
                        WriteUInt16((ushort)(value * MaxHitpoints / 1000 / 1.09), 74, SpawnPacket);
                }
                else
                    WriteUInt16((ushort)value, 74, SpawnPacket);
It shows almost the right amount(just a few monsters has with 1k more hp).
But the main problem is that it shows only 1 bar...:| On CO it shows 3 bars.

Anyone figured that one out already?