from4asiki=false
SetActivLeaf("john_house");
Spirit_Particles()
AddObjForCur()

ExitP={
0,136,
82,136,
82,670,
0,670
}

LukJ={
588,564,
836,564,
836,616,
588,616
}
CloseCab={
846,350,
1020,350,
1020,602,
846,602
}

Chulan={
698,153,
850,153,
850,512,
698,512
}

KuClock={
341,131,
413,131,
413,225,
341,225
}

CreatePolygon(14,4,"ExitP")



addstaticobjecttogame(1211,"net1",314,0,"",0 ,0,516,286);
addstaticobjecttogame(1212,"net1",314,0,"",0 ,286,516,286);
addstaticobjecttogame(1213,"net1",314,0,"",0 ,572,516,286);
speciale_action(2,1212)
speciale_action(2,1213)


addstaticobjecttogame(1221,"net2",0,73,"",472,0,236,215);
addstaticobjecttogame(12225,"net2",0,73,"",236,0,236,215);
addstaticobjecttogame(1223,"net2",0,73,"",0,0 ,236,215);
speciale_action(2,12225)
speciale_action(2,1223)

addstaticobjecttogame(1231,"net3",887,47,"",135,0,135,330);
addstaticobjecttogame(1232,"net3",887,47,"",270,0 ,135,330);
addstaticobjecttogame(1233,"net3",887,47,"",0,0,135,330);

speciale_action(2,1232)
speciale_action(2,1233)

speciale_action(2,1211,true,2.7)
speciale_action(2,1221,true,2.7)
speciale_action(2,1231,true,2.7)

speciale_action(2,1212,true,3)
speciale_action(2,12225,true,3)
speciale_action(2,1232,true,3)  
    
addstaticobjecttogame( 3,"johnes_all",587,511,"",0,0,279,117); --открытый люк
speciale_action(2,3);

CreatePolygon(5,4,"LukJ")
NewObj("rukja","luk_john10",5000,5000,"290"); --ручка для инв
if not obj.rukja.is_collapsed then
    addactivobjecttogame(21,"johnes_all",110,549,"","",0,0,39,160,134,65);
end;


addstaticobjecttogame( 6,"johnes_all",878,506,"",0,160,28,54); --вентиль в шкафчике
speciale_action(2,6);
addstaticobjecttogame( 7,"johnes_all",810,437,"",279,0,104,160); --открытый шкафчик
speciale_action(2,7);

CreatePolygon(8,4,"CloseCab")



CreatePolygon(10,4,"Chulan")


addstaticobjecttogame(11,"johnes_all",366,140,"",28,160,14,19); --кукушка
speciale_action(2,11);
CreatePolygon(12,4,"KuClock")

addstaticobjecttogame(13,"john_house13",0  ,0  ,""); --бг

addfade(501,0);


shkafchik=false
lukp=false

--if not flags.is_spirit then
if flags.shkaf_jonesM then
    shkafchik=true;
    speciale_action(2,7);
    speciale_action(10,7);    
end;



if flags.luk_jonesM and not flags.luk_john then
    lukp=true;
      speciale_action(2,5);
      speciale_action(2,3);
      ActivateObject(3,true); 
end;


if flags.shesternja then
  speciale_action(2,11);
end;



if flags.kukufka then
  ActivateObject(11,false);
  ActivateObject(12,false);
end;



if flags.comodo then
  if not shkafchik then   
      shkafchik=true;
      speciale_action(2,7);
  end;
  ActivateObject(8,false);
end;



if flags.luk_john then
  ActivateObject(3,false)
  ActivateObject(5,false)
  if not lukp then
  lukp=true;
  speciale_action(2,5);
  speciale_action(2,3);
  end;
end;



