I see some forums are taken over by spam bots, posting links to viruses, cheap viagra and crap porn. The forum is quite high in google and has a high pagerank, would this help ones positioning on google if one was to spam ones link on the forum?
Well that entirely depends what you're trying to put into Google to find your site. Generally though, spam is very unattractive and would make a miserable SEO technique.
The only reason forums that have been taken over by spam bots rank high in Google and have high page ranks, is because the bots launch so many attacks on the forum and give it so much false traffic that isn't detected by Google, hence the high PR.
Having your site or forum associated with these kind of forums can most likely hurt your SEO and PR, as those forums are considered "dirty", being stuffed with viruses, warez, malware and other malicious code.
Yeah i doubt having spam bots will help you. Now Bots like google, they don't post anything nor register useless accounts. I think those are the bots you need to look for if you want your site to be on google.