Bugfixing pass

Bugfixing pass.  Spawn swapovers.  Broom!
This commit is contained in:
Jaysyn904
2021-09-25 14:13:00 -04:00
parent a6cab9f387
commit 6195a6cf23
94 changed files with 23051 additions and 3712 deletions

View File

@@ -10,11 +10,18 @@
void RndBanditArmor(object oNPC)
{
// Makes sure any original armor isn't dropped as loot.
SetDroppableFlag(GetItemInSlot(INVENTORY_SLOT_CHEST, OBJECT_SELF), 0);
//Randomizes Armor
//Randomizes Armor
int nResult = d6(1);
int nStackSize = 1; // Create 1 items;
object oArmor;
string sItem;
if (nResult == 1)
{
sItem = "NW_AARCL001";
@@ -29,15 +36,30 @@ void RndBanditArmor(object oNPC)
}
else if(nResult ==4)
{
sItem = "NW_AARCL010";
sItem = "NW_AARCL008";
}
else if(nResult == 5)
{
sItem = "NW_AARCL004";
sItem = "NW_AARCL002";
}
else
sItem = "NW_AARCL008";
DelayCommand(1.0f, ActionEquipItem(CreateItemOnObject(sItem), INVENTORY_SLOT_CHEST));
}
CreateItemOnObject(sItem, OBJECT_SELF, nStackSize);
// Loop the object's inventory and equip the first
object oItem = GetFirstItemInInventory(OBJECT_SELF);
while(GetIsObjectValid(oItem))
{
// Check if armor, of course
if(GetBaseItemType(oItem) == BASE_ITEM_ARMOR)
{
// Equip it and stop the script
DelayCommand(1.0f, ActionEquipItem(oItem, INVENTORY_SLOT_CHEST));
return;
}
oItem = GetNextItemInInventory(OBJECT_SELF);
}
}