Monster Fade Packet

08/27/2009 00:51 Belth#1
What is the mob fade packet for 5018+? I have:

offset 0 - int16 (size)
offset 2 - int16 (type)
offset 4 - int32 (Monster UID)
offset 8 - byte (Unknown)
offset 12 - byte (Unknown)
offset 16 - int16 (Unknown)

What are the unknown values?
08/27/2009 01:01 rubenz#2
log it :D
08/27/2009 01:14 InfamousNoone#3
type is?
08/27/2009 01:15 Belth#4
Provide me with the method to do so. The methods I know are:

1) Hooking - Not an option because I'm only competent in C#.
2) Proxy - When I tried, I couldn't figure out the encryption.

Edit: Type: 1017
08/27/2009 13:14 _tao4229_#5
Drop me a PM and when I get back late tonight ~12-14 hours from now I'll hook you up with my C++ hook-based proxy.
(Source included)
You don't really have to do much to log packets except check their type and dump them to the console, lol.

If its a 0x3F9(1017 in dec) packet, it look's like it's probably a status flag (I really don't know, lol), can you provide examples of the unknown fields, or all they all 0?
08/27/2009 15:37 Belth#6
Offset 8 = 1

Offset 12 = 26

Offset 16/17 = 2080

So far the members that I've added to MSN just don't reply but sure, PM sent.
08/28/2009 17:12 Belth#7
Still looking for this.
08/28/2009 17:22 _tao4229_#8
Offset 8 = The number of 'updates' in the packet. 0x3F9 packets can carry multiple updates :p. In this case it's one.
Offset 12 = The type of 'update.' Can be HP, MP, Stamina, Mesh, in this case it's Status flag. This is how the client determines what to update.
Offset 16 = The value of the update. In this case it's the statusflag of the entity.
it's 0x800 | 0x20. So the status flag for 'fade' is 0x800 and 0x20 is the 'dead' status.
08/28/2009 21:20 Belth#9
Quote:
Originally Posted by _tao4229_ View Post
Offset 8 = The number of 'updates' in the packet. 0x3F9 packets can carry multiple updates :p. In this case it's one.
Offset 12 = The type of 'update.' Can be HP, MP, Stamina, Mesh, in this case it's Status flag. This is how the client determines what to update.
Offset 16 = The value of the update. In this case it's the statusflag of the entity.
it's 0x800 | 0x20. So the status flag for 'fade' is 0x800 and 0x20 is the 'dead' status.
Great, so by your explanation I have the correct info... why aren't the monsters fading when I send it? My packet looks like this:

data[0] = ToByte(size);
data[1] = ToByte(size, 8);
data[2] = ToByte(type);
data[3] = ToByte(type, 8);
data[4] = ToByte(UID);
data[5] = ToByte(UID, 8);
data[6] = ToByte(UID, 16);
data[7] = ToByte(UID, 24);
data[8] = ToByte(1); // number of updates
data[12] = ToByte(26); // type of update
data[16] = ToByte(2080); // status flag
data[17] = ToByte(2080, 8);
Seal(ref data); // appends TQ seal
08/28/2009 22:05 _tao4229_#10
Last value should be a dword (4 bytes), and the structure could have changed, what patch is this?
08/28/2009 22:17 Belth#11
Patch 5095. That structure is from 5117, I used it because I can't get 5118+.
08/29/2009 00:23 InfamousNoone#12
your wrong what causes the monster to fade fyi
it's a combination of both a 3fe and 3e9 (3fe and 2721 now I believe)
08/29/2009 00:58 kinshi88#13
Quote:
Originally Posted by InfamousNoone View Post
your wrong what causes the monster to fade fyi
it's a combination of both a 3fe and 3e9 (3fe and 2721 now I believe)
Well, I know you're right about 0x3FE.
But 0x3E9, the Create Character packet? I just don't see it..
08/29/2009 01:24 Belth#14
I assume he made a typo with the "e" and f" (should be 0x3F9, the packet type that I initially asked about). I understand that fading is a combination of the attack packet (where offset 20 = 14, usually this would be the attack type) and this 0x3F9 packet. I'm not sure where the 2721 comes in though.
08/29/2009 04:28 InfamousNoone#15
Code:
            RequestAttackPacket Death = RequestAttackPacket.Create();
            // ...

            if (Attacker != null)
            {
                if (Attacker.EntityFlag == EntityFlag.Player)
                {
                    AttackerClient = Attacker.Owner as GameClient;
                    MAttackDataPtr = (MAttackData*)AttackerClient.MAttackDataPtr.Addr;
                }
                Death.UID = Attacker.UID;
                Death.AtkType = AttackID.Death;
            }

// ... 
// ...
// ...

                if (Opponent.Dead)
                {
                    Death.OpponentUID = Opponent.UID;
                    Death.X = Opponent.X;
                    Death.Y = Opponent.Y;
                    Death.KilledMonster = (Opponent.EntityFlag == EntityFlag.Monster || Opponent.EntityFlag == EntityFlag.Pet);

                    if (AttackerClient != null)
                        SucessfulPlayerKill(AttackerClient, &Death);
                    SendRangePacket.Add(Opponent, Kernel.ViewDistance, 0, Kernel.ToBytes(&Death), null);
                }
Code:
        /// <summary>
        /// Notifies that this instance of a monster has died.
        /// </summary>
        /// <param name="Killer">The entity that killed this monster.</param>
        /// <param name="Delay">The delay time before sending the remove entity packet.</param>
        public virtual void Kill(IBaseEntity Killer, TIME Delay)
        {
            Entity.Dead = true;
            CanRevive = TIME.Now.AddMinutes(1);
            RemoveTime = Delay;
            Status = MonsterStatus.Respawning;
            if (Spawn.Monsters.Length > 1)
            {   
                Spawn.MembersDead++;
                if (Spawn.MembersDead == Spawn.Monsters.Length)
                {
                    Spawn.ReviveGeneration();
                }
            }

            this.Entity.Spawn.StatusFlag |= StatusFlag.Ghost;
            this.Entity.Spawn.StatusFlag |= StatusFlag.BlackName;
            UpdatePacket update = UpdatePacket.Create(); 
            update.ID = UpdateID.RaiseFlag;
            update.BigValue = this.Entity.StatusFlag;
            update.UID = this.Entity.UID;
            SendRangePacket.Add(this.Entity, Kernel.ViewDistance, 0, Kernel.ToBytes(&update), null);

            DataPacket remove = DataPacket.Create();
            remove.UID = this.Entity.UID;
            remove.ID = DataID.RemoveEntity;
            SendRangePacket.Add(this.Entity, Kernel.ViewDistance, 0, Kernel.ToBytes(&remove), ConquerCallbackKernel.CommonRemoveScreen, Delay);

            if ((Settings & MonsterSettings.DropItemsOnDeath) == MonsterSettings.DropItemsOnDeath)
            {
                if (Killer.EntityFlag == EntityFlag.Player)
                    DropRewards(Killer.UID);
                else
                    DropRewards(0);
            }
            Spawn.CollectionOwner.DMap.SetMonsterOnTile(this.Entity.X, this.Entity.Y, false);
        }
when the remove entity packet gets sent the monster will fade and burn. the 'ghost/dead' status makes it unclickable (the monster).