Self-discipline. You will almost never "feel" like writing, so you'll have to force yourself to do it. Do not drink while you write unless you always drink while you write, and always edit sober. Spend time rewriting until each paragraph knits together like the gears of a Swiss clock. Do not share your work with anyone until it is complete. Remember that your book is better than any critique one could make of it, and read better authors than yourself in your free time.