Since some people don't understand how pattern detection works, I am going to try to explain it as simple as possible.
Patterns are created with bots when they do the same thing over and over. Lets say for instance we are woodcutting. You start cutting the tree. When the tree is no longer available, the script switches to the next tree. And it keeps doing this. Over and over and over. This creates a pattern that we are switching the tree right when it falls down.
Now how can we combat this? Well the first and most simple answer to come up would be "lets sleep for a random time AFTER the tree no longer exists." So now instead of instantly switching to the next tree, we sleep for a random time, lets say 1-5 seconds. So every time we cut a tree, we now sleep for 1-5 seconds (also keep in mind, there is no true randomization of numbers in coding). This still creates a pattern. Right when the tree falls down, the player sleeps for the same allotted time (1-5 seconds), and then continues cutting.
Another option would be to create a random time based on the users RSN. Get a hash of their rsn, and create a random time to sleep for each person. Is this effective? No, your character will still be sleeping for an allotted time after an event happens. I have tested this method extensively over multiple accounts over multiple months and have had the same results as having no sleep at all.
We can understand how a pattern is created better by looking at it like a heat map. So if there is no sleep, we get a red zone every time a tree falls, because it triggers the next event (cutting another tree). If we sleep for a random time, we still get a red zone between those allotted seconds and it still creates a pattern.
I hope i have educated some people on how patterns work and how they can get you banned.