Luck is discipline, period. Discipline is writing in spite of whatever is going on. No matter what. And the more you work at it, the luckier you get.
Part Three of Marilyn Horowitz' series 10 Ingredients of Successful Screenwriting focuses on how luck plays a part in our writing success.