2023-08-08 16:22:17 -04:00
|
|
|
void main()
|
|
|
|
{
|
|
|
|
object oNPC = OBJECT_SELF;
|
|
|
|
object oItem = GetFirstItemInInventory(oNPC);
|
|
|
|
|
2023-08-29 19:31:56 -05:00
|
|
|
while (GetIsObjectValid(oItem))
|
2023-08-08 16:22:17 -04:00
|
|
|
{
|
2023-08-29 19:31:56 -05:00
|
|
|
// if item set to droppable it will 100% drop
|
|
|
|
if (GetDroppableFlag(oItem)== TRUE)
|
|
|
|
{
|
|
|
|
SetDroppableFlag(oItem, TRUE);
|
|
|
|
}
|
|
|
|
//10% chance of item in inventory being droppable if not marked droppable
|
|
|
|
int bDroppable=d100()>90;
|
2023-08-08 16:22:17 -04:00
|
|
|
|
2023-08-29 19:31:56 -05:00
|
|
|
SetDroppableFlag(oItem, bDroppable);
|
2023-08-08 16:22:17 -04:00
|
|
|
oItem = GetNextItemInInventory(oNPC);
|
2023-08-29 19:31:56 -05:00
|
|
|
}
|
2023-08-08 16:22:17 -04:00
|
|
|
}
|