55 lines
893 B
Plaintext
55 lines
893 B
Plaintext
|
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();
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|