After clarifying that resurrection is an incorruptible restoration of ourselves, good or bad, Alma give some advice to his wayward son, Coriantion, in Alma 41:14.
- be merciful to others;
- deal justly;
- judge righteously; and
- do good continually.
So, you want a nice afterlife? Alma's advice is to learn to spread niceness around during life and it will come back to you in the hereafter!