void main()
{
  object oPC = GetLastUsedBy();
  int iChoice = FALSE;
  object oObject = GetFirstObjectInArea(OBJECT_SELF);
  object oWaypoint = GetObjectByTag("WP_spawndone");
    while (oObject != OBJECT_INVALID)
    {
        if (GetIsEncounterCreature(oObject))
            iChoice = TRUE;
        oObject = GetNextObjectInArea(OBJECT_SELF);
    }
  if (iChoice)
  {SpeakString("Some spawns are left in the area ... you can't go on while they are alive !");}
  else
  {AssignCommand(oPC,ActionJumpToObject(oWaypoint));}
}