Most of the known functions of alkaloids are related to protection. For example, aporphine alkaloid liriodenine produced by the tulip tree protects it from parasitic mushrooms. In addition, the presence of alkaloids in the plant prevents insects and chordate animals from eating it. However, some animals are adapted to alkaloids and even use them in their own metabolism.  Such alkaloid-related substances as serotonin , dopamine and histamine are important neurotransmitters in animals. Alkaloids are also known to regulate plant growth.  One example of an organism that uses alkaloids for protection is the Utetheisa ornatrix , more commonly known as the ornate moth. Pyrrolizidine alkaloids render these larvae and adult moths unpalatable to many of their natural enemies like coccinelid beetles, green lacewings, insectivorous hemiptera and insectivorous bats.  Another example of alkaloids being utilized occurs in the poison hemlock moth ( Agonopterix alstroemeriana). This moth feeds on its highly toxic and alkaloid-rich host plant poison hemlock ( Conium maculatum ) during its larval stage. A. asltroemeriana may benefit twofold from the toxicity of the naturally-occurring alkaloids, both through the unpalatability of the species to predators and through the ability of A. alstroemeriana to recognize Conium maculatum as the correct location for oviposition. 
Doses of caffeine equivalent to the amount normally found in standard servings of tea, coffee and carbonated soft drinks appear to have no diuretic action.  However, acute ingestion of caffeine in large doses (at least 250–300 mg, equivalent to the amount found in 2–3 cups of coffee or 5–8 cups of tea) results in a short-term stimulation of urine output in individuals who have been deprived of caffeine for a period of days or weeks.  This increase is due to both a diuresis (increase in water excretion) and a natriuresis (increase in saline excretion); it is mediated via proximal tubular adenosine receptor blockade.  The acute increase in urinary output may increase the risk of dehydration . However, chronic users of caffeine develop a tolerance to this effect, and experience no increase in urinary output.