Tweaked several areas, mobs, and added
the codi ai to some mobs.
This commit is contained in:
@@ -1,25 +1,30 @@
|
||||
//RANDOM DROP
|
||||
// Ginge McDaggart
|
||||
void MakeItemsDroppable(object oNPC)
|
||||
{
|
||||
object oItem = GetFirstItemInInventory(oNPC);
|
||||
|
||||
while (GetIsObjectValid(oItem))
|
||||
{
|
||||
if (GetDroppableFlag(oItem) == FALSE)
|
||||
{
|
||||
SetLocalInt(oItem, "notdroppable", 1);
|
||||
}
|
||||
|
||||
if (GetLocalInt(oItem, "notdroppable") == TRUE)
|
||||
{
|
||||
// 10% 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;
|
||||
object oItem = GetFirstItemInInventory(oNPC);
|
||||
|
||||
while (GetIsObjectValid(oItem))
|
||||
{
|
||||
if(GetDroppableFlag(oItem)== TRUE)
|
||||
{
|
||||
SetDroppableFlag(oItem, TRUE);
|
||||
}
|
||||
|
||||
if(GetDroppableFlag(oItem)== FALSE)
|
||||
{
|
||||
int bDroppable=d100()>55;
|
||||
SetDroppableFlag(oItem, bDroppable);
|
||||
}
|
||||
|
||||
oItem = GetNextItemInInventory(oNPC);
|
||||
|
||||
|
||||
}
|
||||
DelayCommand(0.2, MakeItemsDroppable(oNPC));
|
||||
}
|
||||
|
Reference in New Issue
Block a user