player is hit by a pitch that is outside of the zone the first offense is a base for the batter and everyone on base, the second offense is a double for the batter (and 2 bases for everyone else on base), and every subsequent HBP the batter is given four bases along with everyone else on base.
Take the stupid "unwritten rules" out of baseball and hurt a team for wild pitching where it hurts: the scoreboard.