If you always attach positive emotions to the things you want, and never attach negative emotions to the things you don't, then that which you desire most will invariably come your way.
One is happy as a result of one's own efforts once one knows the necessary ingredients of happiness: simple tastes, a certain degree of courage, self denial to a point, love of work, and above all, a clear conscience.