void main() { object oDoor = GetObjectByTag("DoorToEndOfAll"); object oPentMarker = GetObjectByTag("PentMarker"); object oPent = GetNearestObjectByTag("Mikatos"); if (GetIsObjectValid(oPent) == TRUE) { SetLocalInt(GetModule(), "FreezePent", GetLocalInt(GetModule(), "FreezePent") +1); DestroyObject (oPent); AssignCommand(oPentMarker, PlaySound("as_na_steamlong1")); AssignCommand(oPentMarker, PlaySound("as_hr_x2ghost8")); if(GetLocalInt(GetModule(),"FreezePent") == 5) { DelayCommand(2.0, SetLocked (oDoor, FALSE)); DelayCommand(5.0, ActionOpenDoor(oDoor)); DelayCommand(5.0, AssignCommand(oPentMarker, ActionSpeakString ("Unlocking Access Door."))); DelayCommand(5.0, AssignCommand(oPentMarker, PlaySound("as_cv_shopmetal2"))); DelayCommand(5.5, AssignCommand(oPentMarker, PlaySound("as_hr_x2chnratl1"))); } } DelayCommand(6.0, ExecuteScript("killself", OBJECT_SELF)); }