Yes it can. As Grave Digger told you all you have to do is check what chatstring a certain player wrote. In your case -allrandom, then you set a random variable between like 1-10 (depending on how many heroes you have) Then if it's 1, create unit for player, if it's 2, create another unit for player.
I hope you understand.