Code:
<if condition="is_member_of($userinfo, XX) AND $show['buddy']">
<img src="$stylevar[imgdir_misc]/star_1.gif" alt="Premium User & Buddy" />
<else />
<if condition="is_member_of($userinfo, XX)"><img src="$stylevar[imgdir_misc]/star_2.gif" alt="Premium User" /></if>
<if condition="$show['buddy']"><img src="$stylevar[imgdir_misc]/star_3.gif" alt="Buddy" /></if>
</if>