[HELP]Drop effect for + items/dbs/meteors

07/10/2022 14:52 Vortex87#1
Hello. Can someone tell me please how can I make the effect to be seen ONLY for the character that found the item? At the moment, every character that`s in the map can see the effect if someone finds something. Source 5065.
Thank you!

ushort X = 0;
ushort Y = 0;
X = DI2.Loc.X;
Y = DI2.Loc.Y;
var DI = new Game.MapEffect();
DI.DropTime = DateTime.Now;
DI.LastDrop = DateTime.Now;
DI.Loc = new Game.Location();
DI.Loc.Map = Char.Loc.Map;
DI.Info = new Game.MEffect();
DI.Info.ID = 17;
DI.UID = (uint)Program.Rnd.Next(900000, 999999);
DI.Info.UID = DI.UID;
DI.Loc.X = X;
DI.Loc.Y = Y;
DI.Drop();
DropsEffects.Add(DI.UID, DI);
07/12/2022 22:25 thisismyaccountokay#2
I don't know what source you're using but you need to look at the function which is broadcasting the packet. You should have one which only sends it to the player, one to broadcast it to the area at x y, one to broadcast it to the map, and one to broadcast to all players. Pick the appropriate one.

Also you shouldn't generate a random number for the trap in-case you want to delete it - you need to actually track that unique id in your DI.UID field.
07/14/2022 19:17 Vortex87#3
Tyvm !