How do you not get random events in runescape?

They come, as their name indicates, randomly. It is often stated (and may be true, but I am not sure about it myself) that they are more likely to appear when you are doing repetitive activities, or not doing nothing at all, since one of the purposes of random events is to make life harder for bots.