void main()
{

object oEO = GetExitingObject();

string sEO = GetTag(oEO);

if ((sEO == "GiantFire") | (sEO == "Firebat")) return;

// Define who's leaving the lava
object oPC = GetFirstPC();
object oHench1 = GetHenchman(oPC, 1);
object oHench2 = GetHenchman(oPC, 2);
object oFamiliar = GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oPC);
object oSummoned = GetAssociate(ASSOCIATE_TYPE_SUMMONED, oPC);
object oDominated = GetAssociate(ASSOCIATE_TYPE_DOMINATED, oPC);
object oAnimal = GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oPC);

// Set up global variables
int nInLavaPC;
int nInLavaHench1;
int nInLavaHench2;
int nInLavaFamiliar;
int nInLavaSummoned;
int nInLavaDominated;
int nInLavaAnimal;

// Now set variables for anyone entering the lava
if (oEO == oPC) SetLocalInt(oPC, "InLavaPC", 0);
if (oEO == oHench1) SetLocalInt(oPC, "InLavaHench1", 0);
if (oEO == oHench2) SetLocalInt(oPC, "InLavaHench2", 0);
if (oEO == oFamiliar) SetLocalInt(oPC, "InLavaFamiliar", 0);
if (oEO == oSummoned) SetLocalInt(oPC, "InLavaSummoned", 0);
if (oEO == oDominated) SetLocalInt(oPC, "InLavaDominated", 0);
if (oEO == oAnimal) SetLocalInt(oPC, "InLavaAnimal", 0);

return;

}

