void main() { object oObject=GetEnteringObject(); if (GetTag(oObject)=="jw_zen_magard") { AssignCommand(oObject,ActionForceMoveToObject(GetWaypointByTag("PLACE_jw_zen_magard"))); AssignCommand(oObject,ActionDoCommand(SetFacingPoint(GetPosition(GetObjectByTag("jw_magdr_in"))))); } int nPCinArea=FALSE; if (GetLocalInt(OBJECT_SELF,"nDoneset")!=2) { SetLocalInt(GetObjectByTag("jw_zen_t2_platet"),"trapped",TRUE); SetLocalInt(GetObjectByTag("jw_zen_t1_platet"),"trapped",TRUE); SetLocalInt(OBJECT_SELF,"nDoneset",2); } int nIdx; object oPC=GetEnteringObject(); if (GetIsDM(oPC)) { return; } if (!GetIsPC(oPC)) { return; } if (GetAssociate(ASSOCIATE_TYPE_FAMILIAR,oPC)==oPC) { return; } oObject=GetFirstObjectInArea(); while (GetIsObjectValid(oObject)) { if (GetIsPC(oObject)&&oObject!=oPC) { nPCinArea = TRUE; return; } 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) { } }