void main() { { object oObject = GetFirstObjectInArea(); object oPC=GetEnteringObject(); 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)) { SetLocalInt(GetObjectByTag("jw_acid_platet"),"trapped",TRUE); SetLocalInt(GetObjectByTag("jw_fire_platet"),"trapped",TRUE); SetLocalInt(GetObjectByTag("jw_spike_platet"),"trapped",TRUE); //if (GetEncounterActive(GetObjectByTag("jw_min_golem_control"))) { nIdx=0; oObject=GetObjectByTag("jw_wrong_barrel",nIdx); while (GetIsObjectValid(oObject)) { SetPlotFlag(oObject,FALSE); DestroyObject(oObject); nIdx++; oObject=GetObjectByTag("jw_wrong_barrel",nIdx); } nIdx=0; oObject=GetObjectByTag("jw_wrong_wp",nIdx); while (GetIsObjectValid(oObject)) { CreateObject(OBJECT_TYPE_PLACEABLE,"jw_wrong_barrel",GetLocation(oObject)); nIdx++; oObject=GetObjectByTag("jw_wrong_wp",nIdx); } if (!GetIsObjectValid(GetObjectByTag("jw_smash_barrel"))) { CreateObject(OBJECT_TYPE_PLACEABLE,"jw_smash_barrel",GetLocation(GetObjectByTag("jw_barrel_wp"))); } } } } }