Aantioch_Infernum/_module/nss/wetland_guard.nss
Jaysyn904 22947ad4b6 Initial Upload
Initial Upload
2023-08-08 16:22:17 -04:00

32 lines
590 B
Plaintext

#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);
}
}
}