Encounter work continues

Encounter work continues.  Created or modified UTCs for randomized human pirates, sirines & Marty the Imp.  Created random encounter tables for "Foothills" & "Beaches".
This commit is contained in:
Jaysyn904
2022-11-16 08:10:27 -05:00
parent 52d4691361
commit 557591bc93
76 changed files with 9608 additions and 240 deletions

View File

@@ -197,3 +197,59 @@ void RndFighterArmor(object oNPC)
oItem = GetNextItemInInventory(OBJECT_SELF);
}
}
void RndPirateArmor(object oNPC)
{
//Randomizes Armor
int nResult = d6(1);
int nStackSize = 1; // Create 1 items;
string sItem;
if (nResult == 1)
{
sItem = "RA_ALTSL_PIRATE1";
}
else if(nResult == 2)
{
sItem = "RA_ALTSL_PIRATE2";
}
else if(nResult == 3)
{
sItem = "RA_ALTSL_PIRATE3";
}
else if(nResult == 4)
{
sItem = "RA_ALTSL_PIRATE4";
}
else if(nResult == 5)
{
sItem = "RA_ALTSL_PIRATE5";
}
else if(nResult == 6)
{
sItem = "RA_ALTSL_PIRATE5";
}
else
sItem = "RA_ALTSL_PIRATE6";
CreateItemOnObject(sItem, oNPC, nStackSize);
// Loop the object's inventory and equip the first
object oItem = GetFirstItemInInventory(oNPC);
while(GetIsObjectValid(oItem))
{
// Check if armor, of course
if(GetBaseItemType(oItem) == BASE_ITEM_ARMOR)
{
// Equip it and stop the script
DelayCommand(0.1f, ActionEquipItem(oItem, INVENTORY_SLOT_CHEST));
DelayCommand(0.2f, SetDroppableFlag(oItem, FALSE));
return;
}
oItem = GetNextItemInInventory(oNPC);
}
}