As of right now I already have almost 150 scripts in my campaign, replacing pretty much every stock BW mission script, and some other ones. Of course, many of them are "auxiliary" ones, and some of these are just one-liners. I'm doing it not for bragging rights but because few scripts lend themselves to being re-used, even if I discount the elements that firmly anchor them to the mission they're intended for (which, unlike the vast majority of the stock SC/BW scripts claimed to be useful only for this or that mission, are an ironclad fact because they're, for instance, tied to the location layout in a particular map, or alter the settings of a very particular player).
Actually writing a decent attacking AI script is very easy. It happened often that I was writing AIs that initially ended up too aggressive for the intended use, and had to tone them down, sometimes repeatedly.
Trial and error... mostly error.