void OnStart()
{
AddUseItemCallBack("", "key_study_1", "castle_7", "UsedKeyOnDoor2", true);
AddUseItemCallback("", "KeyOH", "castle_4", "UsedKeyOnDoor1", true);
AddEntityCollideCallback("Player", "ScriptArea_1", "Scare1", true, 1);
}
void UsedKeyOnDoor1(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("castle_4", false, true);
    SetSwingDoorLocked("castle_6", false, true);
    PlaySoundAtEntity("", "unlock_door", "castle_4", 0, false);
    RemoveItem("KeyOH");
}
void UsedKeyOnDoor2(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("castle_7", false, true);
    PlaySoundAtEntity("", "unlock_door", "castle_7", 0, false);
    RemoveItem("Key_class_1");
}
void Scare1(string &in asParent, string &in asChild, int alState)
{
    StartPlayerLookAt("cabinet_nice1", 2.0f, 2.0f, "StopLookAtCabinet");
    GiveSanityDamage(5.0f, true);
    SetEntityActive("corpse_male_1", true);
    AddPropImpulse("corpse_male_1", -20, 0, 0, "world");
}
void StopLookAtCabinet()
{
    StopPlayerLookAt();
}