Battledale_PRC8/_module/nss/jw_br_home_exit.nss

55 lines
893 B
Plaintext
Raw Permalink Normal View History

void main()
{
{
object oObject = GetFirstObjectInArea();
int nPCinArea=FALSE;
location lLoc;
while (GetIsObjectValid(oObject))
{
if (GetIsPC(oObject))
{
nPCinArea = TRUE;
}
oObject=GetNextObjectInArea();
}
if (nPCinArea != TRUE)
{
/// set the trapdoors to reset
SetLocalInt(GetObjectByTag("jw_new_cellar"),"Reset",1);
object oItem;
oObject = GetFirstObjectInArea();
while (GetIsObjectValid(oObject) == TRUE)
{
if (GetTag(oObject) == "BodyBag")
{
oItem = GetFirstItemInInventory(oObject);
while (GetIsObjectValid(oItem) == TRUE)
{
DestroyObject(oItem);
oItem=GetNextItemInInventory(oObject);
}
SetPlotFlag(oObject,FALSE);
DestroyObject(oObject);
}
oObject=GetNextObjectInArea();
}
}
}
}