PRC8/nwn/nwnprc/trunk/scripts/prc_ai_sum_death.nss
Jaysyn904 dd67019103 2025/08/05 Update
Added Regenerate Ring spell.
Added Regenerate Circle spell.
Added Leonal's Roar spell.
Added Summon Nature's Ally I-IX spells.
Added Lion of Talisid PrC.
Added Favored of the Companions Feat.
Corrected Regenerate Serious Wounds level.
Corrected Regenerate Critical Wounds level.
Removed Baelnorn class and added Baelnorn template.
2025-08-05 18:58:54 -04:00

29 lines
670 B
Plaintext

void DestroyAllInventory(object oCreature)
{
object oItem = GetFirstItemInInventory(oCreature);
while (GetIsObjectValid(oItem))
{
DestroyObject(oItem);
oItem = GetNextItemInInventory(oCreature);
}
}
void main()
{
object oDead = OBJECT_SELF;
object oMaster = GetMaster(oDead);
// Only destroy inventory if this creature is summoned
if (GetIsObjectValid(oMaster))
{
int nType = GetAssociateType(oDead);
if (nType == ASSOCIATE_TYPE_SUMMONED)
{
DestroyAllInventory(oDead);
}
}
ExecuteScript("prc_npc_death", OBJECT_SELF);
ExecuteScript("nw_ch_ac7", OBJECT_SELF);
}