void OnStart()
{
SetEntityPlayerInteractCallback("Note_Test04", "function", true);
AddUseItemCallback("", "Rusty Key", "door_1", "KeyOnDoor", true);
AddUseItemCallback("", "Mail hall key", "leveldoor_1", "KeyOnDoor2", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door_1", false, true);
RemoveItem("Rusty Key");
PlaySoundAtEntity("", "unlock_door.snt", "door_1", 0.0f, true);
}
void OnEnter()
{
AddEntityCollideCallback("Player", "doorslam_1_area", "func_slam", true, 1);
AddEntityCollideCallback("servant_grunt_1", "servant_grunt_1_remove", "RemoveMonster", true, 1);
}
void OnLeave()
{
}
void function(string&in item)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_10", 4, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_11", 2, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_12", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_13", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_14", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_15", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_16", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_17", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_18", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_19", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_20", 4, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_21", 2, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_22", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_23", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_24", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_25", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_26", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_27", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_28", 0, "");
}
void RemoveMonster(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", false);
}
void KeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("leveldoor_1", false, true);
RemoveItem("Main hall key");
PlaySoundAtEntity("", "unlock_door.snt", "leveldoor_1", 0.0f, true);
}