Help GroupSpawn Parse

03/24/2013 12:30 djbm#1
I can't parse it :(
where the error ?

using SilkroadSecurityAPI
Code:
8D 07 00 00 27 05 53 00 A8 60 C8 BE 64 44 6D 46 35 C2 CE A1 01 44 5A 3E 01 00 A8 60 92 03 D3 FF 06 02 01 00 00 00 00 00 00 00 41 00 00 B0 41 00 00 C8 42 00 02 01 05 00
Code:
                                        uint id = packet.ReadUInt(); // MOB ID
                                        byte xsec = packet.ReadByte();
                                        byte ysec = packet.ReadByte();
                                        float xcoord = packet.ReadUShort();
                                        packet.ReadUShort();
                                        float ycoord = packet.ReadUShort();
                                        packet.ReadUShort(); // Position
                                        byte move = packet.ReadByte(); // Moving
                                        packet.ReadByte(); // Running
                                        if (move == 1)
                                        {
                                            xsec = packet.ReadByte();
                                            ysec = packet.ReadByte();
                                            if (ysec == 0x80)
                                            {
                                                xcoord = packet.ReadUShort() - packet.ReadUShort();
                                                packet.ReadUShort();
                                                packet.ReadUShort();
                                                ycoord = packet.ReadUShort() - packet.ReadUShort();
                                            }
                                            else
                                            {
                                                xcoord = packet.ReadUShort();
                                                packet.ReadUShort();
                                                ycoord = packet.ReadUShort();
                                            }
                                        }
                                        else
                                        {
                                            packet.ReadByte(); // Unknown
                                            packet.ReadUShort(); // Unknwon
                                        }
                                        int xas = Convert.ToInt32((xsec - 135) * 192 + (xcoord / 10));
                                        int yas = Convert.ToInt32((ysec - 92) * 192 + (ycoord / 10));
                                        //int dist = Math.Abs((xas - Character.X)) + Math.Abs((yas - Character.Y));
                                        byte alive = packet.ReadByte(); // Alive
                                        packet.ReadByte(); // Unknown
                                        packet.ReadByte(); // Unknown
                                        packet.ReadByte(); // Zerk Active
                                        packet.ReadUShort(); // Walk Speed
                                        packet.ReadUShort(); // Run Speed
                                        packet.ReadUShort(); // Zerk Speed
                                        packet.ReadUInt(); // Unknown
                                        byte mtype = packet.ReadByte();
03/24/2013 15:36 detCode#2
group spawn is multiple spawn with items, mobs chars.. together. not only monster
use can use single monster,chars,items spawn
03/25/2013 00:26 sarkoplata#3
First you should get the RefObjID and check if it's an Item/Mob/Npc/Character/Pet.
Later, spawn according to that.

And in groupspawn there isn't 1 item but more. They come in a loop. Like:

00 03 // spawn amount

-start-
............. ]
............. ] NPC
............. ]

............. ]
............. ] MOB
............. ]

............. ]
............. ] PET
............. ]

-end-

Also, there is a Spawn Byte measurement, this packet may be a Despawn packet aswell. (Your packet seems more like a spawn). They will all come in 3019 so careful.
03/25/2013 22:12 djbm#4
thx man ı found problem :)