Purchase a nicotine alternative. Common options include nicotine gum, patches and electronic cigarettes. A newer product, the nicotine drink, is a flavored beverage laced with nicotine.
Purchase items to keep your hands busy during the flight. Keeping your hands busy will address the physical habit of smoking. Ideas include knitting or crocheting supplies, jewelery making supplies, hand-held video games, a Rubik's Cube or a stress ball. You may also want to purchase snacks, such as nuts, which require you to remove the shells, or lollipops, which require motions similar to smoking.
Pack your nicotine alternative and items to keep your hands busy in your carry-on bag. These items should be enough to curb your nicotine withdrawal symptoms and the physical habit of smoking during the duration of your flight.