Aantioch_Infernum/_module/nss/random_drop.nss

20 lines
483 B
Plaintext
Raw Normal View History

2023-08-08 16:22:17 -04:00
void main()
{
object oNPC = OBJECT_SELF;
object oItem = GetFirstItemInInventory(oNPC);
while (GetIsObjectValid(oItem))
2023-08-08 16:22:17 -04: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
SetDroppableFlag(oItem, bDroppable);
2023-08-08 16:22:17 -04:00
oItem = GetNextItemInInventory(oNPC);
}
2023-08-08 16:22:17 -04:00
}