void main()
{

object oObject = GetFirstObjectInArea();

object oPC=GetEnteringObject();
object oShadow;


if (!GetIsPC(oPC))
{
return;
}

if (GetIsDM(oPC))
{
 return;
}


int nPCinArea=FALSE;
location lLoc;
int nIdx;
//object oGolem;

oObject=GetFirstObjectInArea();

while (GetIsObjectValid(oObject))
  {
    if (GetIsPC(oObject)&&oObject!=oPC)
      {
      nPCinArea = TRUE;
      }
    oObject=GetNextObjectInArea();
  }

  ///  this returns true if there are any PCs in the area that are NOT
  /// the object that just entered the area

if (nPCinArea != TRUE)
  {
    oShadow=GetObjectByTag("jw_cvamp2_shad");
    if (GetIsObjectValid(oShadow))
    {
     DestroyObject(oShadow);
    }

    if (GetEncounterActive(GetObjectByTag("jw_cg_vamp2")))

    {
      SignalEvent(GetObjectByTag("jw_cvamp2_shad_coffin"),EventUserDefined(70));
    }

  }


}