
loadresource("data\\9\\3\\0002.png","prichal_box2",2);
loadresource("data\\9\\3\\0008.jpg","prichal_box8",8);
loadresource("data\\9\\3\\prichal_box_b1.png","prichal_box_b1",7);
loadresource("data\\9\\3\\prichal_box_b2.png","prichal_box_b2",7);
loadresource("data\\9\\3\\0003.jpg","prichal_box9",9);

loadresource("data\\inventary\\ploski.png","ploski",6);


ForK1={
0,0,
0,1,
1,1,
1,0
}
AddObjForCur()
CreatePolygon(2,4,"ForK1")

addstaticobjecttogame( 3,"prichal_box2",108,32 ,""); --рамка
CloseBtnX,CloseBtnY=Coords(3)


SetFlagsForSatButtons()

CloseWidth=34
CloseHeight=34

CreateCloseBtn(CloseBtnX,CloseBtnY);


addstaticobjecttogame( 15,"prichal_box_b2",196,102,"",658,0,83,47);
AddParticleToObject(15,"kap",196,162);
MoveEmiter("kap",196,162);
speciale_action(2,15)
addstaticobjecttogame( 10,"prichal_box_b1",116,106,"",0,0,540,440);
 addactivobjecttogame( 11,"prichal_box_b2",118,106,"","",0,0,0,0,527,431);
 addactivobjecttogame( 12,"prichal_box_b1",118,106,"","",0,0,0,440,525,404);
kapaem=false
set_pixel_check(11,false)
set_pixel_check(12,false)
Set_Anim_Cur(11,4)
Set_Anim_Cur(12,4)
speciale_action(2,11)
speciale_action(2,10)


addstaticobjecttogame( 9,"prichal_box9",118,42 ,"",0,0,540,495); --в цепях

NewObj("plosk","ploski",2000,2000,"117"); --плоски
NewObj("ploks","prichal_box_b2",253,215,"117",527,0,131,68); --плоски

addstaticobjecttogame( 6,"prichal_box8",118,42 ,"",0,0,540,495); --открыт

if flags.prichbox_open then
speciale_action(2,9)
speciale_action(2,12)
Set_Anim_Cur(obj.ploks.id,4)
end;

if flags.chain1 and not flags.prichbox_open then
    speciale_action(2,12)
    speciale_action(2,11)
end;
      AddParticleToObject(3,"kislota",196,212);
      MoveEmiter("kislota",196,212);
      
      AddParticleToObject(2,"kislota1",586,152);
      MoveEmiter("kislota1",586,152);
 
  if s_obj>0 then
  AddObjToMouse(s_obj)
  s_obj=0
  end;

WaitRender();