#include "NW_I0_GENERIC" void main() { object oPC = GetLastPerceived(); object oTarget = GetObjectByTag("WET_WALLDOOR"); if (!GetIsPC(oPC)) return; //if(!GetIsObjectValid(oPC)) return; if (GetLastPerceptionSeen()) { int iType = GetAppearanceType(oPC); if(iType == (APPEARANCE_TYPE_COW)) { ActionSpeakString("Hmmm, A Cow........"); SetLocked(oTarget, FALSE); AssignCommand(oTarget, ActionOpenDoor(oTarget)); } else { ActionSpeakString("Guards, Close the door!"); AssignCommand(oTarget, ActionCloseDoor(oTarget)); SetLocked(oTarget, TRUE); } } }