Pseudo Randomization

I have a stimulus list with many different factors (for example, condition), and I would like to randomize the list such that a maximum of three stimuli that have the same condition can be displayed in a row. Is this possible using the tag or rule function in Superlab 5?

Thank you!