Added Skullkeep's dynamic loot generation system

Added Skullkeep's PRC8 compatible dynamic loot generation system.  Full compile.  Updated release archive.
This commit is contained in:
Jaysyn904
2024-11-08 18:54:51 -05:00
parent 2cb81ae698
commit 0dbb628b75
211 changed files with 40616 additions and 800 deletions

View File

@@ -0,0 +1,39 @@
#include "prc_inc_racial"
void main()
{
object oPC = GetLastClosedBy();
object oItem;
object oCorpse = GetLocalObject(OBJECT_SELF, "oHostBody");
object oBlood = GetLocalObject(OBJECT_SELF, "oBlood");
object oBones;
location lLoc = GetLocation(oCorpse);
int iCount;
AssignCommand(oPC, ClearAllActions());
oItem = GetFirstItemInInventory(OBJECT_SELF);
while (GetIsObjectValid(oItem))
{
++iCount;
oItem = GetNextItemInInventory(OBJECT_SELF);
}
if (iCount==0){
AssignCommand(oCorpse, SetIsDestroyable(TRUE, FALSE, FALSE));
DestroyObject(oBlood);
DestroyObject(oCorpse);
if ((MyPRCGetRacialType(oCorpse) != RACIAL_TYPE_CONSTRUCT) &&
(MyPRCGetRacialType(oCorpse) != RACIAL_TYPE_ELEMENTAL)&&
(MyPRCGetRacialType(oCorpse) != RACIAL_TYPE_DRAGON)&&
(MyPRCGetRacialType(oCorpse) != RACIAL_TYPE_ANIMAL))
{
oBones = CreateObject(OBJECT_TYPE_PLACEABLE,
"plc_bones",
lLoc, FALSE);
ExecuteScript("sd_destroyself", oBones);
}
DestroyObject(OBJECT_SELF, 0.2f);
}
}