Tweaked several areas, mobs, and added
the codi ai to some mobs.
This commit is contained in:
@@ -1,24 +1,30 @@
|
||||
void main()
|
||||
void MakeItemsDroppable(object oNPC)
|
||||
{
|
||||
object oNPC = OBJECT_SELF;
|
||||
object oItem = GetFirstItemInInventory(oNPC);
|
||||
|
||||
while (GetIsObjectValid(oItem))
|
||||
oItem = GetNextItemInInventory(oNPC);
|
||||
{
|
||||
if (GetDroppableFlag(oItem) == FALSE)
|
||||
{
|
||||
SetLocalInt(oItem, "notdroppable", 1);
|
||||
}
|
||||
|
||||
{
|
||||
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);
|
||||
if (GetLocalInt(oItem, "notdroppable") == TRUE)
|
||||
{
|
||||
// 20% chance to drop item from inventory not already set as droppable
|
||||
if (d100() <= 20)
|
||||
{
|
||||
SetDroppableFlag(oItem, TRUE);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
oItem = GetNextItemInInventory(oNPC);
|
||||
}
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
object oNPC = OBJECT_SELF;
|
||||
DelayCommand(0.2, MakeItemsDroppable(oNPC));
|
||||
}
|
||||
|
Reference in New Issue
Block a user