I think people are forgetting that you’re asking what to do in a specific situation - in this case, when out with your drinking/smoking friends, and/or at a party.
For people that I’ve known who have quit drinking, they say some of the easiest ways are to have non-alcoholic beer (even bring your own bottle/case, if need be), or have sodas instead. If it isn’t doing it for you, you could begin by lessening the quantity of the alcohol by mixing it with non-alcoholic drinks. Adding ice also helps, as it gives you less drink, and slowly helps to water your drink down (something you need if drinking alcohol anyway).
As for smoking, it can be tough. Since it sounds like you’re more a social smoker, try gum instead. Otherwise, as you know, there are patches that you can try (if one doesn’t work for you, there are other brands) and even ciggerettes that are designed to help you quit - which, in your case, would still give you the appearance of being a smoker, if that is something you want.
Not sure about the smoking (bronchitis keeps my smoking from becoming a habit) but with drinking I also find it easier to just have a non-alcoholic drink instead. It also helps if you don’t tell the people you’re out with to avoid getting pressured. If you try to make it a big deal, it’ll become a big deal.