if flags.steklo then
  speciale_action(2,4)
  speciale_action(2,1)
  setCursor(obj.kist_4_10.id,4);
end


local a,b = 24,59
local path =
{
  {x = 370-a, y = 50 -b};
  {x = 369-a, y = 423-b};
  {x = 668-a, y = 422-b};
  {x = 666-a, y = 54 -b};
}
SetObjectPosition(2,path[1].x,path[1].y)
function gameinput (sender,obj_id,attachedID)
  MiniInterfaceHandler(sender, obj_id,attachedID);
  sendersProcessing(sender,obj_id,attachedID)
  if wrongItemWarning(sender, obj_id, attachedID, "almaz_9_14") then
    return
  end
  if sender==16 then
    if obj_id>=11 and obj_id<=20 then
      speciale_action(2,obj_id,true,0.9)
      speciale_action(2,obj_id+1,true,1)
    return;end;
    if obj_id==21 then
    StopAllEffects()
      speciale_action(2,obj_id,true,0.9)
      StartTimer(30,1,"frame2")
    return;end;
  return;end;
  if sender==1 then
    if obj_id == 4 then
      if obj.almaz_9_14 and attachedID == obj.almaz_9_14.id then
        removeFromMouse()
        UnStoreObj(obj.almaz_9_14.id)
        Block_Show_Cur(true)
        speciale_action(2,11,true,1)
  --      SetAlfa(2,0,1,1,"frame1")
        flags.steklo = true
        playeffect("brilliant",true)
      else
        CreatePlashechka("546","he")
      end
    end
    if obj_id == obj.kist_4_10.id then
      if flags.steklo then
        StoreObj(obj.kist_4_10.id);
        set_visible_object(3,false)
        neighbors.VorotaMuzeyaSteklo.lock = true
      end
    end;
  end
  if sender == 26 then
    --CloseSatelite()
  end
end


function frame1()
  local path1 = {"InstantiationOfLine",2,path[1].x,path[1].y,path[2].x,path[2].y,2,false}
  local path2 = {"InstantiationOfLine",2,path[2].x,path[2].y,path[3].x,path[3].y,1.4,false}
  local path3 = {"InstantiationOfLine",2,path[3].x,path[3].y,path[4].x,path[4].y,2,false}
  StartTravel(2,3,nil,"sparks_4_0",path1,path2,path3,"frame2")
end

function frame2()
  Block_Show_Cur(false)
  
  setCursor(obj.kist_4_10.id,4);
  speciale_action(2,4,true,0.5)
  speciale_action(2,1,true,0.5)
end