void main() { object oObject = GetFirstObjectInArea(); int nPCinArea=FALSE; location lLoc; while (GetIsObjectValid(oObject)) { if (GetIsPC(oObject)) { nPCinArea = TRUE; } oObject=GetNextObjectInArea(); } if (nPCinArea != TRUE) { // create the boulder if it's not there if (!GetIsObjectValid(GetObjectByTag("jw_boulder"))) { lLoc=GetLocation(GetObjectByTag("jw_boulder_wp")); CreateObject(OBJECT_TYPE_PLACEABLE,"jw_boulder",lLoc); } // destory the portal if it is there if (GetIsObjectValid(GetObjectByTag("jw_drow_portal"))) { DestroyObject(GetObjectByTag("jw_drow_portal")); SoundObjectSetVolume(GetObjectByTag("jw_portal_sound"),0); } // destory the drow if they are there if (GetIsObjectValid(GetObjectByTag("jw_drow_mage"))) { DestroyObject(GetObjectByTag("jw_drow_mage")); } // destory the drow if they are there if (GetIsObjectValid(GetObjectByTag("jw_drow_rogue"))) { DestroyObject(GetObjectByTag("jw_drow_rogue")); } // destory the drow if they are there if (GetIsObjectValid(GetObjectByTag("jw_drow_militia"))) { DestroyObject(GetObjectByTag("jw_drow_militia")); } object oItem; oObject = GetFirstObjectInArea(); while (GetIsObjectValid(oObject) == TRUE) { //if (GetIsEncounterCreature(oObject)&&!GetPlotFlag(oObject)) // { // DestroyObject(oObject); // } // if (GetObjectType(oObject)==OBJECT_TYPE_TRIGGER) // { // SetEncounterActive(TRUE,oObject); // } if (GetTag(oObject) == "BodyBag") { oItem = GetFirstItemInInventory(oObject); while (GetIsObjectValid(oItem) == TRUE) { DestroyObject(oItem); oItem=GetNextItemInInventory(oObject); } SetPlotFlag(oObject,FALSE); DestroyObject(oObject); } oObject=GetNextObjectInArea(); } } }