Aantioch_Infernum/_module/nss/random_drop_yy.nss
EpicValor 44323d16c6 Added full CEP3 & Complete Rural/City tileset
Sarum City has been rebuilt with the new tileset, and all the exterior areas were combined into one. New areas added outside the city. They're called Environs.  Some additional areas redone to tie into the new areas. Environs are mostly decorated, but lack NPCs in some.  Those will be added later.
2023-11-17 01:59:49 -06:00

31 lines
667 B
Plaintext

void MakeItemsDroppable(object oNPC)
{
object oItem = GetFirstItemInInventory(oNPC);
while (GetIsObjectValid(oItem))
{
if (GetDroppableFlag(oItem) == FALSE)
{
SetLocalInt(oItem, "notdroppable", 1);
}
if (GetLocalInt(oItem, "notdroppable") == TRUE)
{
// 40% chance to drop item from inventory not already set as droppable
if (d100() <= 40)
{
SetDroppableFlag(oItem, TRUE);
}
}
oItem = GetNextItemInInventory(oNPC);
}
}
void main()
{
object oNPC = OBJECT_SELF;
DelayCommand(0.2, MakeItemsDroppable(oNPC));
}