oid OnStart()
{
//START MOVE SHELF EVENT1
SetEntityConnectionStateChangeCallback("lever", "func_shelf");
//END MOVE SHELF EVENT1
//START SERVANT BRUTE EVENT1
AddEntityCollideCallback("Player", "monsterspawn_1", "MonsterFunction", true, 1);
AddEntityCollideCallback("servant_brute_1", "servant_grunt_1_remove", "RemoveMonster", true, 1);
//END SERVANT BRUTE EVENT1
//START CROWBAR EVENT1
AddUseItemCallback("", "crowbar_1", "mansion_1", "CrowbarOnDoor", true);
AddEntityCollideCallback("crowbar_joint_1", "door_script_1", "crowbarfunc", true, 1);
//END CROWBAR EVENT1
}
void crowbar(string &in asItem, string &in asEntity)
{
SetEntityActive("crowbar_joint_1", true);
}
void crowbarfunc(string &in asParent, string &in asChild, int alState)
{
SetPropHealth("mansion_1", 0.0f);
SetEntityActive("crowbar_joint_1", false);
SetEntityActive("crowbar_1", true);
}
//START MOVE SHELF EVENT1
void func_shelf(string &in asEntity, int alState)
{
if (alState == 1)
{
SetMoveObjectState("shelf",1.0f);
PlaySoundAtEntity("", "quest_completed.snt", "shelf_move_1", 0, false);
return;
}
}
//END MOVE SHELF EVENT1
//START SERVANT BRUTE EVENT1
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brute_1", true);
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_4", 2, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_7", 2, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_10", 2, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_12", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_13", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_14", 0, "");
}
void RemoveMonster(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brute_1", false);
}
//END SERVANT BRUTE EVENT1
//START CROWBAR EVENT1
void CrowbarOnDoor(string &in item, string &in door)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("crowbar_1");
}
//END CROWBAR EVENT1
void OnEnter()
{
}
void OnLeave()
{
}