Fast way to texture a 10km map?

Ok i got a 10km map from a height map that i made and im wondering if there is a faster way to paint textures. Like a script or something that paints rocks on slopes and sand for mesh that goes below lets say 30 in height. Is there a plugin or something to help me out? All i need is to paint 3 textures but the map is massive so it will take many days. Thanks!


(thank @tanoshimi for that!)

or get the Terrain Toolkit from Google code and use its height rules processing to auto paint.