script fixes, additions to merchant
This commit is contained in:
24
_module/nss/random_drop2.nss
Normal file
24
_module/nss/random_drop2.nss
Normal file
@@ -0,0 +1,24 @@
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user