Tweaked several areas, mobs, and added

the codi ai to some mobs.
This commit is contained in:
EpicValor
2023-09-28 23:01:25 -05:00
parent 9c38ad9c6b
commit f6270c3cb8
310 changed files with 31410 additions and 4885 deletions

View File

@@ -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));
}