#include "quest_inc"
void main()
{

object oPC = GetEnteringObject();

DeleteLocalObject(oPC, "StoredArea");

if (!GetIsPC(oPC)) return;

int i = 1;
object oHench = GetHenchman(oPC, i);
string sDB = CharacterDB(oPC);
while (oHench != OBJECT_INVALID)
{
    if (GetLocalInt(oHench, "LostQuest") == TRUE && GetCampaignString(sDB, "QUEST_TEMPLATE") == "lost" && GetIsQuestComplete(oPC) == FALSE && GetIsQuestFailed(oPC) == FALSE)
    {
        AddRandomQuestJournalEntry(oPC, 2);
        DestroyObject(oHench);
        break;
    }
    i++;
    oHench = GetHenchman(oPC, i);
}

DestroyEscortedClient(oPC);
ExploreAreaForPlayer(GetArea(oPC), oPC);

}