 They are a loose collection of hundreds of spells inscribed on the walls of royal pyramids during the Old Kingdom, intended to magically provide pharaohs with the means to join the company of the gods in the afterlife.The spells appear in differing arrangements and combinations, and few of them appear in all of the pyramids.At the end of the Old Kingdom a new body of funerary spells, which included material from the Pyramid Texts, began appearing in tombs, inscribed primarily on coffins.