Quote:
Originally Posted by teroareboss1
I use in my 5017 to remove trap:
Code:
stream.CreateMapItem(UID, 17, X, Y, MsgMapItem.GroundItemAction.DropTrap, 0)
I don't remember the reason for 17(for id).. this source is old.
DropTrap = 12
The packet is: [Only registered and activated users can see links. Click Here To Register...]
The cast is: [Only registered and activated users can see links. Click Here To Register...]
The UID is: 994454+ [Only registered and activated users can see links. Click Here To Register...]
|
ok, so i tried what you have proposed but still no luck.
here is how i sent the message to cast trap:
Code:
await user.Client.SendAsync(new MsgMapItem
{
Identity = 994464,
MapX = user.X,
MapY = user.Y,
Itemtype = type,
Mode = DropType.LayTrap,
Color = 1
});
Here is how i sent the message to drop trap
Code:
await user.Client.SendAsync(new MsgMapItem
{
Identity = 994464,
MapX = user.X,
MapY = user.Y,
Itemtype = 17,
Mode = DropType.DropTrap,
Color = 0
});
here is how the message is encoded:
Code:
public override byte[] Encode()
{
using var writer = new PacketWriter();
writer.Write((ushort)PacketType.MsgMapItem);
writer.Write(Identity); // 4
writer.Write(Itemtype); // 8
writer.Write(MapX); // 12
writer.Write(MapY); // 14
writer.Write((ushort)Mode); // 16
writer.Write((ushort)Color); // 18
return writer.ToArray();
}
i tested on the bomb trap (itemType 23), on stigma effect (itemType 22) and on itemtype 17
the trap appears below the character but it never disappears until i go off screen or until default period finishes (in case of item types 22 and 17)
can you spot where the issue is? :/