loadresource("data\\19\\5\\pult.png","pult",2);
loadresource("data\\19\\5\\0013.jpg","pult_6",6);

AddObjForCur()
addstaticobjecttogame(3,"pult",122,23,"",0,0,584,573); --рамка
CloseBtnX,CloseBtnY=Coords(3)
SetFlagsForSatButtons()

CloseWidth=34
CloseHeight=34
CreateCloseBtn(CloseBtnX,CloseBtnY);


addstaticobjecttogame(4,"pult",336,264,"",793,0,64,51); --лампочка горит1
speciale_action(2,4);
addstaticobjecttogame(5,"pult",468,270,"",793,0,64,51); --лампочка горит2
speciale_action(2,5);
addstaticobjecttogame(6,"pult",578,274,"",793,0,64,51); --лампочка горит3
speciale_action(2,6);

addstaticobjecttogame(7,"pult",333,352,"",584,0,105,56); --ключ повернут1
speciale_action(2,7);
addstaticobjecttogame(8,"pult",468,352,"",584,0,105,56); --ключ повернут2
speciale_action(2,8);
addstaticobjecttogame(9,"pult",579,355,"",584,0,105,56); --ключ повернут3
speciale_action(2,9);

addstaticobjecttogame(10,"pult",335,347,"",689,0,104,59); --ключ вставлен1
speciale_action(2,10);
addstaticobjecttogame(11,"pult",468,347,"",689,0,104,59); --ключ вставлен2
speciale_action(2,11);
addstaticobjecttogame(12,"pult",579,350,"",689,0,104,59); --ключ вставлен3
speciale_action(2,12);

Hole1={
328,350,
328+64,350,
328+64,350+58,
328,350+58
}

Hole2={
463,349,
463+63,349,
463+63,349+60,
463,349+60
}

Hole3={
576,353,
576+63,353,
576+63,353+60,
576,353+60
}

CreatePolygon(13,4,"Hole1")
CreatePolygon(14,4,"Hole2")
CreatePolygon(15,4,"Hole3")


Set_Anim_Cur(13,4)
Set_Anim_Cur(14,4)
Set_Anim_Cur(15,4)

if flags.first_key_complete then
  Set_Anim_Cur(13,3) 
  speciale_action(2,13);
  speciale_action(2,4);
  speciale_action(2,7);
end;

if flags.second_key_complete then
  Set_Anim_Cur(14,3) 
  speciale_action(2,14);
  speciale_action(2,5);
  speciale_action(2,8);
end;

if flags.third_key_complete then
  Set_Anim_Cur(15,3) 
  speciale_action(2,15);
  speciale_action(2,6);
  speciale_action(2,9);
end;

addstaticobjecttogame(13,"pult_6",127,30,"",0,0,570,560); --бг

  if s_obj>0 then
  AddObjToMouse(s_obj)
  s_obj=0
  end;

WaitRender();