Stephen Maturin switches from opium to coca leaves about halfway through the Master and Commander series (around 1800). Ensuring a steady supply of the leaves becomes a recurring theme as is his sharing of their wonders with the various scientific personalities he comes across.