flags.load_mayor_yard = true;
open_window=false;
SetActivLeaf("mayor_yard");
Spirit_Particles()
AddObjForCur()
Window={
0,252,
55,252,
55,445,
0,445
}

Door={
95,324,
196,324,
196,490,
95,490
}

Box_Yard={
412,472,
592,472,
592,601,
412,601
}

Holl_Yard={
676,438,
851,438,
851,480,
676,480
}

Barn={
860,301,
1018,301,
1018,430,
860,430
}

Back_ToGate={
0,612,
1024,612,
1024,768,
0,768
}

CreatePolygon(15,4,"Door")
CreatePolygon(8,4,"Barn")
addstaticobjecttogame( 25,"mayor_yard" ,822,0,"",0,0,207,254);
addstaticobjecttogame( 6,"mayor_yard" ,-10,0,"",207,0,196,187);
SetHotPoint(25,205,163)
SetHotPoint(6,-100,4)




addactivobjecttogame(10,"mayor_yard",0  ,256,"","",0,0,782,0,49,179); --закрытое окно без щита

CreatePolygon(12,4,"Back_ToGate")


 
addstaticobjecttogame( 1,"mayor_yard" ,508,509,"",831,0,29,36); --замок
addstaticobjecttogame( 2,"mayor_yard" ,407,419,"",592,0,190,102); --ящик открыт
speciale_action(2,2);

CreatePolygon(3,4,"Box_Yard")



addactivobjecttogame( 5,"mayor_yard" ,616,398,"","",0,0,403,0,189,99); --яма
speciale_action(2,5);


CreatePolygon(7,4,"Holl_Yard")



CreatePolygon(9,4,"Window")
speciale_action(2,9)

addstaticobjecttogame(11,"mayor_yard15",0  ,0  ,""); --бг

Block_Show_Cur(false);

addfade(501,0);
boxopen=false


if flags.box_loc6_openM then
   boxopen=true;
    speciale_action(2,2);
    speciale_action(10,2)   
end;

if flags.mayor_wind and not open_window then
 speciale_action(2,9);  
  open_window=true
  speciale_action(2,10);
end;

if flags.jama then
  speciale_action(2,5);
  ActivateObject(7,false);

end;

if flags.jashik then
  if not boxopen then
  boxopen=true
  speciale_action(2,2);
  end;
  ActivateObject(3,false);
end;

