public void RiderDropItem(Entity KillerName) { if (Owner.Inventory.Count > 0) { var array = Owner.Inventory.Objects.ToArray(); uint count = (uint)(array.Length / 4); byte startfrom = (byte)Kernel.Random.Next((int)count); for (int c = 0; c < count; c++) { int index = c + startfrom; if (array[index] != null) { { if (array[index].Lock == 0) { if (!array[index].Bound && !array[index].Inscribed && array[index].ID != 723753) { if (!array[index].Suspicious && array[index].ID != 723755 && array[index].ID != 723767 && array[index].ID != 723772) { if (Kernel.Rate(140) && array[index].ID != 723774 && array[index].ID != 723776) { var Item = array[index]; if (Item.ID == 3005398 || Item.ID == 3007232 || Item.ID == 3005400 || Item.ID == 3005401 || Item.ID == 3007230 || Item.ID == 3007231 || Item.ID == 3007115 || Item.ID == 3007116 || Item.ID == 3007117 || Item.ID == 3005399 || Item.ID == 3005397 || Item.ID == 3007114 || Item.ID == 3007113 || Item.ID == 3005396 || Item.ID == 3005395 || Item.ID == 3005366 || Item.ID == 3005365 || Item.ID == 193305 || Item.ID == 193445 || Item.ID == 193525 || Item.ID == 193515 || Item.ID == 3005945 || Item.ID == 193495 || Item.ID == 193505 || Item.ID == 720828) return; if (Item.ID >= 3007561 && Item.ID <= 3007568) return; if (Item.ID >= 729960 && Item.ID <= 729970) return; if (Item.ID == 723467 || Item.ID == 729304 || Item.ID == 725065 || Item.ID == 725066 || Item.ID == 2100065 || Item.ID == 1003010 || Item.ID == 1004010 || Item.ID == 3006393 || Item.ID == 711504 || Item.ID == 1100003 || Item.ID == 1100006 || Item.ID == 1100009) return; Item.Lock = 0; var infos = Database.ConquerItemInformation.BaseInformations[(uint)Item.ID]; ushort x = X, y = Y; Game.Map Map = Kernel.Maps[MapID]; if (Map.SelectCoordonates(ref x, ref y)) { Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true); Owner.Inventory.Remove(Item, Enums.ItemUse.Remove); floorItem.Item = Item; floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item; floorItem.ItemID = (uint)Item.ID; floorItem.MapID = MapID; floorItem.MapObjType = Game.MapObjectType.Item; floorItem.X = x; floorItem.Y = y; floorItem.Type = Network.GamePackets.FloorItem.Drop; floorItem.OnFloor = Time32.Now; floorItem.ItemColor = floorItem.Item.Color; floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; while (Map.Npcs.ContainsKey(floorItem.UID)) floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; Map.AddFloorItem(floorItem); Owner.SendScreenSpawn(floorItem, true); } } } } } } } } } }
public void Die(Entity killer)
Over:
if (Kernel.Rate(50)) { RiderDropItem(Killer); }