Kokalipa was the king of Campara who could not endure heat. So he stayed in the shades and the luxuries of the palace. While enjoying his kingdom, a monk came to his garden and was invited by the king, thereupon he gave the monk food and provisions. The king then asked if the monk’s Dharma be as happy as his. The monk then replied that all a wise man would see is poison, and then explained to the king about the three poisons. The king, whom was spiritually inclined, took the monk as his guru and requested for instructions. He was initiated into Cakrasamvara.
However, unable to renounce his previous mode of life, the sound of the cuckoo birds in the asmra trees distracted him, so he asked for instructions to be free of distractions. His guru then gave him instructions of which he meditated on and attained siddhi in six months. After that, he worked for the benefit of living beings and at the end, he went to the realms of the Dakas in this very body.