5620 Spawnpacket offsets.

06/30/2012 18:36 diedwarrior#1
I know this is easy, takes one hour of trial and error, but I got many people wanting em, so I just thought about making a thread to make it easier.

Hair: 96
HP: 84
Level: 107
Reborn: 98 ( didn't test it)
Classes: (When you hover over the client's status)
SpawnPacket[215] = value;
SpawnPacket[217] = value;
SpawnPacket[219] = value;
FirstRebornClass : 211
SecondRebornClass : 209
ClanName
Code:
  public string ClanName
        {
            get { return clan; }
            set
            {
                string oldclan = clan;
                clan = value;
                if (value != null)
                {

                    if (value != "")
                    {
                        byte[] dd33 = new byte[8 + 229 + Name.Length + value.Length + 2];
                        for (int i = 2; i < SpawnPacket.Length - 7; i++)
                        {
                            dd33[i] = SpawnPacket[i];
                        }

                        SpawnPacket = new byte[8 + 229 + Name.Length + value.Length + 2];
                        WriteUInt16((ushort)(229 + Name.Length + value.Length + 2), 0, SpawnPacket);

                        for (int i = 2; i < dd33.Length; i++)
                        {
                            SpawnPacket[i] = dd33[i];
                        }

                        WriteUInt16(10014, 2, SpawnPacket);

                     


                        SpawnPacket[226] = 4;
                        SpawnPacket[227] = (byte)_Name.Length;
                        WriteString(_Name, 228, SpawnPacket);
                        SpawnPacket[227 + SpawnPacket[227] + 2] = (byte)value.Length;
                        WriteString(value, 227 + SpawnPacket[227] + 3, SpawnPacket);
                    }
                    else
                    {
                        byte[] dd33 = new byte[8 + 221 + Name.Length + 2];
                        for (int i = 2; i < SpawnPacket.Length - 8; i++)
                        {
                            if (i < dd33.Length)
                                dd33[i] = SpawnPacket[i];
                        }

                        SpawnPacket = new byte[8 + 229 + Name.Length + 2];
                        WriteUInt16((ushort)(229 + Name.Length + 2), 0, SpawnPacket);

                        for (int i = 2; i < dd33.Length; i++)
                        {
                            SpawnPacket[i] = dd33[i];
                        }

                        WriteUInt16(10014, 2, SpawnPacket);

                        



                        SpawnPacket[226] = 4;
                        SpawnPacket[227] = (byte)_Name.Length;
                        WriteString(_Name, 228, SpawnPacket);
                        SpawnPacket[227 + SpawnPacket[227] + 2] = (byte)value.Length;
                        WriteString(value, 227 + SpawnPacket[227] + 3, SpawnPacket);
                        
                    }
                }
            }
        }
Normal name:
Code:
  public string Name
        {
            get { return _Name; }
            set
            {
                _Name = value;
                SpawnPacket = new byte[8 + 230 + _Name.Length];
                WriteUInt16((ushort)(230 + _Name.Length), 0, SpawnPacket);
                WriteUInt16(10014, 2, SpawnPacket);
                WriteStringList(new List<string> { _Name }, 226, SpawnPacket);
            }
        }
Also most of the equipment offsets has changed, most of em got 4 more bytes.
That's what I recall atm, if you need anything else post it here.
Kratos.
06/30/2012 19:04 nTL3fTy#2
People still use this absurd way of implementing the spawn packet? :facepalm:
06/30/2012 19:07 diedwarrior#3
Mind telling me a better way ?
06/30/2012 19:12 btot#4
i wish same as you =)
06/30/2012 19:17 ConquerServer#5
Quote:
Originally Posted by diedwarrior View Post
Mind telling me a better way ?
Their deeds like that

PHP Code:
spawn Packet

NameLenght 
219
Name 
230 
06/30/2012 19:18 diedwarrior#6
^ Huh ?
06/30/2012 21:23 littlechris95#7
Complementing ...

[Only registered and activated users can see links. Click Here To Register...]

Spawn Packet of Level is 107 and 90
06/30/2012 21:29 Zeroxelli#8
Why does everyone write the packet type at the end of everything else, as well? It's offset 2.. Things should be defined in order to make it easier to read later.

Also, I don't believe in having one object for packets from/to the server. If I needed to access, say, Name, I would access the origin, not what I already put into the packet.. When defining a packet to be sent to the server, you should really only need to store the byte array.. but that's just me. Feel free to correct me on that.
06/30/2012 23:46 |xabi|#9
sounds good that you are try to help :D
Today Helping tomorrow Regretting :)
06/30/2012 23:54 Zeroxelli#10
I wouldn't say regret. I was around when quite a few of the people here didn't even know how to code, including some that are/were moderators, and I either helped them, or learned from them, it was a community effort. I can't say that any of us regret anything related to learning or what we've learned, or the fact that we helped the people we did.
07/01/2012 00:03 |xabi|#11
Quote:
Originally Posted by Zeroxelli View Post
I wouldn't say regret. I was around when quite a few of the people here didn't even know how to code, including some that are/were moderators, and I either helped them, or learned from them, it was a community effort. I can't say that any of us regret anything related to learning or what we've learned, or the fact that we helped the people we did.
when everyone helps anyone else i hope that the learner learns from what you do without knowing why it made for!!
07/01/2012 00:08 diedwarrior#12
Why I share most of the stuff I do? Well I do so, to make people happy in the first place, And maybe just maybe, when they take this stuff, that would make 'em wanting to learn more, to create bigger systems etc, well as long as I'm helping people, I'm glad :P.
07/01/2012 00:27 Zeroxelli#13
That's a great attitude to have, and exactly what this community needs. It's what we were founded upon in the first place. ;)
07/01/2012 00:38 -Shunsui-#14
#facepalm at that clan name structure -_-, it can be broken down to like 3 lines
07/01/2012 00:45 diedwarrior#15
Not even my source, just did em to a dude through tv, i gave him the number but he couldn't do it, so i just copied it and since it was for impulses so i released it.