Aantioch_Infernum/_module/nss/random_drop2.nss

25 lines
571 B
Plaintext
Raw Normal View History

2023-08-31 20:34:52 -05:00
void main()
{
object oNPC = OBJECT_SELF;
object oItem = GetFirstItemInInventory(oNPC);
while (GetIsObjectValid(oItem))
oItem = GetNextItemInInventory(oNPC);
{
if (GetDroppableFlag(oItem) == FALSE)
{
SetLocalInt (oItem, "notdroppable", 1);
}
if (GetLocalInt(oItem, "notdroppable") == 1)
{
//20% chance to drop item inventory not already set as droppable
//object oDrop = GetLocalObject(oItem, "notdroppable");
int bDroppable = d100()>50;
SetDroppableFlag(oItem, bDroppable);
}
}
}