Lynne, thanks for the help. This is the code I ended up with and it works:
Code:
<if condition="($bbuserinfo['userid'] == 0) AND ($forum['forumid'] == XX) AND ($post['postcount'] % $vboptions['maxposts'] == 1)">
<center>
Code Goes here
</center>
</if>
It shows a banner to guest users in a particular forum after the first post of every page of a thread.
edit:
Whoops! I didn't fully understand what Lynne was trying to say. I just realized that 3.8 has ad templates now and I only had to cover the ad conditional with the guest and forumid code and then insert the ad into the template that is already supplied. Not sure which version is better but both work for what I needed to do.