Rary's Mnemonic Enhancer

(Player's Handbook v.3.5, p. 268)

Transmutation
Level: Wizard 4, Sha'ir 4, Savant 4 (Arcane), Spell 4,
Components: V, S, M, AF,
Casting Time: 10 minutes
Range: Personal
Target: You
Duration: Instantaneous

Casting this spell allows you to prepare additional spells or retain spells recently cast.
Pick one of these two versions when the spell is cast.
Prepare: You prepare up to three additional levels of spells (such as three 1st-level spells, a 2nd- and a 1st-level spell, or a 3rd-level spell).
A cantrip counts as 1/2 level for this purpose.
You prepare and cast these spells normally.
Retain: You retain any spell of 3rd level or lower that you had cast up to 1 round before you started casting the mnemonic enhancer.
This restores the previously cast spell to your mind.
In either event, the spell or spells prepared or retained fade after 24 hours (if not cast).
Material Component: A piece of string, and ink consisting of squid secretion with black dragon's blood.
Focus: An ivory plaque of at least 50 gp value.