void main() { object oNPC = OBJECT_SELF; object oItem = GetFirstItemInInventory(oNPC); while (GetIsObjectValid(oItem)) { if (GetDroppableFlag(oItem) == TRUE) { //items already set as droppable should stay that way SetLocalInt (oItem, "droppable", 1); GetNextItemInInventory(oNPC); } if (GetLocalInt(oItem, "droppable") == FALSE) { //20% chance to drop item inventory not already set as droppable int bDroppable=d100()>80; SetDroppableFlag(oItem, bDroppable); oItem = GetNextItemInInventory(oNPC); } } }