SetActivLeaf("obryv");
Spirit_Particles()
AddObjForCur()
Back={
500,570,
1024,570,
1024,768,
500,768
}

CreatePolygon(13,4,"Back")
NewObj("kyst","kist",2000,2000,"99"); --кисть
NewObj("kyts","obryv",50,480,"99",854,559,69,67); --кисть
set_pixel_check(obj.kyts.id,false);

addstaticobjecttogame( 2,"obryv",87 ,304,"",789,559,65,73); --ручка лебедки1
speciale_action(2,2);
addstaticobjecttogame( 3,"obryv",86 ,360,"",723,559,66,76); --ручка лебедки2
speciale_action(2,3);
addstaticobjecttogame( 4,"obryv",185,279,"",923,833,73,152); --цепь поднята
speciale_action(2,4);
addstaticobjecttogame( 5,"obryv",246,414,"",854,626,14,22); --ключ
speciale_action(2,5);
addstaticobjecttogame( 6,"obryv",185,279,"",923,421,84,412); --цепь опущена
addactivobjecttogame( 7,"obryv",97 ,233,"","",0,0,538,421,185,266); --лебедка

addstaticobjecttogame( 8,"obryv07",166,0  ,""); --дым
speciale_action(2,8);
speciale_action(10,8)
addstaticobjecttogame( 9,"obryv",316,169,"",0,0,597,421); --дорога
speciale_action(2,9);
speciale_action(10,9)
addstaticobjecttogame(10,"obryv",375,91 ,"",723,421,200,138); --дорога продолжение
speciale_action(2,10);
speciale_action(10,10)

addstaticobjecttogame(51,"obryvfx",400  ,200  ,"");
speciale_action(10,51)
addstaticobjecttogame(52,"obryvfx",260 ,0 ,"");
speciale_action(10,52)
speciale_action(2,51)
speciale_action(2,52)

addstaticobjecttogame(11,"obryv",229,0  ,"",0,421,538,265); --зарево
speciale_action(2,11);
addstaticobjecttogame(41,"clouds2",0  ,-50  ,"");
MoveTexture(41,0.00007,0.0)
addstaticobjecttogame(42,"clouds2",0  ,0  ,"");
MoveTexture(42,-0.00007,0.0)
addstaticobjecttogame(12,"obryv11",0  ,0  ,""); --бг




addfade(501,0);

thirdkey=false

if flags.key3vverhM then
    thirdkey=true
    speciale_action(2,2);
    speciale_action(2,4);
    speciale_action(2,6);
    if flags.kluchik_vidim and not obj.keytri.is_collapsed then
        speciale_action(2,5);
    end;
end;



if flags.lebedkatwo then
  if not thirdkey then    
  speciale_action(2,2);
  speciale_action(2,4);
  speciale_action(2,6);
  end;
  ActivateObject(7,false);
end;

if flags.is_spirit and flags.firsthell then

  playeffect("footway")
  for i = 8, 11, 1 do
    speciale_action(2,i);
  end;
  ActivateObject(11,true);
        speciale_action(2,51,true,5)
        speciale_action(2,52,true,5)
end;

if flags.is_spirit and not flags.firsthell then
  flags.firsthell=true;
  Block_Show_Cur(true);
  StartTimer(27,0.7);
end;

