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); }