flags.load_parom = true;
flags.firstugon=false
Spirit_Particles()
SetActivLeaf("parom");


To_Parom={
0,114,
449,114,
449,334,
0,334
}

To_Jones={
911,154,
1024,154,
1024,256,
911,256
}

To_JMP={
431,549,
1024,549,
1024,768,
431,768
}

Winch={
673,274,
725,274,
725,406,
673,406
}


CreatePolygon(29,4,"To_JMP")
CreatePolygon(30,4,"To_Parom")
AddObjForCur()
add_animation(121)
add_animation_frame(121,"paketik",452,93,0  ,0  ,70,35,0.1);
add_animation_frame(121,"paketik",452,93,70 ,0  ,70,35,0.1);
add_animation_frame(121,"paketik",452,93,140,0  ,70,35,0.1);
add_animation_frame(121,"paketik",452,93,0  ,0  ,70,35,0.1);
StartAnimation(121)


add_animation(122)
add_animation_frame(122,"seagul",1024,40,0 ,0 ,81,86,0.1);
add_animation_frame(122,"seagul",1024,40,81,0 ,81,86,0.1);
add_animation_frame(122,"seagul",1024,40,162,0 ,81,86,0.1);
add_animation_frame(122,"seagul",1024,40,0 ,0 ,81,86,0.1);
StartAnimation(122)
flySeagul = {"InstantiationOfLine", 2, 1024, 40, -100, -90, 5, false};
StartTravel(122,1,nil,nil,flySeagul);



addactivobjecttogame(321,"parom_big1",-63,2,"","",0,0,0,0,672,482); --мост 

speciale_action(2,321)

--NewObj("fomka","fomka",2000,2000,"118"); --фомка
if obj.fomka~=nil and not obj.fomka.is_collapsed then
  addactivobjecttogame(16,"parom_big2",516 ,439 ,"","",0,0,780,860,196,109);
end;

addstaticobjecttogame(16,"parom_big2",0  ,17 ,"",484,0,236,271); --фургон 
addstaticobjecttogame( 1,"parom_big1" ,679,337,"",671,482,345,431); --машина
speciale_action(2,1);



addstaticobjecttogame( 2,"parom_big2" ,55 ,542,"",315,768,405,216); --цепи
speciale_action(2,2);
addstaticobjecttogame( 3,"parom_big2" ,81 ,390,"",0,768,315,214); --цепи на ящике
speciale_action(10,3)
addstaticobjecttogame( 4,"parom_big2" ,71 ,418,"",0,0,484,225); --открытый ящик
speciale_action(2,4);

addactivobjecttogame( 6,"parom_big2" ,40 ,411,"","",0,0,0,225,347,247); --ящик

addactivobjecttogame( 8,"parom_big2" ,801,220,"","",0,0,720,0,223,234); --разорван мост 


addstaticobjecttogame(10,"parom_big2",804,219,"",780,622,239,238); --целый мост
speciale_action(2,10);

addstaticobjecttogame(15,"parom14",0  ,96 ,""); --трап + паром



addstaticobjecttogame(17,"parom_big2",33 ,147,"",0,622,780,146); --ослабленный канат
addstaticobjecttogame(18,"parom_big2",0  ,140,"",0,472,813,150); --натянутый канат
speciale_action(2,18);




add_animation(123)
add_animation_frame(123,"seagul_s",1024,40,0 ,0 ,40,42,0.1);
add_animation_frame(123,"seagul_s",1024,40,40,0 ,40,42,0.1);
add_animation_frame(123,"seagul_s",1024,40,80,0 ,40,42,0.1);
add_animation_frame(123,"seagul_s",1024,40,0 ,0 ,40,42,0.1);
StartAnimation(123)
flysSeagul = {"InstantiationOfLine", 2, 0, 100, 1200, 0, 6, false};


addstaticobjecttogame(19,"parom_big2",624,276,"",841,284,89,90); --ручка лебедки
speciale_action(2,19);
CreatePolygon(20,4,"Winch")
if not flags.hidden_chulan then
    speciale_action(2,20)
end;


addactivobjecttogame(24,"parom_big2",570,283,"","",0,0,841,234,109,50); --колесо


CreatePolygon(26,4,"To_Jones")


addstaticobjecttogame(320,"parom_big1",0,49 ,"",0,482,671,439); --мост эффект 
speciale_action(2,320)
addstaticobjecttogame(41,"clouds",0  ,-50  ,"");
MoveTexture(41,0.00007,0.0)

addstaticobjecttogame(28,"parom15",0  ,0  ,""); --бг

  
addfade(501,0);

StartTimer(1211,40)

StartTimer(1221,15)

prichbox=false;

if flags.is_spirit then
speciale_action(2,15)

  speciale_action(2,18);
speciale_action(2,121)
speciale_action(2,320)
speciale_action(10,320)
SetAlfa(320,1,0.1,3)
alfa320="down"
speciale_action(2,321)
end;

if flags.prichal_box then
    if not prichbox then
      prichbox=true;
      speciale_action(2,6);
      speciale_action(2,5);
      speciale_action(2,4);
      speciale_action(2,3);
      speciale_action(2,2);
    end;  
end;

if flags.prichbox_openM then
if not prichbox then
    prichbox=true;
    speciale_action(2,6);

    speciale_action(2,4);
    speciale_action(2,3);
    speciale_action(2,2);
    ActivateObject(4,true)
end;    
end;





if flags.lebedka then
  speciale_action(2,19);
  speciale_action(2,17);
  speciale_action(2,18);
  ActivateObject(20,false);
end;

if flags.mostik then
  speciale_action(2,10);

  speciale_action(2,8);

end;

if flags.koleso then
  speciale_action(2,24);
end;

    if flags.ugon_auto  and not flags.firstugon then
      flags.firstugon=true
      speciale_action(2,16);
      speciale_action(2,1);
    end;        