Store them separately from other jewelry in a protective pouch or box enclosure to protect them from scratches. Don't get them wet. Pearls are usually strung on silk cord that is knotted between each bead. As the silk is organic, it will break down after 10 to 25 years and so would have to be restrung by a reputable jeweler or someone who specializes in this type of work. They usually charge by the inch as this is a very time consuming process.
Opals are very soft stones.
You can rinse them in water, and as they will absorb some of the water, some of the bright colors will be restored. To make the colors last longer, soak overnight in mineral oil. For other stones , rinse in a sink or basin using a solution of soapy warm water. However, organic materials and soft stones such as opals, amber, pearls, and peridot can be damaged by the use of soaps. Do not boil your stones .