SetActivLeaf("electro");
Spirit_Particles()

ForIskri={
0,0,
1,0,
1,1,
0,1
}

Console={
13,114,
85,114,
85,226,
13,226
}

Wire={
18,359,
78,359,
78,475,
18,475
}

Vent={
400,25,
497,25,
497,102,
400,102
}

Net={
844,73,
956,73,
956,165,
844,165
}

Hidden={
787,346,
1024,346,
1024,576,
787,576
}

Back={
601,198,
733,198,
733,466,
601,466
}

El_Chair={
238,292,
466,292,
466,624,
238,624
}


AddObjForCur()
addstaticobjecttogame(70,"electrog",953 ,800,"",0,0,15,28);
addstaticobjecttogame(71,"electrog",71 ,800,"",15,0,15,28);
addstaticobjecttogame(872,"electrog",71 ,800,"",15,0,15,28);

e_gad1 = {"InstantiationOfLine", 2,520,373,520,20, 20, true};
e_gad2 = {"InstantiationOfLine", 2, 67,369 ,214,25, 30, true};
e_gad3 = {"InstantiationOfLine", 2,1050,339,902, 163, 15, true};

StartTravel(71,1,nil,nil,e_gad2);
StartTimer(5219999,2)
StartTimer(5239999,3)
speciale_action(2,70)
speciale_action(2,872)


addstaticobjecttogame(16,"electro_room",1,166,"",485,0,492,529); --майкл
speciale_action(2,16);
addstaticobjecttogame( 1,"electro_room",1  ,140,"",0,0,485,530); --эл стул
addstaticobjecttogame( 202,"electro_room",41,375 ,"",875,534,30,86); --кусок провода
speciale_action(2,202);
addstaticobjecttogame( 2,"electro_room",41,375 ,"",766,529,28,97); --кусок провода
speciale_action(2,2);
CreatePolygon(910,4,"ForIskri")
CreatePolygon(3,4,"Net")
speciale_action(2,3)
NewObj("racha","ru4ka",2000,2000,"295"); --ручка
NewObj("racah","electro_room",571,578,"295",652,529,114,37); --ручка


CreatePolygon(6,4,"Hidden")


CreatePolygon(7,4,"Back")

addstaticobjecttogame( 8,"electro_room",57 ,281,"",807,529,14,33); --рычаг опущен
speciale_action(2,8);
addstaticobjecttogame( 9,"electro_room",58 ,240,"",794,529,13,33); --рычаг поднят
addstaticobjecttogame(10,"electro_room",28 ,128,"",821,529,46,16); --индикаторы
speciale_action(2,10);
addstaticobjecttogame(11,"electro_room",391,369,"",485,529,167,144); --табурка
if not flags.tabura_stoit then
  speciale_action(2,11);
end;

CreatePolygon(13,4,"Vent")

CreatePolygon(14,4,"Wire")


CreatePolygon(15,4,"Console")
addstaticobjecttogame(12,"electro_12",0  ,0  ,""); --бг

addfade(501,0);



if flags.hidden_stulja then
  ActivateObject(6,false);
end;



if flags.ventil_turma then
  speciale_action(2,13);
end;

if not flags.soed_provod then
  CreatePolygon(909,4,"ForIskri")
end;

if flags.provoda_inelectro then
  speciale_action(2,202);
end


if flags.soed_provod then
  speciale_action(2,14);
  speciale_action(2,2);
  speciale_action(2,202);
  speciale_action(2,3)

end;

if flags.shitok_set then
  ActivateObject(3,false);
  ActivateObject(15,true);
  speciale_action(2,10);
end;


if flags.pult then
  ActivateObject(9,true);
  ActivateObject(15,false);
end;

if flags.stul_is_ready and not flags.is_spirit then
  speciale_action(2,9);
  speciale_action(2,8);
  ActivateObject(1,true)

end;


if flags.is_spirit then
speciale_action(2,1)
speciale_action(2,16);
end;

if flags.hidden_stulja_two then
  ActivateObject(6,false);
end;