[C#] (Mob) despawn-packet 3016

10/11/2012 21:22 lukas2abc#1
hey i writing a bot now and i can successfully read mob id and put mobname and unique id in list. When a mob is Dead or disappears(going in safe zone) i get the packet 3016 with the unique id of that mob and delete it from list with that function:
Code:
else if (packet.Opcode == 0x3016)
                            {
                                int x = 0;
                                uint unique_id = packet.ReadUInt32();
                                foreach (Monster m in Globals.currentMonsters)
                                {
                                   
                                    if (m.unique_id == unique_id)
                                    {
                                        Globals.currentMonsters.RemoveAt(x);
                                        log("deleted " + m.unique_id + Environment.NewLine);
                                        refreshMobs();//refresh listbox with mobs
                                        break;//stop foreach because we found the one
                                    }
                                    x++;
                                }
                                
                            }
That works good but there are still mobs left because they dont "disappear"...they still exist and i can even attack them packet-based if they are "out of sight" in client.
So guys i aksk you how to remove the other mobs that are far away but still exist?
In the 0x3019 Packet must be some location data but i only know that the first UInt32 is mobID and the second UInt32 is uniqueID...so the rest might be the rotation, speed and location or sth.
Or is it the 0xB021 packet?!?
Can you help me with that?
(and yes i searched everywhere on the internet ;))

greez lukas
10/11/2012 21:49 ZeraPain#2
well there is not only 0x3016 for despawn.
0x3016 is for single despawn but there are also 0x3019 packets for multiple despawn

the 0x3018 packet will show you if they spawn or despawn, including the amount of spawn/despawn (first byte is the spawn type 1= spawn, 2= despawn and the second byte is the amount of mobs/chars/items)
10/11/2012 22:07 lukas2abc#3
well i use 3019 for spawn lol and it works?!? haha funny
all 3018 packets i receive are 0 Byte packets...so no data-.-
and whats the B021 packet for? i think its location of object

greez lukas
10/11/2012 22:15 zeteris#4
Quote:
Originally Posted by lukas2abc View Post
well i use 3019 for spawn lol and it works?!? haha funny
all 3018 packets i receive are 0 Byte packets...so no data-.-
and whats the B021 packet for? i think its location of object

greez lukas
Group spawn packets will always come like this:

[3017] //GroupSpawn Header
[BYTE] - Type //01 Spawn, 02 Despawn
[USHORT] - Ammount of objects.

[3019] //GroupSpawn Data
There may be more than 1 [3019] packets between [3017] and [3018] you need to merge them.

[3018] //End of GroupSpawn Data



[B021] is movement opcode.
10/11/2012 23:18 lukas2abc#5
thank you!
can you give me the packet structure of the B021 packet?
the first uint32 is uniqueID and the other bytes?

thx

greez lukas
10/12/2012 11:31 ZeraPain#6
Quote:
Originally Posted by lukas2abc View Post
well i use 3019 for spawn lol and it works?!? haha funny
all 3018 packets i receive are 0 Byte packets...so no data-.-
and whats the B021 packet for? i think its location of object

greez lukas
well yes my mistake, sorry.
i meant 0x3017
10/12/2012 14:26 zeteris#7
Quote:
Originally Posted by lukas2abc View Post
thank you!
can you give me the packet structure of the B021 packet?
the first uint32 is uniqueID and the other bytes?

thx

greez lukas
[B021]
[UINT32] - Unique ID of object
[BYTE] - Type of movement 0 - Sky, 1 - Ground
#If ground movement
[BYTE] - xSector
[BYTE] - ySector
[INT16] - xPosition or [INT32] - xPosition in cave
[INT16] - zPosition or [INT32] - zPosition in cave
[INT16] - yPosition or [INT32] - yPosition in cave

It's not fully parsed packet, I only use this part.
Also where are you from ?
10/12/2012 15:06 lukas2abc#8
Thanks!!!!!
So for mobs it is always ground movement? Even if they follow me?

I am from austria ;)
10/12/2012 15:29 zeteris#9
Quote:
Originally Posted by lukas2abc View Post
Thanks!!!!!
So for mobs it is always ground movement? Even if they follow me?

I am from austria ;)
Yeah only players can use sky movement.