Location, Script, Breaks, player behaviour all come into play.
create a player pattern and stick to it, you online 12hours a day during x hour and the following 12hours your sleeping DONT mix the two.
using scripts which are VERY mainstream and free scripts often are worse in terms of getting bans only because a million other botters have used them so the pattern of those scripts are already recognized as "Botters"
Always know where to bot, dont be the guy to be botting for hours of end on the same world all by himself by some iron ores. choose a location where you either blend in or find a location you wont come across people trying to communicate with you.